Class: Lithic::Resources::FinancialAccounts::Statements::LineItems

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ LineItems

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 LineItems.



54
55
56
# File 'lib/lithic/resources/financial_accounts/statements/line_items.rb', line 54

def initialize(client:)
  @client = client
end

Instance Method Details

#list(statement_token, financial_account_token:, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data>

Some parameter documentations has been truncated, see Models::FinancialAccounts::Statements::LineItemListParams for more details.

List the line items for a given statement within a given financial account.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/lithic/resources/financial_accounts/statements/line_items.rb', line 31

def list(statement_token, params)
  parsed, options = Lithic::FinancialAccounts::Statements::LineItemListParams.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/statements/%2$s/line_items",
      ,
      statement_token
    ],
    query: parsed,
    page: Lithic::Internal::CursorPage,
    model: Lithic::FinancialAccounts::Statements::StatementLineItems::Data,
    options: options
  )
end