/// <summary> /// Fetch a specific MessagingConfiguration. /// </summary> /// <param name="pathServiceSid"> The SID of the Service that the resource is associated with </param> /// <param name="pathCountry"> The ISO-3166-1 country code of the country or `all`. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of MessagingConfiguration </returns> public static async System.Threading.Tasks.Task <MessagingConfigurationResource> FetchAsync(string pathServiceSid, string pathCountry, ITwilioRestClient client = null) { var options = new FetchMessagingConfigurationOptions(pathServiceSid, pathCountry); return(await FetchAsync(options, client)); }
/// <summary> /// Fetch a specific MessagingConfiguration. /// </summary> /// <param name="pathServiceSid"> The SID of the Service that the resource is associated with </param> /// <param name="pathCountry"> The ISO-3166-1 country code of the country or `all`. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of MessagingConfiguration </returns> public static MessagingConfigurationResource Fetch(string pathServiceSid, string pathCountry, ITwilioRestClient client = null) { var options = new FetchMessagingConfigurationOptions(pathServiceSid, pathCountry); return(Fetch(options, client)); }
/// <summary> /// Fetch a specific MessagingConfiguration. /// </summary> /// <param name="options"> Fetch MessagingConfiguration parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of MessagingConfiguration </returns> public static MessagingConfigurationResource Fetch(FetchMessagingConfigurationOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchMessagingConfigurationOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Verify, "/v2/Services/" + options.PathServiceSid + "/MessagingConfigurations/" + options.PathCountry + "", queryParams: options.GetParams() )); }
/// <summary> /// Fetch a specific MessagingConfiguration. /// </summary> /// <param name="options"> Fetch MessagingConfiguration parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of MessagingConfiguration </returns> public static async System.Threading.Tasks.Task <MessagingConfigurationResource> FetchAsync(FetchMessagingConfigurationOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }