Class: Twilio::REST::Authy::V1::FormContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Authy::V1::FormContext
- Defined in:
- lib/twilio-ruby/rest/authy/v1/form.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#fetch ⇒ FormInstance
Fetch a FormInstance.
-
#initialize(version, form_type) ⇒ FormContext
constructor
Initialize the FormContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, form_type) ⇒ FormContext
Initialize the FormContext
74 75 76 77 78 79 80 |
# File 'lib/twilio-ruby/rest/authy/v1/form.rb', line 74 def initialize(version, form_type) super(version) # Path Solution @solution = {form_type: form_type, } @uri = "/Forms/#{@solution[:form_type]}" end |
Instance Method Details
#fetch ⇒ FormInstance
Fetch a FormInstance
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/twilio-ruby/rest/authy/v1/form.rb', line 85 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) FormInstance.new(@version, payload, form_type: @solution[:form_type], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
106 107 108 109 |
# File 'lib/twilio-ruby/rest/authy/v1/form.rb', line 106 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Authy.V1.FormContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
99 100 101 102 |
# File 'lib/twilio-ruby/rest/authy/v1/form.rb', line 99 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Authy.V1.FormContext #{context}>" end |