Esempio n. 1
0
        /// <summary>
        /// Updates a Bundle in an account.
        /// </summary>
        /// <param name="options"> Update Bundle parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Bundle </returns>
        public static BundleResource Update(UpdateBundleOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Esempio n. 2
0
        /// <summary>
        /// Updates a Bundle in an account.
        /// </summary>
        /// <param name="options"> Update Bundle parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Bundle </returns>
        public static async System.Threading.Tasks.Task <BundleResource> UpdateAsync(UpdateBundleOptions options,
                                                                                     ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Esempio n. 3
0
 private static Request BuildUpdateRequest(UpdateBundleOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Numbers,
                "/v2/RegulatoryCompliance/Bundles/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Esempio n. 4
0
        /// <summary>
        /// Updates a Bundle in an account.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource. </param>
        /// <param name="status"> The verification status of the Bundle resource </param>
        /// <param name="statusCallback"> The URL we call to inform your application of status changes. </param>
        /// <param name="friendlyName"> The string that you assigned to describe the resource </param>
        /// <param name="email"> The email address </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Bundle </returns>
        public static async System.Threading.Tasks.Task <BundleResource> UpdateAsync(string pathSid,
                                                                                     BundleResource.StatusEnum status = null,
                                                                                     Uri statusCallback       = null,
                                                                                     string friendlyName      = null,
                                                                                     string email             = null,
                                                                                     ITwilioRestClient client = null)
        {
            var options = new UpdateBundleOptions(pathSid)
            {
                Status = status, StatusCallback = statusCallback, FriendlyName = friendlyName, Email = email
            };

            return(await UpdateAsync(options, client));
        }
Esempio n. 5
0
        /// <summary>
        /// Updates a Bundle in an account.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource. </param>
        /// <param name="status"> The verification status of the Bundle resource </param>
        /// <param name="statusCallback"> The URL we call to inform your application of status changes. </param>
        /// <param name="friendlyName"> The string that you assigned to describe the resource </param>
        /// <param name="email"> The email address </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Bundle </returns>
        public static BundleResource Update(string pathSid,
                                            BundleResource.StatusEnum status = null,
                                            Uri statusCallback       = null,
                                            string friendlyName      = null,
                                            string email             = null,
                                            ITwilioRestClient client = null)
        {
            var options = new UpdateBundleOptions(pathSid)
            {
                Status = status, StatusCallback = statusCallback, FriendlyName = friendlyName, Email = email
            };

            return(Update(options, client));
        }