Class: Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb,
lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
Defined Under Namespace
Classes: PayloadContext, PayloadInstance, PayloadList, PayloadPage
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the AddOnResultInstance.
-
#fetch ⇒ AddOnResultInstance
Fetch the AddOnResultInstance.
-
#initialize(version, account_sid, reference_sid, sid) ⇒ AddOnResultContext
constructor
Initialize the AddOnResultContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#payloads(sid = :unset) ⇒ PayloadList, PayloadContext
Access the payloads.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, account_sid, reference_sid, sid) ⇒ AddOnResultContext
Initialize the AddOnResultContext
137 138 139 140 141 142 143 144 145 146 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb', line 137 def initialize(version, account_sid, reference_sid, sid) super(version) # Path Solution @solution = { account_sid: account_sid, reference_sid: reference_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:sid]}.json" # Dependents @payloads = nil end |
Instance Method Details
#delete ⇒ Boolean
Delete the AddOnResultInstance
150 151 152 153 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb', line 150 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ AddOnResultInstance
Fetch the AddOnResultInstance
158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb', line 158 def fetch payload = @version.fetch('GET', @uri) AddOnResultInstance.new( @version, payload, account_sid: @solution[:account_sid], reference_sid: @solution[:reference_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
199 200 201 202 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb', line 199 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.AddOnResultContext #{context}>" end |
#payloads(sid = :unset) ⇒ PayloadList, PayloadContext
Access the payloads
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb', line 174 def payloads(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return PayloadContext.new(@version, @solution[:account_sid], @solution[:reference_sid], @solution[:sid],sid ) end unless @payloads @payloads = PayloadList.new( @version, account_sid: @solution[:account_sid], reference_sid: @solution[:reference_sid], add_on_result_sid: @solution[:sid], ) end @payloads end |
#to_s ⇒ Object
Provide a user friendly representation
192 193 194 195 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb', line 192 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.AddOnResultContext #{context}>" end |