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, request_options: {}) ⇒ Increase::Models::AccountTransfer
Approves an Account Transfer in status ‘pending_approval`.
-
#cancel(account_transfer_id, request_options: {}) ⇒ Increase::Models::AccountTransfer
Cancels an Account Transfer in status ‘pending_approval`.
-
#create(account_id: , amount: , description: , destination_account_id: , require_approval: nil, request_options: {}) ⇒ Increase::Models::AccountTransfer
Some parameter documentations has been truncated, see Models::AccountTransferCreateParams for more details.
-
#initialize(client:) ⇒ AccountTransfers
constructor
private
A new instance of AccountTransfers.
-
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::AccountTransfer>
Some parameter documentations has been truncated, see Models::AccountTransferListParams for more details.
-
#retrieve(account_transfer_id, request_options: {}) ⇒ Increase::Models::AccountTransfer
Retrieve an Account Transfer.
Constructor Details
#initialize(client:) ⇒ AccountTransfers
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AccountTransfers.
136 137 138 |
# File 'lib/increase/resources/account_transfers.rb', line 136 def initialize(client:) @client = client end |
Instance Method Details
#approve(account_transfer_id, request_options: {}) ⇒ Increase::Models::AccountTransfer
Approves an Account Transfer in status ‘pending_approval`.
104 105 106 107 108 109 110 111 |
# File 'lib/increase/resources/account_transfers.rb', line 104 def approve(account_transfer_id, params = {}) @client.request( method: :post, path: ["account_transfers/%1$s/approve", account_transfer_id], model: Increase::AccountTransfer, options: params[:request_options] ) end |
#cancel(account_transfer_id, request_options: {}) ⇒ Increase::Models::AccountTransfer
Cancels an Account Transfer in status ‘pending_approval`.
124 125 126 127 128 129 130 131 |
# File 'lib/increase/resources/account_transfers.rb', line 124 def cancel(account_transfer_id, params = {}) @client.request( method: :post, path: ["account_transfers/%1$s/cancel", account_transfer_id], model: Increase::AccountTransfer, options: params[:request_options] ) end |
#create(account_id: , amount: , description: , destination_account_id: , require_approval: nil, request_options: {}) ⇒ Increase::Models::AccountTransfer
Some parameter documentations has been truncated, see Models::AccountTransferCreateParams for more details.
Create an Account Transfer
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/increase/resources/account_transfers.rb', line 28 def create(params) parsed, = Increase::AccountTransferCreateParams.dump_request(params) @client.request( method: :post, path: "account_transfers", body: parsed, model: Increase::AccountTransfer, options: ) end |
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::AccountTransfer>
Some parameter documentations has been truncated, see Models::AccountTransferListParams for more details.
List Account Transfers
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/increase/resources/account_transfers.rb', line 81 def list(params = {}) parsed, = Increase::AccountTransferListParams.dump_request(params) @client.request( method: :get, path: "account_transfers", query: parsed, page: Increase::Internal::Page, model: Increase::AccountTransfer, options: ) end |
#retrieve(account_transfer_id, request_options: {}) ⇒ Increase::Models::AccountTransfer
Retrieve an Account Transfer
50 51 52 53 54 55 56 57 |
# File 'lib/increase/resources/account_transfers.rb', line 50 def retrieve(account_transfer_id, params = {}) @client.request( method: :get, path: ["account_transfers/%1$s", account_transfer_id], model: Increase::AccountTransfer, options: params[:request_options] ) end |