/// <summary> /// Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old /// primary Auth Token will result in an error. /// </summary> /// <param name="options"> Update AuthTokenPromotion parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AuthTokenPromotion </returns> public static AuthTokenPromotionResource Update(UpdateAuthTokenPromotionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateAuthTokenPromotionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Accounts, "/v1/AuthTokens/Promote", postParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old /// primary Auth Token will result in an error. /// </summary> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AuthTokenPromotion </returns> public static async System.Threading.Tasks.Task <AuthTokenPromotionResource> UpdateAsync(ITwilioRestClient client = null) { var options = new UpdateAuthTokenPromotionOptions(); return(await UpdateAsync(options, client)); }
/// <summary> /// Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old /// primary Auth Token will result in an error. /// </summary> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AuthTokenPromotion </returns> public static AuthTokenPromotionResource Update(ITwilioRestClient client = null) { var options = new UpdateAuthTokenPromotionOptions(); return(Update(options, client)); }
/// <summary> /// Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old /// primary Auth Token will result in an error. /// </summary> /// <param name="options"> Update AuthTokenPromotion parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AuthTokenPromotion </returns> public static async System.Threading.Tasks.Task <AuthTokenPromotionResource> UpdateAsync(UpdateAuthTokenPromotionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }