Exemplo n.º 1
0
        /// <summary>
        /// Updates the given properties of a Super SIM Fleet instance from your account.
        /// </summary>
        /// <param name="options"> Update Fleet parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fleet </returns>
        public static FleetResource Update(UpdateFleetOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Updates the given properties of a Super SIM Fleet instance from your account.
        /// </summary>
        /// <param name="options"> Update Fleet parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Fleet </returns>
        public static async System.Threading.Tasks.Task <FleetResource> UpdateAsync(UpdateFleetOptions options,
                                                                                    ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Exemplo n.º 3
0
 private static Request BuildUpdateRequest(UpdateFleetOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Supersim,
                "/v1/Fleets/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Exemplo n.º 4
0
        /// <summary>
        /// Updates the given properties of a Super SIM Fleet instance from your account.
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to update </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fleet </returns>
        public static FleetResource Update(string pathSid, string uniqueName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateFleetOptions(pathSid)
            {
                UniqueName = uniqueName
            };

            return(Update(options, client));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Updates the given properties of a Super SIM Fleet instance from your account.
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to update </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Fleet </returns>
        public static async System.Threading.Tasks.Task <FleetResource> UpdateAsync(string pathSid,
                                                                                    string uniqueName        = null,
                                                                                    ITwilioRestClient client = null)
        {
            var options = new UpdateFleetOptions(pathSid)
            {
                UniqueName = uniqueName
            };

            return(await UpdateAsync(options, client));
        }
Exemplo n.º 6
0
        /// <summary>
        /// Updates the given properties of a Super SIM Fleet instance from your account.
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to update </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="networkAccessProfile"> The SID or unique name of the Network Access Profile of the Fleet </param>
        /// <param name="commandsUrl"> The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
        ///                   from your device to the Commands number </param>
        /// <param name="commandsMethod"> A string representing the HTTP method to use when making a request to `commands_url`
        ///                      </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Fleet </returns>
        public static async System.Threading.Tasks.Task <FleetResource> UpdateAsync(string pathSid,
                                                                                    string uniqueName                     = null,
                                                                                    string networkAccessProfile           = null,
                                                                                    Uri commandsUrl                       = null,
                                                                                    Twilio.Http.HttpMethod commandsMethod = null,
                                                                                    ITwilioRestClient client              = null)
        {
            var options = new UpdateFleetOptions(pathSid)
            {
                UniqueName = uniqueName, NetworkAccessProfile = networkAccessProfile, CommandsUrl = commandsUrl, CommandsMethod = commandsMethod
            };

            return(await UpdateAsync(options, client));
        }
Exemplo n.º 7
0
        /// <summary>
        /// Updates the given properties of a Super SIM Fleet instance from your account.
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to update </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="networkAccessProfile"> The SID or unique name of the Network Access Profile of the Fleet </param>
        /// <param name="commandsUrl"> The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
        ///                   from your device to the Commands number </param>
        /// <param name="commandsMethod"> A string representing the HTTP method to use when making a request to `commands_url`
        ///                      </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fleet </returns>
        public static FleetResource Update(string pathSid,
                                           string uniqueName                     = null,
                                           string networkAccessProfile           = null,
                                           Uri commandsUrl                       = null,
                                           Twilio.Http.HttpMethod commandsMethod = null,
                                           ITwilioRestClient client              = null)
        {
            var options = new UpdateFleetOptions(pathSid)
            {
                UniqueName = uniqueName, NetworkAccessProfile = networkAccessProfile, CommandsUrl = commandsUrl, CommandsMethod = commandsMethod
            };

            return(Update(options, client));
        }