Class: Airwallex::Transfer
- Inherits:
-
APIResource
- Object
- APIResource
- Airwallex::Transfer
- Extended by:
- APIOperations::Create, APIOperations::List, APIOperations::Retrieve
- Defined in:
- lib/airwallex/resources/transfer.rb
Instance Attribute Summary
Attributes inherited from APIResource
Class Method Summary collapse
Instance Method Summary collapse
-
#cancel ⇒ Object
Cancel a pending transfer.
Methods included from APIOperations::Create
Methods included from APIOperations::Retrieve
Methods included from APIOperations::List
Methods inherited from APIResource
#changed_attributes, #dirty?, #initialize, #inspect, #method_missing, #refresh, #refresh_from, resource_name, #respond_to_missing?, #to_hash, #to_json, #to_s
Constructor Details
This class inherits a constructor from Airwallex::APIResource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Airwallex::APIResource
Class Method Details
.resource_path ⇒ Object
9 10 11 |
# File 'lib/airwallex/resources/transfer.rb', line 9 def self.resource_path "/api/v1/transfers" end |
Instance Method Details
#cancel ⇒ Object
Cancel a pending transfer
14 15 16 17 18 19 20 21 |
# File 'lib/airwallex/resources/transfer.rb', line 14 def cancel response = Airwallex.client.post( "#{self.class.resource_path}/#{id}/cancel", {} ) refresh_from(response) self end |