/// <summary>
        /// create
        /// </summary>
        /// <param name="options"> Create SyncList parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncList </returns>
        public static SyncListResource Create(CreateSyncListOptions 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 service_sid </param>
        /// <param name="uniqueName"> The unique_name </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncList </returns>
        public static async System.Threading.Tasks.Task <SyncListResource> CreateAsync(string pathServiceSid, string uniqueName = null, ITwilioRestClient client = null)
        {
            var options = new CreateSyncListOptions(pathServiceSid)
            {
                UniqueName = uniqueName
            };

            return(await CreateAsync(options, client));
        }
 private static Request BuildCreateRequest(CreateSyncListOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/Sync/Services/" + options.PathServiceSid + "/Lists",
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// create
        /// </summary>
        ///
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="uniqueName"> The unique_name </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncList </returns>
        public static SyncListResource Create(string pathServiceSid, string uniqueName = null, ITwilioRestClient client = null)
        {
            var options = new CreateSyncListOptions(pathServiceSid)
            {
                UniqueName = uniqueName
            };

            return(Create(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="options"> Create SyncList parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncList </returns>
        public static async System.Threading.Tasks.Task <SyncListResource> CreateAsync(CreateSyncListOptions options,
                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildCreateRequest(options, client));

            return(FromJson(response.Content));
        }