Class: ModernTreasury::Models::LedgerAccountSettlementCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/modern_treasury/models/ledger_account_settlement_create_params.rb

Overview

Defined Under Namespace

Modules: Status

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(contra_ledger_account_id:, settled_ledger_account_id:, allow_either_direction: nil, description: nil, effective_at_upper_bound: nil, metadata: nil, skip_settlement_ledger_transaction: nil, status: nil, request_options: {}) ⇒ Object

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

Parameters:

  • contra_ledger_account_id (String)

    The id of the contra ledger account that sends to or receives funds from the set

  • settled_ledger_account_id (String)

    The id of the settled ledger account whose ledger entries are queried against, a

  • allow_either_direction (Boolean, nil) (defaults to: nil)

    If true, the settlement amount and settlement_entry_direction will bring the set

  • description (String, nil) (defaults to: nil)

    The description of the ledger account settlement.

  • effective_at_upper_bound (Time, nil) (defaults to: nil)

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

  • metadata (Hash{Symbol=>String}) (defaults to: nil)

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

  • skip_settlement_ledger_transaction (Boolean, nil) (defaults to: nil)

    It is set to ‘false` by default. It should be set to `true` when migrating exist

  • status (Symbol, ModernTreasury::Models::LedgerAccountSettlementCreateParams::Status, nil) (defaults to: nil)

    The status of the ledger account settlement. It is set to ‘pending` by default.

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


# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 67

Instance Attribute Details

#allow_either_directionBoolean?

If true, the settlement amount and settlement_entry_direction will bring the settlement ledger account’s balance closer to zero, even if the balance is negative.

Returns:

  • (Boolean, nil)


30
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 30

optional :allow_either_direction, ModernTreasury::Internal::Type::Boolean, nil?: true

#contra_ledger_account_idString

The id of the contra ledger account that sends to or receives funds from the settled ledger account.

Returns:

  • (String)


15
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 15

required :contra_ledger_account_id, String

#descriptionString?

The description of the ledger account settlement.

Returns:

  • (String, nil)


36
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 36

optional :description, String, nil?: true

#effective_at_upper_boundTime?

The exclusive upper bound of the effective_at timestamp of the ledger entries to be included in the ledger account settlement. The default value is the created_at timestamp of the ledger account settlement.

Returns:

  • (Time, nil)


44
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 44

optional :effective_at_upper_bound, Time, nil?: true

#metadataHash{Symbol=>String}?

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

Returns:

  • (Hash{Symbol=>String}, nil)


51
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 51

optional :metadata, ModernTreasury::Internal::Type::HashOf[String]

#settled_ledger_account_idString

The id of the settled ledger account whose ledger entries are queried against, and its balance is reduced as a result.

Returns:

  • (String)


22
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 22

required :settled_ledger_account_id, String

#skip_settlement_ledger_transactionBoolean?

It is set to ‘false` by default. It should be set to `true` when migrating existing settlements.

Returns:

  • (Boolean, nil)


58
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 58

optional :skip_settlement_ledger_transaction, ModernTreasury::Internal::Type::Boolean, nil?: true

#statusSymbol, ...

The status of the ledger account settlement. It is set to ‘pending` by default. To post a ledger account settlement at creation, use `posted`.



65
# File 'lib/modern_treasury/models/ledger_account_settlement_create_params.rb', line 65

optional :status, enum: -> { ModernTreasury::LedgerAccountSettlementCreateParams::Status }, nil?: true