Class: ModernTreasury::Models::LedgerAccountCreateRequest

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/ledger_account_create_request.rb

Direct Known Subclasses

LedgerAccountCreateParams

Defined Under Namespace

Modules: LedgerableType

Instance Attribute Summary collapse

Instance Method Summary collapse

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(currency:, ledger_id:, name:, normal_balance:, currency_exponent: nil, description: nil, external_id: nil, ledger_account_category_ids: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil) ⇒ Object

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

Parameters:

  • currency (String)

    The currency of the ledger account.

  • ledger_id (String)

    The id of the ledger that this account belongs to.

  • name (String)

    The name of the ledger account.

  • normal_balance (Symbol, ModernTreasury::Models::TransactionDirection)

    The normal balance of the ledger account.

  • currency_exponent (Integer, nil) (defaults to: nil)

    The currency exponent of the ledger account.

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

    The description of the ledger account.

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

    An optional user-defined 180 character unique identifier.

  • ledger_account_category_ids (Array<String>) (defaults to: nil)

    The array of ledger account category ids that this ledger account should be a ch

  • ledgerable_id (String) (defaults to: nil)

    If the ledger account links to another object in Modern Treasury, the id will be

  • ledgerable_type (Symbol, ModernTreasury::Models::LedgerAccountCreateRequest::LedgerableType) (defaults to: nil)

    If the ledger account links to another object in Modern Treasury, the type will

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

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



# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 77

Instance Attribute Details

#currencyString

The currency of the ledger account.

Returns:

  • (String)


10
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 10

required :currency, String

#currency_exponentInteger?

The currency exponent of the ledger account.

Returns:

  • (Integer, nil)


34
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 34

optional :currency_exponent, Integer, nil?: true

#descriptionString?

The description of the ledger account.

Returns:

  • (String, nil)


40
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 40

optional :description, String, nil?: true

#external_idString?

An optional user-defined 180 character unique identifier.

Returns:

  • (String, nil)


46
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 46

optional :external_id, String, nil?: true

#ledger_account_category_idsArray<String>?

The array of ledger account category ids that this ledger account should be a child of.

Returns:

  • (Array<String>, nil)


53
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 53

optional :ledger_account_category_ids, ModernTreasury::Internal::Type::ArrayOf[String]

#ledger_idString

The id of the ledger that this account belongs to.

Returns:

  • (String)


16
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 16

required :ledger_id, String

#ledgerable_idString?

If the ledger account links to another object in Modern Treasury, the id will be populated here, otherwise null.

Returns:

  • (String, nil)


60
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 60

optional :ledgerable_id, String

#ledgerable_typeSymbol, ...

If the ledger account links to another object in Modern Treasury, the type will be populated here, otherwise null. The value is one of internal_account or external_account.



68
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 68

optional :ledgerable_type, enum: -> { ModernTreasury::LedgerAccountCreateRequest::LedgerableType }

#metadataHash{Symbol=>String}?

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

Returns:

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


75
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 75

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

#nameString

The name of the ledger account.

Returns:

  • (String)


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

required :name, String

#normal_balanceSymbol, ModernTreasury::Models::TransactionDirection

The normal balance of the ledger account.



28
# File 'lib/modern_treasury/models/ledger_account_create_request.rb', line 28

required :normal_balance, enum: -> { ModernTreasury::TransactionDirection }