Beispiel #1
0
        /// <summary>
        /// Update a specific MessagingConfiguration
        /// </summary>
        /// <param name="options"> Update MessagingConfiguration parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of MessagingConfiguration </returns>
        public static MessagingConfigurationResource Update(UpdateMessagingConfigurationOptions options,
                                                            ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #2
0
        /// <summary>
        /// Update 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="messagingServiceSid"> The SID of the Messaging Service used for this configuration. </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> UpdateAsync(string pathServiceSid,
                                                                                                     string pathCountry,
                                                                                                     string messagingServiceSid,
                                                                                                     ITwilioRestClient client = null)
        {
            var options = new UpdateMessagingConfigurationOptions(pathServiceSid, pathCountry, messagingServiceSid);

            return(await UpdateAsync(options, client));
        }
Beispiel #3
0
        /// <summary>
        /// Update 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="messagingServiceSid"> The SID of the Messaging Service used for this configuration. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of MessagingConfiguration </returns>
        public static MessagingConfigurationResource Update(string pathServiceSid,
                                                            string pathCountry,
                                                            string messagingServiceSid,
                                                            ITwilioRestClient client = null)
        {
            var options = new UpdateMessagingConfigurationOptions(pathServiceSid, pathCountry, messagingServiceSid);

            return(Update(options, client));
        }
 private static Request BuildUpdateRequest(UpdateMessagingConfigurationOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Verify,
                "/v2/Services/" + options.PathServiceSid + "/MessagingConfigurations/" + options.PathCountry + "",
                postParams: options.GetParams()
                ));
 }
Beispiel #5
0
        /// <summary>
        /// Update a specific MessagingConfiguration
        /// </summary>
        /// <param name="options"> Update 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> UpdateAsync(UpdateMessagingConfigurationOptions options,
                                                                                                     ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }