Class: Amdapi::DeleteCall
- Defined in:
- lib/amdapi/resources/delete_call.rb
Constant Summary
Constants inherited from Resource
Instance Attribute Summary collapse
-
#call_uuid ⇒ Object
readonly
Returns the value of attribute call_uuid.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(token, call_uuid, adapter, stubs) ⇒ DeleteCall
constructor
A new instance of DeleteCall.
Methods inherited from Resource
#delete_call, #get_all_request, #get_request, #post_audio_request, #post_call_request
Constructor Details
#initialize(token, call_uuid, adapter, stubs) ⇒ DeleteCall
Returns a new instance of DeleteCall.
7 8 9 10 |
# File 'lib/amdapi/resources/delete_call.rb', line 7 def initialize(token, call_uuid, adapter, stubs) super(token, adapter: adapter, stubs: stubs) @call_uuid = call_uuid end |
Instance Attribute Details
#call_uuid ⇒ Object (readonly)
Returns the value of attribute call_uuid.
5 6 7 |
# File 'lib/amdapi/resources/delete_call.rb', line 5 def call_uuid @call_uuid end |
Instance Method Details
#delete ⇒ Object
12 13 14 15 16 17 |
# File 'lib/amdapi/resources/delete_call.rb', line 12 def delete response = delete_call(call_uuid, headers: headers) raise CallNotFoundError if response.status == 404 JSON.parse(response.body)["success"] end |