/// <summary> /// create /// </summary> /// <param name="options"> Create WebChannel parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of WebChannel </returns> public static WebChannelResource Create(CreateWebChannelOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildCreateRequest(CreateWebChannelOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.FlexApi, "/v1/WebChannels", postParams: options.GetParams() )); }
/// <summary> /// create /// </summary> /// <param name="flexFlowSid"> The SID of the FlexFlow </param> /// <param name="identity"> The chat identity </param> /// <param name="customerFriendlyName"> The chat participant's friendly name </param> /// <param name="chatFriendlyName"> The chat channel's friendly name </param> /// <param name="chatUniqueName"> The chat channel's unique name </param> /// <param name="preEngagementData"> The pre-engagement data </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of WebChannel </returns> public static async System.Threading.Tasks.Task <WebChannelResource> CreateAsync(string flexFlowSid, string identity, string customerFriendlyName, string chatFriendlyName, string chatUniqueName = null, string preEngagementData = null, ITwilioRestClient client = null) { var options = new CreateWebChannelOptions(flexFlowSid, identity, customerFriendlyName, chatFriendlyName) { ChatUniqueName = chatUniqueName, PreEngagementData = preEngagementData }; return(await CreateAsync(options, client)); }
/// <summary> /// create /// </summary> /// <param name="flexFlowSid"> The SID of the FlexFlow </param> /// <param name="identity"> The chat identity </param> /// <param name="customerFriendlyName"> The chat participant's friendly name </param> /// <param name="chatFriendlyName"> The chat channel's friendly name </param> /// <param name="chatUniqueName"> The chat channel's unique name </param> /// <param name="preEngagementData"> The pre-engagement data </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of WebChannel </returns> public static WebChannelResource Create(string flexFlowSid, string identity, string customerFriendlyName, string chatFriendlyName, string chatUniqueName = null, string preEngagementData = null, ITwilioRestClient client = null) { var options = new CreateWebChannelOptions(flexFlowSid, identity, customerFriendlyName, chatFriendlyName) { ChatUniqueName = chatUniqueName, PreEngagementData = preEngagementData }; return(Create(options, client)); }
/// <summary> /// create /// </summary> /// <param name="options"> Create WebChannel parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of WebChannel </returns> public static async System.Threading.Tasks.Task <WebChannelResource> CreateAsync(CreateWebChannelOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }