Esempio n. 1
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="uniqueName"> Human-readable name for this map </param>
        /// <param name="ttl"> Time-to-live of this Map in seconds, defaults to no expiration. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncMap </returns>
        public static async System.Threading.Tasks.Task <SyncMapResource> CreateAsync(string pathServiceSid,
                                                                                      string uniqueName        = null,
                                                                                      int?ttl                  = null,
                                                                                      ITwilioRestClient client = null)
        {
            var options = new CreateSyncMapOptions(pathServiceSid)
            {
                UniqueName = uniqueName, Ttl = ttl
            };

            return(await CreateAsync(options, client));
        }
Esempio n. 2
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="uniqueName"> Human-readable name for this map </param>
        /// <param name="ttl"> Time-to-live of this Map in seconds, defaults to no expiration. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncMap </returns>
        public static SyncMapResource Create(string pathServiceSid,
                                             string uniqueName        = null,
                                             int?ttl                  = null,
                                             ITwilioRestClient client = null)
        {
            var options = new CreateSyncMapOptions(pathServiceSid)
            {
                UniqueName = uniqueName, Ttl = ttl
            };

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

            return(FromJson(response.Content));
        }