Class: Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb,
lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb
Defined Under Namespace
Classes: DataContext, DataInstance, DataList, DataPage
Instance Method Summary collapse
-
#data ⇒ DataList, DataContext
Access the data.
-
#delete ⇒ Boolean
Delete the PayloadInstance.
-
#fetch ⇒ PayloadInstance
Fetch the PayloadInstance.
-
#initialize(version, account_sid, reference_sid, add_on_result_sid, sid) ⇒ PayloadContext
constructor
Initialize the PayloadContext.
-
#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, sid) ⇒ PayloadContext
Initialize the PayloadContext
143 144 145 146 147 148 149 150 151 152 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 143 def initialize(version, account_sid, reference_sid, add_on_result_sid, sid) super(version) # Path Solution @solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:add_on_result_sid]}/Payloads/#{@solution[:sid]}.json" # Dependents @data = nil end |
Instance Method Details
#data ⇒ DataList, DataContext
Access the data
191 192 193 194 195 196 197 198 199 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 191 def data DataContext.new( @version, @solution[:account_sid], @solution[:reference_sid], @solution[:add_on_result_sid], @solution[:sid] ) end |
#delete ⇒ Boolean
Delete the PayloadInstance
156 157 158 159 160 161 162 163 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 156 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ PayloadInstance
Fetch the PayloadInstance
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 168 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) PayloadInstance.new( @version, payload, account_sid: @solution[:account_sid], reference_sid: @solution[:reference_sid], add_on_result_sid: @solution[:add_on_result_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
210 211 212 213 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 210 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.PayloadContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
203 204 205 206 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 203 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.PayloadContext #{context}>" end |