Class: Twilio::REST::Authy::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/authy/v1.rb,
lib/twilio-ruby/rest/authy/v1/form.rb,
lib/twilio-ruby/rest/authy/v1/service.rb,
lib/twilio-ruby/rest/authy/v1/service/entity.rb,
lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb,
lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb

Defined Under Namespace

Classes: FormContext, FormInstance, FormList, FormPage, ServiceContext, ServiceInstance, ServiceList, ServicePage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

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

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Authy



15
16
17
18
19
20
# File 'lib/twilio-ruby/rest/authy/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @services = nil
  @forms = nil
end

Instance Method Details

#forms(form_type = :unset) ⇒ Twilio::REST::Authy::V1::FormContext, Twilio::REST::Authy::V1::FormList

Parameters:

  • form_type (form.FormTypes) (defaults to: :unset)

    The Type of this Form. One of ‘form-app-push`, `form-sms` or `form-totp`.

Returns:



41
42
43
44
45
46
47
48
49
# File 'lib/twilio-ruby/rest/authy/v1.rb', line 41

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

#services(sid = :unset) ⇒ Twilio::REST::Authy::V1::ServiceContext, Twilio::REST::Authy::V1::ServiceList

Parameters:

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

    A 34 character string that uniquely identifies this Service.

Returns:



26
27
28
29
30
31
32
33
34
# File 'lib/twilio-ruby/rest/authy/v1.rb', line 26

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

#to_sObject

Provide a user friendly representation



53
54
55
# File 'lib/twilio-ruby/rest/authy/v1.rb', line 53

def to_s
  '<Twilio::REST::Authy::V1>'
end