/// <summary> /// create /// </summary> /// <param name="options"> Create AlphaSender parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AlphaSender </returns> public static AlphaSenderResource Create(CreateAlphaSenderOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// create /// </summary> /// <param name="pathServiceSid"> The SID of the Service to create the resource under </param> /// <param name="alphaSender"> The Alphanumeric Sender ID string </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AlphaSender </returns> public static async System.Threading.Tasks.Task <AlphaSenderResource> CreateAsync(string pathServiceSid, string alphaSender, ITwilioRestClient client = null) { var options = new CreateAlphaSenderOptions(pathServiceSid, alphaSender); return(await CreateAsync(options, client)); }
private static Request BuildCreateRequest(CreateAlphaSenderOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Messaging, "/v1/Services/" + options.PathServiceSid + "/AlphaSenders", postParams: options.GetParams() )); }
/// <summary> /// create /// </summary> /// <param name="pathServiceSid"> The SID of the Service to create the resource under </param> /// <param name="alphaSender"> The Alphanumeric Sender ID string </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AlphaSender </returns> public static AlphaSenderResource Create(string pathServiceSid, string alphaSender, ITwilioRestClient client = null) { var options = new CreateAlphaSenderOptions(pathServiceSid, alphaSender); return(Create(options, client)); }
/// <summary> /// create /// </summary> /// <param name="options"> Create AlphaSender parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AlphaSender </returns> public static async System.Threading.Tasks.Task <AlphaSenderResource> CreateAsync(CreateAlphaSenderOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }