/// <summary> /// create /// </summary> /// <param name="options"> Create ExportCustomJob parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of ExportCustomJob </returns> public static ExportCustomJobResource Create(CreateExportCustomJobOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildCreateRequest(CreateExportCustomJobOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Bulkexports, "/v1/Exports/" + options.PathResourceType + "/Jobs", postParams: options.GetParams() )); }
/// <summary> /// create /// </summary> /// <param name="pathResourceType"> The type of communication – Messages, Calls </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="startDay"> The start_day </param> /// <param name="endDay"> The end_day </param> /// <param name="webhookUrl"> The webhook_url </param> /// <param name="webhookMethod"> The webhook_method </param> /// <param name="email"> The email </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of ExportCustomJob </returns> public static async System.Threading.Tasks.Task <ExportCustomJobResource> CreateAsync(string pathResourceType, string friendlyName = null, string startDay = null, string endDay = null, string webhookUrl = null, string webhookMethod = null, string email = null, ITwilioRestClient client = null) { var options = new CreateExportCustomJobOptions(pathResourceType) { FriendlyName = friendlyName, StartDay = startDay, EndDay = endDay, WebhookUrl = webhookUrl, WebhookMethod = webhookMethod, Email = email }; return(await CreateAsync(options, client)); }
/// <summary> /// create /// </summary> /// <param name="pathResourceType"> The type of communication – Messages, Calls </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="startDay"> The start_day </param> /// <param name="endDay"> The end_day </param> /// <param name="webhookUrl"> The webhook_url </param> /// <param name="webhookMethod"> The webhook_method </param> /// <param name="email"> The email </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of ExportCustomJob </returns> public static ExportCustomJobResource Create(string pathResourceType, string friendlyName = null, string startDay = null, string endDay = null, string webhookUrl = null, string webhookMethod = null, string email = null, ITwilioRestClient client = null) { var options = new CreateExportCustomJobOptions(pathResourceType) { FriendlyName = friendlyName, StartDay = startDay, EndDay = endDay, WebhookUrl = webhookUrl, WebhookMethod = webhookMethod, Email = email }; return(Create(options, client)); }
/// <summary> /// create /// </summary> /// <param name="options"> Create ExportCustomJob parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of ExportCustomJob </returns> public static async System.Threading.Tasks.Task <ExportCustomJobResource> CreateAsync(CreateExportCustomJobOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }