class Twilio::REST::Verify::V2::ServiceContext::VerificationCheckList

Public Class Methods

new(version, service_sid: nil) click to toggle source

Initialize the VerificationCheckList @param [Version] version Version that contains the resource @param [String] service_sid The SID of the

{Service}[https://www.twilio.com/docs/verify/api/service] the resource is
associated with.

@return [VerificationCheckList] VerificationCheckList

Calls superclass method Twilio::REST::ListResource::new
   # File lib/twilio-ruby/rest/verify/v2/service/verification_check.rb
22 def initialize(version, service_sid: nil)
23   super(version)
24 
25   # Path Solution
26   @solution = {service_sid: service_sid}
27   @uri = "/Services/#{@solution[:service_sid]}/VerificationCheck"
28 end

Public Instance Methods

create(code: nil, to: :unset, verification_sid: :unset, amount: :unset, payee: :unset) click to toggle source

Create the VerificationCheckInstance @param [String] code The 4-10 character string being verified. @param [String] to The phone number or

{email}[https://www.twilio.com/docs/verify/email] to verify. Either this
parameter or the `verification_sid` must be specified. Phone numbers must be in
{E.164 format}[https://www.twilio.com/docs/glossary/what-e164].

@param [String] verification_sid A SID that uniquely identifies the Verification

Check. Either this parameter or the `to` phone
number/{email}[https://www.twilio.com/docs/verify/email] must be specified.

@param [String] amount The amount of the associated PSD2 compliant transaction.

Requires the PSD2 Service flag enabled.

@param [String] payee The payee of the associated PSD2 compliant transaction.

Requires the PSD2 Service flag enabled.

@return [VerificationCheckInstance] Created VerificationCheckInstance

   # File lib/twilio-ruby/rest/verify/v2/service/verification_check.rb
45 def create(code: nil, to: :unset, verification_sid: :unset, amount: :unset, payee: :unset)
46   data = Twilio::Values.of({
47       'Code' => code,
48       'To' => to,
49       'VerificationSid' => verification_sid,
50       'Amount' => amount,
51       'Payee' => payee,
52   })
53 
54   payload = @version.create('POST', @uri, data: data)
55 
56   VerificationCheckInstance.new(@version, payload, service_sid: @solution[:service_sid], )
57 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/verify/v2/service/verification_check.rb
61 def to_s
62   '#<Twilio.Verify.V2.VerificationCheckList>'
63 end