Class: ModernTreasury::Resources::LedgerAccountStatements

Inherits:
Object
  • Object
show all
Defined in:
lib/modern_treasury/resources/ledger_account_statements.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ LedgerAccountStatements

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

Parameters:



62
63
64
# File 'lib/modern_treasury/resources/ledger_account_statements.rb', line 62

def initialize(client:)
  @client = client
end

Instance Method Details

#create(effective_at_lower_bound: , effective_at_upper_bound: , ledger_account_id: , description: nil, metadata: nil, request_options: {}) ⇒ ModernTreasury::Models::LedgerAccountStatementCreateResponse

Some parameter documentations has been truncated, see Models::LedgerAccountStatementCreateParams for more details.

Create a ledger account statement.

Parameters:

  • effective_at_lower_bound (Time)

    The inclusive lower bound of the effective_at timestamp of the ledger entries to

  • effective_at_upper_bound (Time)

    The exclusive upper bound of the effective_at timestamp of the ledger entries to

  • ledger_account_id (String)

    The id of the ledger account whose ledger entries are queried against, and its b

  • description (String, nil)

    The description of the ledger account statement.

  • metadata (Hash{Symbol=>String})

    Additional data represented as key-value pairs. Both the key and value must be s

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

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/modern_treasury/resources/ledger_account_statements.rb', line 28

def create(params)
  parsed, options = ModernTreasury::LedgerAccountStatementCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/ledger_account_statements",
    body: parsed,
    model: ModernTreasury::Models::LedgerAccountStatementCreateResponse,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::LedgerAccountStatementRetrieveResponse

Get details on a single ledger account statement.

Parameters:

Returns:

See Also:



50
51
52
53
54
55
56
57
# File 'lib/modern_treasury/resources/ledger_account_statements.rb', line 50

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["api/ledger_account_statements/%1$s", id],
    model: ModernTreasury::Models::LedgerAccountStatementRetrieveResponse,
    options: params[:request_options]
  )
end