/// <summary> /// Updates the given properties of a Sim instance from your account. /// </summary> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="uniqueName"> A user-provided string that uniquely identifies this resource as an alternative to the /// Sid. </param> /// <param name="callbackMethod"> The HTTP method Twilio will use when making a request to the callback URL. </param> /// <param name="callbackUrl"> Twilio will make a request to this URL when the Sim has finished updating. </param> /// <param name="friendlyName"> A user-provided string that identifies this resource. </param> /// <param name="ratePlan"> The Sid or UniqueName of the RatePlan that this Sim should use. </param> /// <param name="status"> A string representing the status of the Sim. </param> /// <param name="commandsCallbackMethod"> A string representing the HTTP method to use when making a request to /// CommandsCallbackUrl. </param> /// <param name="commandsCallbackUrl"> The URL that will receive a webhook when this Sim originates a Command. </param> /// <param name="smsFallbackMethod"> The HTTP method Twilio will use when requesting the sms_fallback_url. </param> /// <param name="smsFallbackUrl"> The URL that Twilio will request if an error occurs retrieving or executing the TwiML /// requested by sms_url. </param> /// <param name="smsMethod"> The HTTP method Twilio will use when requesting the above Url. </param> /// <param name="smsUrl"> The URL Twilio will request when the SIM-connected device sends an SMS message that is not a /// Command. </param> /// <param name="voiceFallbackMethod"> The HTTP method Twilio will use when requesting the voice_fallback_url. </param> /// <param name="voiceFallbackUrl"> The URL that Twilio will request if an error occurs retrieving or executing the /// TwiML requested by voice_url. </param> /// <param name="voiceMethod"> The HTTP method Twilio will use when requesting the above Url. </param> /// <param name="voiceUrl"> The URL Twilio will request when the SIM-connected device makes a call. </param> /// <param name="resetStatus"> Initiate a connectivity reset on a Sim. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Sim </returns> public static async System.Threading.Tasks.Task <SimResource> UpdateAsync(string pathSid, string uniqueName = null, Twilio.Http.HttpMethod callbackMethod = null, Uri callbackUrl = null, string friendlyName = null, string ratePlan = null, SimResource.StatusEnum status = null, Twilio.Http.HttpMethod commandsCallbackMethod = null, Uri commandsCallbackUrl = null, Twilio.Http.HttpMethod smsFallbackMethod = null, Uri smsFallbackUrl = null, Twilio.Http.HttpMethod smsMethod = null, Uri smsUrl = null, Twilio.Http.HttpMethod voiceFallbackMethod = null, Uri voiceFallbackUrl = null, Twilio.Http.HttpMethod voiceMethod = null, Uri voiceUrl = null, SimResource.ResetStatusEnum resetStatus = null, ITwilioRestClient client = null) { var options = new UpdateSimOptions(pathSid) { UniqueName = uniqueName, CallbackMethod = callbackMethod, CallbackUrl = callbackUrl, FriendlyName = friendlyName, RatePlan = ratePlan, Status = status, CommandsCallbackMethod = commandsCallbackMethod, CommandsCallbackUrl = commandsCallbackUrl, SmsFallbackMethod = smsFallbackMethod, SmsFallbackUrl = smsFallbackUrl, SmsMethod = smsMethod, SmsUrl = smsUrl, VoiceFallbackMethod = voiceFallbackMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceMethod = voiceMethod, VoiceUrl = voiceUrl, ResetStatus = resetStatus }; return(await UpdateAsync(options, client)); }
/// <summary> /// Updates the given properties of a Sim instance from your account. /// </summary> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="uniqueName"> A user-provided string that uniquely identifies this resource as an alternative to the /// Sid. </param> /// <param name="callbackMethod"> The HTTP method Twilio will use when making a request to the callback URL. </param> /// <param name="callbackUrl"> Twilio will make a request to this URL when the Sim has finished updating. </param> /// <param name="friendlyName"> A user-provided string that identifies this resource. </param> /// <param name="ratePlan"> The Sid or UniqueName of the RatePlan that this Sim should use. </param> /// <param name="status"> A string representing the status of the Sim. </param> /// <param name="commandsCallbackMethod"> A string representing the HTTP method to use when making a request to /// CommandsCallbackUrl. </param> /// <param name="commandsCallbackUrl"> The URL that will receive a webhook when this Sim originates a Command. </param> /// <param name="smsFallbackMethod"> The HTTP method Twilio will use when requesting the sms_fallback_url. </param> /// <param name="smsFallbackUrl"> The URL that Twilio will request if an error occurs retrieving or executing the TwiML /// requested by sms_url. </param> /// <param name="smsMethod"> The HTTP method Twilio will use when requesting the above Url. </param> /// <param name="smsUrl"> The URL Twilio will request when the SIM-connected device sends an SMS message that is not a /// Command. </param> /// <param name="voiceFallbackMethod"> The HTTP method Twilio will use when requesting the voice_fallback_url. </param> /// <param name="voiceFallbackUrl"> The URL that Twilio will request if an error occurs retrieving or executing the /// TwiML requested by voice_url. </param> /// <param name="voiceMethod"> The HTTP method Twilio will use when requesting the above Url. </param> /// <param name="voiceUrl"> The URL Twilio will request when the SIM-connected device makes a call. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Sim </returns> public static SimResource Update(string pathSid, string uniqueName = null, Twilio.Http.HttpMethod callbackMethod = null, Uri callbackUrl = null, string friendlyName = null, string ratePlan = null, SimResource.StatusEnum status = null, Twilio.Http.HttpMethod commandsCallbackMethod = null, Uri commandsCallbackUrl = null, Twilio.Http.HttpMethod smsFallbackMethod = null, Uri smsFallbackUrl = null, Twilio.Http.HttpMethod smsMethod = null, Uri smsUrl = null, Twilio.Http.HttpMethod voiceFallbackMethod = null, Uri voiceFallbackUrl = null, Twilio.Http.HttpMethod voiceMethod = null, Uri voiceUrl = null, ITwilioRestClient client = null) { var options = new UpdateSimOptions(pathSid) { UniqueName = uniqueName, CallbackMethod = callbackMethod, CallbackUrl = callbackUrl, FriendlyName = friendlyName, RatePlan = ratePlan, Status = status, CommandsCallbackMethod = commandsCallbackMethod, CommandsCallbackUrl = commandsCallbackUrl, SmsFallbackMethod = smsFallbackMethod, SmsFallbackUrl = smsFallbackUrl, SmsMethod = smsMethod, SmsUrl = smsUrl, VoiceFallbackMethod = voiceFallbackMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceMethod = voiceMethod, VoiceUrl = voiceUrl }; return(Update(options, client)); }
/// <summary> /// read /// </summary> /// /// <param name="status"> The status </param> /// <param name="iccid"> The iccid </param> /// <param name="ratePlan"> The rate_plan </param> /// <param name="eId"> The e_id </param> /// <param name="simRegistrationCode"> The sim_registration_code </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Sim </returns> public static ResourceSet <SimResource> Read(SimResource.StatusEnum status = null, string iccid = null, string ratePlan = null, string eId = null, string simRegistrationCode = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadSimOptions { Status = status, Iccid = iccid, RatePlan = ratePlan, EId = eId, SimRegistrationCode = simRegistrationCode, PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieve a list of Sims from your account. /// </summary> /// <param name="status"> Only return Sims with this status. </param> /// <param name="iccid"> Return Sims with this Iccid. </param> /// <param name="ratePlan"> Only return Sims with this Rate Plan. </param> /// <param name="eId"> Only return Sims with this EID. </param> /// <param name="simRegistrationCode"> Only return Sims with this registration code. </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Sim </returns> public static async System.Threading.Tasks.Task <ResourceSet <SimResource> > ReadAsync(SimResource.StatusEnum status = null, string iccid = null, string ratePlan = null, string eId = null, string simRegistrationCode = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadSimOptions() { Status = status, Iccid = iccid, RatePlan = ratePlan, EId = eId, SimRegistrationCode = simRegistrationCode, PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }