Class: Lithic::Resources::Cards::FinancialTransactions
- Inherits:
-
Object
- Object
- Lithic::Resources::Cards::FinancialTransactions
- Defined in:
- lib/lithic/resources/cards/financial_transactions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ FinancialTransactions
constructor
private
A new instance of FinancialTransactions.
-
#list(card_token, begin_: nil, category: nil, end_: nil, ending_before: nil, result: nil, starting_after: nil, status: nil, request_options: {}) ⇒ Lithic::Internal::SinglePage<Lithic::Models::FinancialTransaction>
Some parameter documentations has been truncated, see Models::Cards::FinancialTransactionListParams for more details.
-
#retrieve(financial_transaction_token, card_token:, request_options: {}) ⇒ Lithic::Models::FinancialTransaction
Get the card financial transaction for the provided token.
Constructor Details
#initialize(client:) ⇒ FinancialTransactions
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 FinancialTransactions.
77 78 79 |
# File 'lib/lithic/resources/cards/financial_transactions.rb', line 77 def initialize(client:) @client = client end |
Instance Method Details
#list(card_token, begin_: nil, category: nil, end_: nil, ending_before: nil, result: nil, starting_after: nil, status: nil, request_options: {}) ⇒ Lithic::Internal::SinglePage<Lithic::Models::FinancialTransaction>
Some parameter documentations has been truncated, see Models::Cards::FinancialTransactionListParams for more details.
List the financial transactions for a given card.
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/lithic/resources/cards/financial_transactions.rb', line 62 def list(card_token, params = {}) parsed, = Lithic::Cards::FinancialTransactionListParams.dump_request(params) @client.request( method: :get, path: ["v1/cards/%1$s/financial_transactions", card_token], query: parsed.transform_keys(begin_: "begin", end_: "end"), page: Lithic::Internal::SinglePage, model: Lithic::FinancialTransaction, options: ) end |
#retrieve(financial_transaction_token, card_token:, request_options: {}) ⇒ Lithic::Models::FinancialTransaction
Get the card financial transaction for the provided token.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/lithic/resources/cards/financial_transactions.rb', line 20 def retrieve(financial_transaction_token, params) parsed, = Lithic::Cards::FinancialTransactionRetrieveParams.dump_request(params) card_token = parsed.delete(:card_token) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["v1/cards/%1$s/financial_transactions/%2$s", card_token, financial_transaction_token], model: Lithic::FinancialTransaction, options: ) end |