示例#1
0
        /// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="options"> Update TrustProducts parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TrustProducts </returns>
        public static TrustProductsResource Update(UpdateTrustProductsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
示例#2
0
 private static Request BuildUpdateRequest(UpdateTrustProductsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Trusthub,
                "/v1/TrustProducts/" + options.PathSid + "",
                postParams: options.GetParams(),
                headerParams: null
                ));
 }
示例#3
0
        /// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource. </param>
        /// <param name="status"> The verification status of the Customer-Profile 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 TrustProducts </returns>
        public static async System.Threading.Tasks.Task <TrustProductsResource> UpdateAsync(string pathSid,
                                                                                            TrustProductsResource.StatusEnum status = null,
                                                                                            Uri statusCallback       = null,
                                                                                            string friendlyName      = null,
                                                                                            string email             = null,
                                                                                            ITwilioRestClient client = null)
        {
            var options = new UpdateTrustProductsOptions(pathSid)
            {
                Status = status, StatusCallback = statusCallback, FriendlyName = friendlyName, Email = email
            };

            return(await UpdateAsync(options, client));
        }
示例#4
0
        /// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource. </param>
        /// <param name="status"> The verification status of the Customer-Profile 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 TrustProducts </returns>
        public static TrustProductsResource Update(string pathSid,
                                                   TrustProductsResource.StatusEnum status = null,
                                                   Uri statusCallback       = null,
                                                   string friendlyName      = null,
                                                   string email             = null,
                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateTrustProductsOptions(pathSid)
            {
                Status = status, StatusCallback = statusCallback, FriendlyName = friendlyName, Email = email
            };

            return(Update(options, client));
        }
示例#5
0
        /// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="options"> Update TrustProducts parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TrustProducts </returns>
        public static async System.Threading.Tasks.Task <TrustProductsResource> UpdateAsync(UpdateTrustProductsOptions options,
                                                                                            ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }