private static Request BuildReadRequest(ReadSyncListPermissionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Preview, "/Sync/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Permissions", queryParams: options.GetParams() )); }
/// <summary> /// Retrieve a list of all Permissions applying to a Sync List. /// </summary> /// /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathListSid"> Sync List SID or unique name. </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SyncListPermission </returns> public static ResourceSet <SyncListPermissionResource> Read(string pathServiceSid, string pathListSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadSyncListPermissionOptions(pathServiceSid, pathListSid) { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieve a list of all Permissions applying to a Sync List. /// </summary> /// /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathListSid"> Sync List SID or unique name. </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SyncListPermission </returns> public static async System.Threading.Tasks.Task <ResourceSet <SyncListPermissionResource> > ReadAsync(string pathServiceSid, string pathListSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadSyncListPermissionOptions(pathServiceSid, pathListSid) { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Retrieve a list of all Permissions applying to a Sync List. /// </summary> /// /// <param name="options"> Read SyncListPermission parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SyncListPermission </returns> public static ResourceSet <SyncListPermissionResource> Read(ReadSyncListPermissionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <SyncListPermissionResource> .FromJson("permissions", response.Content); return(new ResourceSet <SyncListPermissionResource>(page, options, client)); }
/// <summary> /// Retrieve a list of all Permissions applying to a Sync List. /// </summary> /// <param name="options"> Read SyncListPermission parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SyncListPermission </returns> public static async System.Threading.Tasks.Task <ResourceSet <SyncListPermissionResource> > ReadAsync(ReadSyncListPermissionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <SyncListPermissionResource> .FromJson("permissions", response.Content); return(new ResourceSet <SyncListPermissionResource>(page, options, client)); }