Class: Twilio::REST::Verify::V2::ServiceContext::VerificationList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Verify::V2::ServiceContext::VerificationList
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/verification.rb
Instance Method Summary collapse
-
#create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset, device_ip: :unset, enable_sna_client_token: :unset, risk_check: :unset, tags: :unset) ⇒ VerificationInstance
Create the VerificationInstance.
-
#initialize(version, service_sid: nil) ⇒ VerificationList
constructor
Initialize the VerificationList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid: nil) ⇒ VerificationList
Initialize the VerificationList
28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/verify/v2/service/verification.rb', line 28 def initialize(version, service_sid: nil) super(version) # Path Solution @solution = { service_sid: service_sid } @uri = "/Services/#{@solution[:service_sid]}/Verifications" end |
Instance Method Details
#create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset, device_ip: :unset, enable_sna_client_token: :unset, risk_check: :unset, tags: :unset) ⇒ VerificationInstance
Create the VerificationInstance
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/twilio-ruby/rest/verify/v2/service/verification.rb', line 56 def create( to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset, device_ip: :unset, enable_sna_client_token: :unset, risk_check: :unset, tags: :unset ) data = Twilio::Values.of({ 'To' => to, 'Channel' => channel, 'CustomFriendlyName' => custom_friendly_name, 'CustomMessage' => , 'SendDigits' => send_digits, 'Locale' => locale, 'CustomCode' => custom_code, 'Amount' => amount, 'Payee' => payee, 'RateLimits' => Twilio.serialize_object(rate_limits), 'ChannelConfiguration' => Twilio.serialize_object(channel_configuration), 'AppHash' => app_hash, 'TemplateSid' => template_sid, 'TemplateCustomSubstitutions' => template_custom_substitutions, 'DeviceIp' => device_ip, 'EnableSnaClientToken' => enable_sna_client_token, 'RiskCheck' => risk_check, 'Tags' => , }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) VerificationInstance.new( @version, payload, service_sid: @solution[:service_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
116 117 118 |
# File 'lib/twilio-ruby/rest/verify/v2/service/verification.rb', line 116 def to_s '#<Twilio.Verify.V2.VerificationList>' end |