/// <summary> /// Fetch a specific Sync Map Permission. /// </summary> /// <param name="options"> Fetch SyncMapPermission parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SyncMapPermission </returns> public static SyncMapPermissionResource Fetch(FetchSyncMapPermissionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Fetch a specific Sync Map Permission. /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathMapSid"> Sync Map SID or unique name. </param> /// <param name="pathIdentity"> Identity of the user to whom the Sync Map Permission applies. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SyncMapPermission </returns> public static async System.Threading.Tasks.Task <SyncMapPermissionResource> FetchAsync(string pathServiceSid, string pathMapSid, string pathIdentity, ITwilioRestClient client = null) { var options = new FetchSyncMapPermissionOptions(pathServiceSid, pathMapSid, pathIdentity); return(await FetchAsync(options, client)); }
/// <summary> /// Fetch a specific Sync Map Permission. /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathMapSid"> Sync Map SID or unique name. </param> /// <param name="pathIdentity"> Identity of the user to whom the Sync Map Permission applies. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SyncMapPermission </returns> public static SyncMapPermissionResource Fetch(string pathServiceSid, string pathMapSid, string pathIdentity, ITwilioRestClient client = null) { var options = new FetchSyncMapPermissionOptions(pathServiceSid, pathMapSid, pathIdentity); return(Fetch(options, client)); }
private static Request BuildFetchRequest(FetchSyncMapPermissionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Sync, "/v1/Services/" + options.PathServiceSid + "/Maps/" + options.PathMapSid + "/Permissions/" + options.PathIdentity + "", queryParams: options.GetParams() )); }
/// <summary> /// Fetch a specific Sync Map Permission. /// </summary> /// <param name="options"> Fetch SyncMapPermission parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SyncMapPermission </returns> public static async System.Threading.Tasks.Task <SyncMapPermissionResource> FetchAsync(FetchSyncMapPermissionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }