Class: Increase::Resources::WireTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::WireTransfers
- Defined in:
- lib/increase/resources/wire_transfers.rb
Instance Method Summary collapse
-
#approve(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Approve a Wire Transfer.
-
#cancel(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Cancel a pending Wire Transfer.
-
#create(account_id: , amount: , creditor: , remittance: , account_number: nil, debtor: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, require_approval: nil, routing_number: nil, source_account_number_id: nil, request_options: {}) ⇒ Increase::Models::WireTransfer
Some parameter documentations has been truncated, see Models::WireTransferCreateParams for more details.
-
#initialize(client:) ⇒ WireTransfers
constructor
private
A new instance of WireTransfers.
-
#list(account_id: nil, created_at: nil, cursor: nil, external_account_id: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::WireTransfer>
Some parameter documentations has been truncated, see Models::WireTransferListParams for more details.
-
#retrieve(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Retrieve a Wire Transfer.
Constructor Details
#initialize(client:) ⇒ WireTransfers
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 WireTransfers.
150 151 152 |
# File 'lib/increase/resources/wire_transfers.rb', line 150 def initialize(client:) @client = client end |
Instance Method Details
#approve(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Approve a Wire Transfer
118 119 120 121 122 123 124 125 |
# File 'lib/increase/resources/wire_transfers.rb', line 118 def approve(wire_transfer_id, params = {}) @client.request( method: :post, path: ["wire_transfers/%1$s/approve", wire_transfer_id], model: Increase::WireTransfer, options: params[:request_options] ) end |
#cancel(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Cancel a pending Wire Transfer
138 139 140 141 142 143 144 145 |
# File 'lib/increase/resources/wire_transfers.rb', line 138 def cancel(wire_transfer_id, params = {}) @client.request( method: :post, path: ["wire_transfers/%1$s/cancel", wire_transfer_id], model: Increase::WireTransfer, options: params[:request_options] ) end |
#create(account_id: , amount: , creditor: , remittance: , account_number: nil, debtor: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, require_approval: nil, routing_number: nil, source_account_number_id: nil, request_options: {}) ⇒ Increase::Models::WireTransfer
Some parameter documentations has been truncated, see Models::WireTransferCreateParams for more details.
Create a Wire Transfer
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/increase/resources/wire_transfers.rb', line 40 def create(params) parsed, = Increase::WireTransferCreateParams.dump_request(params) @client.request( method: :post, path: "wire_transfers", body: parsed, model: Increase::WireTransfer, options: ) end |
#list(account_id: nil, created_at: nil, cursor: nil, external_account_id: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::WireTransfer>
Some parameter documentations has been truncated, see Models::WireTransferListParams for more details.
List Wire Transfers
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/increase/resources/wire_transfers.rb', line 95 def list(params = {}) parsed, = Increase::WireTransferListParams.dump_request(params) @client.request( method: :get, path: "wire_transfers", query: parsed, page: Increase::Internal::Page, model: Increase::WireTransfer, options: ) end |
#retrieve(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Retrieve a Wire Transfer
62 63 64 65 66 67 68 69 |
# File 'lib/increase/resources/wire_transfers.rb', line 62 def retrieve(wire_transfer_id, params = {}) @client.request( method: :get, path: ["wire_transfers/%1$s", wire_transfer_id], model: Increase::WireTransfer, options: params[:request_options] ) end |