Class: Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadContext::DataInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadContext::DataInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb
Instance Method Summary collapse
-
#context ⇒ DataContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ DataInstance
Fetch the DataInstance.
-
#initialize(version, payload, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, payload_sid: nil) ⇒ DataInstance
constructor
Initialize the DataInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#redirect_to ⇒ String
The URL to redirect to to get the data returned by the AddOn that was previously stored.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, payload_sid: nil) ⇒ DataInstance
Initialize the DataInstance
142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 142 def initialize(version, payload , account_sid: nil, reference_sid: nil, add_on_result_sid: nil, payload_sid: nil) super(version) # Marshaled Properties @properties = { 'redirect_to' => payload['redirect_to'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'reference_sid' => reference_sid || @properties['reference_sid'] ,'add_on_result_sid' => add_on_result_sid || @properties['add_on_result_sid'] ,'payload_sid' => payload_sid || @properties['payload_sid'] , } end |
Instance Method Details
#context ⇒ DataContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
159 160 161 162 163 164 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 159 def context unless @instance_context @instance_context = DataContext.new(@version , @params['account_sid'], @params['reference_sid'], @params['add_on_result_sid'], @params['payload_sid']) end @instance_context end |
#fetch ⇒ DataInstance
Fetch the DataInstance
175 176 177 178 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 175 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
189 190 191 192 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 189 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.DataInstance #{values}>" end |
#redirect_to ⇒ String
Returns The URL to redirect to to get the data returned by the AddOn that was previously stored.
168 169 170 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 168 def redirect_to @properties['redirect_to'] end |
#to_s ⇒ Object
Provide a user friendly representation
182 183 184 185 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 182 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.DataInstance #{values}>" end |