Class: Lithic::Resources::FinancialAccounts::Statements
- Inherits:
-
Object
- Object
- Lithic::Resources::FinancialAccounts::Statements
- Defined in:
- lib/lithic/resources/financial_accounts/statements.rb,
lib/lithic/resources/financial_accounts/statements/line_items.rb
Defined Under Namespace
Classes: LineItems
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(client:) ⇒ Statements
constructor
private
A new instance of Statements.
-
#list(financial_account_token, begin_: nil, end_: nil, ending_before: nil, include_initial_statements: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::FinancialAccounts::Statement>
Some parameter documentations has been truncated, see Models::FinancialAccounts::StatementListParams for more details.
-
#retrieve(statement_token, financial_account_token:, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::Statement
Get a specific statement for a given financial account.
Constructor Details
#initialize(client:) ⇒ Statements
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 Statements.
78 79 80 81 |
# File 'lib/lithic/resources/financial_accounts/statements.rb', line 78 def initialize(client:) @client = client @line_items = Lithic::Resources::FinancialAccounts::Statements::LineItems.new(client: client) end |
Instance Attribute Details
#line_items ⇒ Lithic::Resources::FinancialAccounts::Statements::LineItems (readonly)
8 9 10 |
# File 'lib/lithic/resources/financial_accounts/statements.rb', line 8 def line_items @line_items end |
Instance Method Details
#list(financial_account_token, begin_: nil, end_: nil, ending_before: nil, include_initial_statements: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::FinancialAccounts::Statement>
Some parameter documentations has been truncated, see Models::FinancialAccounts::StatementListParams for more details.
List the statements for a given financial account.
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/lithic/resources/financial_accounts/statements.rb', line 63 def list(financial_account_token, params = {}) parsed, = Lithic::FinancialAccounts::StatementListParams.dump_request(params) @client.request( method: :get, path: ["v1/financial_accounts/%1$s/statements", financial_account_token], query: parsed.transform_keys(begin_: "begin", end_: "end"), page: Lithic::Internal::CursorPage, model: Lithic::FinancialAccounts::Statement, options: ) end |
#retrieve(statement_token, financial_account_token:, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::Statement
Get a specific statement for a given financial account.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/lithic/resources/financial_accounts/statements.rb', line 23 def retrieve(statement_token, params) parsed, = Lithic::FinancialAccounts::StatementRetrieveParams.dump_request(params) financial_account_token = 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", financial_account_token, statement_token], model: Lithic::FinancialAccounts::Statement, options: ) end |