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.

Parameters:



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

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.

Parameters:

  • statement_token (String)

    Path param: Globally unique identifier for statements.

  • financial_account_token (String)

    Path param: Globally unique identifier for financial account.

  • ending_before (String)

    Query param: A cursor representing an item’s token before which a page of result

  • page_size (Integer)

    Query param: Page size (for pagination).

  • starting_after (String)

    Query param: A cursor representing an item’s token after which a page of results

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

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 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)
  query = Lithic::Internal::Util.encode_query_params(parsed)
   =
    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: query,
    page: Lithic::Internal::CursorPage,
    model: Lithic::FinancialAccounts::Statements::StatementLineItems::Data,
    options: options
  )
end