Beispiel #1
0
        /// <summary>
        /// Fetch a specific Sync List Permission.
        /// </summary>
        ///
        /// <param name="options"> Fetch SyncListPermission parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListPermission </returns>
        public static SyncListPermissionResource Fetch(FetchSyncListPermissionOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #2
0
        /// <summary>
        /// Fetch a specific Sync List Permission.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Permission resource to fetch </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Permission resource to fetch </param>
        /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Sync List Permission
        ///                    resource to fetch </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 <SyncListPermissionResource> FetchAsync(string pathServiceSid,
                                                                                                string pathListSid,
                                                                                                string pathIdentity,
                                                                                                ITwilioRestClient client = null)
        {
            var options = new FetchSyncListPermissionOptions(pathServiceSid, pathListSid, pathIdentity);

            return(await FetchAsync(options, client));
        }
Beispiel #3
0
        /// <summary>
        /// Fetch a specific Sync List Permission.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Permission resource to fetch </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Permission resource to fetch </param>
        /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Sync List Permission
        ///                    resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListPermission </returns>
        public static SyncListPermissionResource Fetch(string pathServiceSid,
                                                       string pathListSid,
                                                       string pathIdentity,
                                                       ITwilioRestClient client = null)
        {
            var options = new FetchSyncListPermissionOptions(pathServiceSid, pathListSid, pathIdentity);

            return(Fetch(options, client));
        }
Beispiel #4
0
 private static Request BuildFetchRequest(FetchSyncListPermissionOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Sync,
                "/v1/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Permissions/" + options.PathIdentity + "",
                queryParams: options.GetParams()
                ));
 }
Beispiel #5
0
        /// <summary>
        /// Fetch a specific Sync List Permission.
        /// </summary>
        /// <param name="options"> Fetch 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 <SyncListPermissionResource> FetchAsync(FetchSyncListPermissionOptions options,
                                                                                                ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }