Class: Increase::Resources::AccountTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::AccountTransfers
- Defined in:
- lib/increase/resources/account_transfers.rb
Instance Method Summary collapse
-
#approve(account_transfer_id, opts = {}) ⇒ Increase::Models::AccountTransfer
Approve an Account Transfer.
-
#cancel(account_transfer_id, opts = {}) ⇒ Increase::Models::AccountTransfer
Cancel an Account Transfer.
-
#create(params = {}, opts = {}) ⇒ Increase::Models::AccountTransfer
Create an Account Transfer.
-
#initialize(client:) ⇒ AccountTransfers
constructor
A new instance of AccountTransfers.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::AccountTransfer>
List Account Transfers.
-
#retrieve(account_transfer_id, opts = {}) ⇒ Increase::Models::AccountTransfer
Retrieve an Account Transfer.
Constructor Details
#initialize(client:) ⇒ AccountTransfers
Returns a new instance of AccountTransfers.
6 7 8 |
# File 'lib/increase/resources/account_transfers.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#approve(account_transfer_id, opts = {}) ⇒ Increase::Models::AccountTransfer
Approve an Account Transfer
78 79 80 81 82 83 84 |
# File 'lib/increase/resources/account_transfers.rb', line 78 def approve(account_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/account_transfers/#{account_transfer_id}/approve" req[:model] = Increase::Models::AccountTransfer @client.request(req, opts) end |
#cancel(account_transfer_id, opts = {}) ⇒ Increase::Models::AccountTransfer
Cancel an Account Transfer
92 93 94 95 96 97 98 |
# File 'lib/increase/resources/account_transfers.rb', line 92 def cancel(account_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/account_transfers/#{account_transfer_id}/cancel" req[:model] = Increase::Models::AccountTransfer @client.request(req, opts) end |
#create(params = {}, opts = {}) ⇒ Increase::Models::AccountTransfer
Create an Account Transfer
23 24 25 26 27 28 29 30 |
# File 'lib/increase/resources/account_transfers.rb', line 23 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/account_transfers" req[:body] = params req[:model] = Increase::Models::AccountTransfer @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::AccountTransfer>
List Account Transfers
62 63 64 65 66 67 68 69 70 |
# File 'lib/increase/resources/account_transfers.rb', line 62 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/account_transfers" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::AccountTransfer @client.request(req, opts) end |
#retrieve(account_transfer_id, opts = {}) ⇒ Increase::Models::AccountTransfer
Retrieve an Account Transfer
38 39 40 41 42 43 44 |
# File 'lib/increase/resources/account_transfers.rb', line 38 def retrieve(account_transfer_id, opts = {}) req = {} req[:method] = :get req[:path] = "/account_transfers/#{account_transfer_id}" req[:model] = Increase::Models::AccountTransfer @client.request(req, opts) end |