Class: Lithic::Resources::FinancialAccounts::FinancialTransactions

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/financial_accounts/financial_transactions.rb

Instance Method Summary collapse

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.

Parameters:



82
83
84
# File 'lib/lithic/resources/financial_accounts/financial_transactions.rb', line 82

def initialize(client:)
  @client = client
end

Instance Method Details

#list(financial_account_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::FinancialAccounts::FinancialTransactionListParams for more details.

List the financial transactions for a given financial account.

Parameters:

Returns:

See Also:



67
68
69
70
71
72
73
74
75
76
77
# File 'lib/lithic/resources/financial_accounts/financial_transactions.rb', line 67

def list(, params = {})
  parsed, options = Lithic::FinancialAccounts::FinancialTransactionListParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["v1/financial_accounts/%1$s/financial_transactions", ],
    query: parsed.transform_keys(begin_: "begin", end_: "end"),
    page: Lithic::Internal::SinglePage,
    model: Lithic::FinancialTransaction,
    options: options
  )
end

#retrieve(financial_transaction_token, financial_account_token:, request_options: {}) ⇒ Lithic::Models::FinancialTransaction

Get the financial transaction for the provided token.

Parameters:

  • financial_transaction_token (String)

    Globally unique identifier for financial transaction token.

  • financial_account_token (String)

    Globally unique identifier for financial account.

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/lithic/resources/financial_accounts/financial_transactions.rb', line 20

def retrieve(financial_transaction_token, params)
  parsed, options = Lithic::FinancialAccounts::FinancialTransactionRetrieveParams.dump_request(params)
   =
    parsed.delete(:financial_account_token) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "v1/financial_accounts/%1$s/financial_transactions/%2$s",
      ,
      financial_transaction_token
    ],
    model: Lithic::FinancialTransaction,
    options: options
  )
end