Class: Twilio::REST::Verify::V2

Inherits:
Twilio::REST::Version show all
Defined in:
lib/twilio-ruby/rest/verify/v2.rb,
lib/twilio-ruby/rest/verify/v2/form.rb,
lib/twilio-ruby/rest/verify/v2/service.rb,
lib/twilio-ruby/rest/verify/v2/safelist.rb,
lib/twilio-ruby/rest/verify/v2/template.rb,
lib/twilio-ruby/rest/verify/v2/service/entity.rb,
lib/twilio-ruby/rest/verify/v2/service/webhook.rb,
lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb,
lib/twilio-ruby/rest/verify/v2/service/access_token.rb,
lib/twilio-ruby/rest/verify/v2/service/verification.rb,
lib/twilio-ruby/rest/verify/v2/verification_attempt.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb,
lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb,
lib/twilio-ruby/rest/verify/v2/service/verification_check.rb,
lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb,
lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb

Defined Under Namespace

Classes: FormContext, FormInstance, FormList, FormPage, SafelistContext, SafelistInstance, SafelistList, SafelistPage, ServiceContext, ServiceInstance, ServiceList, ServicePage, TemplateInstance, TemplateList, TemplatePage, VerificationAttemptContext, VerificationAttemptInstance, VerificationAttemptList, VerificationAttemptPage, VerificationAttemptsSummaryContext, VerificationAttemptsSummaryInstance, VerificationAttemptsSummaryList, VerificationAttemptsSummaryPage

Instance Attribute Summary

Attributes inherited from Twilio::REST::Version

#domain

Instance Method Summary collapse

Methods inherited from Twilio::REST::Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V2

Initialize the V2 version of Verify



21
22
23
24
25
26
27
28
29
30
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 21

def initialize(domain)
    super
    @version = 'v2'
    @forms = nil
    @safelist = nil
    @services = nil
    @templates = nil
    @verification_attempts = nil
    @verification_attempts_summary = nil
end

Instance Method Details

#forms(form_type = :unset) ⇒ Twilio::REST::Verify::V2::FormContext, Twilio::REST::Verify::V2::FormList

Parameters:

  • form_type (String) (defaults to: :unset)

    The Type of this Form. Currently only ‘form-push` is supported.

Returns:



36
37
38
39
40
41
42
43
44
45
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 36

def forms(form_type=:unset)
    if form_type.nil?
        raise ArgumentError, 'form_type cannot be nil'
    end
    if form_type == :unset
        @forms ||= FormList.new self
    else
        FormContext.new(self, form_type)
    end
end

#safelist(phone_number = :unset) ⇒ Twilio::REST::Verify::V2::SafelistContext, Twilio::REST::Verify::V2::SafelistList

Parameters:

Returns:



50
51
52
53
54
55
56
57
58
59
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 50

def safelist(phone_number=:unset)
    if phone_number.nil?
        raise ArgumentError, 'phone_number cannot be nil'
    end
    if phone_number == :unset
        @safelist ||= SafelistList.new self
    else
        SafelistContext.new(self, phone_number)
    end
end

#services(sid = :unset) ⇒ Twilio::REST::Verify::V2::ServiceContext, Twilio::REST::Verify::V2::ServiceList

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the Verification Service resource to fetch.

Returns:



64
65
66
67
68
69
70
71
72
73
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 64

def services(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @services ||= ServiceList.new self
    else
        ServiceContext.new(self, sid)
    end
end

#templatesTwilio::REST::Verify::V2::TemplateList



76
77
78
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 76

def templates
    @templates ||= TemplateList.new self
end

#to_sObject

Provide a user friendly representation



100
101
102
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 100

def to_s
    '<Twilio::REST::Verify::V2>';
end

#verification_attempts(sid = :unset) ⇒ Twilio::REST::Verify::V2::VerificationAttemptContext, Twilio::REST::Verify::V2::VerificationAttemptList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique SID identifier of a Verification Attempt

Returns:



83
84
85
86
87
88
89
90
91
92
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 83

def verification_attempts(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @verification_attempts ||= VerificationAttemptList.new self
    else
        VerificationAttemptContext.new(self, sid)
    end
end

#verification_attempts_summaryTwilio::REST::Verify::V2::verificationAttemptsSummaryContext

Returns:

  • (Twilio::REST::Verify::V2::verificationAttemptsSummaryContext)


95
96
97
# File 'lib/twilio-ruby/rest/verify/v2.rb', line 95

def verification_attempts_summary
    @verification_attempts_summary ||= VerificationAttemptsSummaryContext.new self
end