Class: Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadContext::DataContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadContext::DataContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb
Instance Method Summary collapse
-
#fetch ⇒ DataInstance
Fetch the DataInstance.
-
#initialize(version, account_sid, reference_sid, add_on_result_sid, payload_sid) ⇒ DataContext
constructor
Initialize the DataContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, account_sid, reference_sid, add_on_result_sid, payload_sid) ⇒ DataContext
Initialize the DataContext
57 58 59 60 61 62 63 64 65 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 57 def initialize(version, account_sid, reference_sid, add_on_result_sid, payload_sid) super(version) # Path Solution @solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, payload_sid: payload_sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:add_on_result_sid]}/Payloads/#{@solution[:payload_sid]}/Data.json" end |
Instance Method Details
#fetch ⇒ DataInstance
Fetch the DataInstance
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 69 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) DataInstance.new( @version, payload, account_sid: @solution[:account_sid], reference_sid: @solution[:reference_sid], add_on_result_sid: @solution[:add_on_result_sid], payload_sid: @solution[:payload_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
98 99 100 101 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 98 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.DataContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
91 92 93 94 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb', line 91 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.DataContext #{context}>" end |