Class: Lithic::Resources::BookTransfers
- Inherits:
-
Object
- Object
- Lithic::Resources::BookTransfers
- Defined in:
- lib/lithic/resources/book_transfers.rb
Instance Method Summary collapse
-
#create(amount:, category:, from_financial_account_token:, subtype:, to_financial_account_token:, type:, token: nil, external_id: nil, memo: nil, on_closed_account: nil, request_options: {}) ⇒ Lithic::Models::BookTransferResponse
Some parameter documentations has been truncated, see Models::BookTransferCreateParams for more details.
-
#initialize(client:) ⇒ BookTransfers
constructor
private
A new instance of BookTransfers.
-
#list(account_token: nil, begin_: nil, business_account_token: nil, category: nil, end_: nil, ending_before: nil, financial_account_token: nil, page_size: nil, result: nil, starting_after: nil, status: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::BookTransferResponse>
Some parameter documentations has been truncated, see Models::BookTransferListParams for more details.
-
#retrieve(book_transfer_token, request_options: {}) ⇒ Lithic::Models::BookTransferResponse
Get book transfer by token.
-
#reverse(book_transfer_token, memo: nil, request_options: {}) ⇒ Lithic::Models::BookTransferResponse
Reverse a book transfer.
Constructor Details
#initialize(client:) ⇒ BookTransfers
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 BookTransfers.
143 144 145 |
# File 'lib/lithic/resources/book_transfers.rb', line 143 def initialize(client:) @client = client end |
Instance Method Details
#create(amount:, category:, from_financial_account_token:, subtype:, to_financial_account_token:, type:, token: nil, external_id: nil, memo: nil, on_closed_account: nil, request_options: {}) ⇒ Lithic::Models::BookTransferResponse
Some parameter documentations has been truncated, see Models::BookTransferCreateParams for more details.
Book transfer funds between two financial accounts or between a financial account and card
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/lithic/resources/book_transfers.rb', line 39 def create(params) parsed, = Lithic::BookTransferCreateParams.dump_request(params) @client.request( method: :post, path: "v1/book_transfers", body: parsed, model: Lithic::BookTransferResponse, options: ) end |
#list(account_token: nil, begin_: nil, business_account_token: nil, category: nil, end_: nil, ending_before: nil, financial_account_token: nil, page_size: nil, result: nil, starting_after: nil, status: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::BookTransferResponse>
Some parameter documentations has been truncated, see Models::BookTransferListParams for more details.
List book transfers
104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/lithic/resources/book_transfers.rb', line 104 def list(params = {}) parsed, = Lithic::BookTransferListParams.dump_request(params) @client.request( method: :get, path: "v1/book_transfers", query: parsed.transform_keys(begin_: "begin", end_: "end"), page: Lithic::Internal::CursorPage, model: Lithic::BookTransferResponse, options: ) end |
#retrieve(book_transfer_token, request_options: {}) ⇒ Lithic::Models::BookTransferResponse
Get book transfer by token
61 62 63 64 65 66 67 68 |
# File 'lib/lithic/resources/book_transfers.rb', line 61 def retrieve(book_transfer_token, params = {}) @client.request( method: :get, path: ["v1/book_transfers/%1$s", book_transfer_token], model: Lithic::BookTransferResponse, options: params[:request_options] ) end |
#reverse(book_transfer_token, memo: nil, request_options: {}) ⇒ Lithic::Models::BookTransferResponse
Reverse a book transfer
129 130 131 132 133 134 135 136 137 138 |
# File 'lib/lithic/resources/book_transfers.rb', line 129 def reverse(book_transfer_token, params = {}) parsed, = Lithic::BookTransferReverseParams.dump_request(params) @client.request( method: :post, path: ["v1/book_transfers/%1$s/reverse", book_transfer_token], body: parsed, model: Lithic::BookTransferResponse, options: ) end |