Class: ModernTreasury::Models::Transactions::TransactionLineItem

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/transactions/transaction_line_item.rb,
sig/modern_treasury/models/transactions/transaction_line_item.rbs

Overview

See Also:

  • ModernTreasury::Resources::Transactions::LineItems#create

Defined Under Namespace

Modules: TransactableType, Type

Instance Attribute Summary collapse

Class Method 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(id:, amount:, counterparty_id:, created_at:, description:, discarded_at:, expected_payment_id:, live_mode:, object:, reconcilable:, reconciliation_group_id:, transactable_id:, transactable_type:, transaction_id:, type:, updated_at:) ⇒ Object

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

Parameters:

  • id (String)
  • amount (Integer)

    If a matching object exists in Modern Treasury, amount will be populated. Valu

  • counterparty_id (String, nil)

    The ID for the counterparty for this transaction line item.

  • created_at (Time)
  • description (String)

    If no matching object is found, description will be a free-form text field des

  • discarded_at (Time, nil)
  • expected_payment_id (String, nil)

    The ID of the reconciled Expected Payment, otherwise null.

  • live_mode (Boolean)

    This field will be true if this object exists in the live environment, or false

  • object (String)
  • reconcilable (Boolean)

    Describes whether this line item should be counted towards the corresponding tra

  • reconciliation_group_id (String, nil)

    The ID of the reconciliation group this line item belongs to, otherwise null.

  • transactable_id (String, nil)

    If a matching object exists in Modern Treasury, the ID will be populated here, o

  • transactable_type (Symbol, ModernTreasury::Models::Transactions::TransactionLineItem::TransactableType, nil)

    If a matching object exists in Modern Treasury, the type will be populated here,

  • transaction_id (String)

    The ID of the parent transaction.

  • type (Symbol, ModernTreasury::Models::Transactions::TransactionLineItem::Type)

    Indicates whether the line item is originating or receiving (see https://www

  • updated_at (Time)


# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 111

Instance Attribute Details

#amountInteger

If a matching object exists in Modern Treasury, amount will be populated. Value in specified currency's smallest unit (taken from parent Transaction).

Parameters:

  • value (Integer)

Returns:

  • (Integer)


18
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 18

required :amount, Integer

#counterparty_idString?

The ID for the counterparty for this transaction line item.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


24
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 24

required :counterparty_id, String, nil?: true

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


29
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 29

required :created_at, Time

#descriptionString

If no matching object is found, description will be a free-form text field describing the line item. This field may contain personally identifiable information (PII) and is not included in API responses by default. Learn more about changing your settings at https://docs.moderntreasury.com/reference/personally-identifiable-information.

Parameters:

  • value (String)

Returns:

  • (String)


39
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 39

required :description, String

#discarded_atTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :discarded_at, Time, nil?: true

#expected_payment_idString?

The ID of the reconciled Expected Payment, otherwise null.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


50
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 50

required :expected_payment_id, String, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 11

required :id, String

#live_modeBoolean

This field will be true if this object exists in the live environment, or false if it exists in the test environment.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


57
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 57

required :live_mode, ModernTreasury::Internal::Type::Boolean

#objectString

Parameters:

  • value (String)

Returns:

  • (String)


62
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 62

required :object, String

#reconcilableBoolean

Describes whether this line item should be counted towards the corresponding transaction’s reconciliation.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


69
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 69

required :reconcilable, ModernTreasury::Internal::Type::Boolean

#reconciliation_group_idString?

The ID of the reconciliation group this line item belongs to, otherwise null.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :reconciliation_group_id, String, nil?: true

#transactable_idString?

If a matching object exists in Modern Treasury, the ID will be populated here, otherwise null.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


82
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 82

required :transactable_id, String, nil?: true

#transactable_typeSymbol, ...

If a matching object exists in Modern Treasury, the type will be populated here, otherwise null.

Parameters:

  • value (ModernTreasury::Models::Transactions::TransactionLineItem::transactable_type, nil)

Returns:



89
90
91
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 89

required :transactable_type,
enum: -> { ModernTreasury::Transactions::TransactionLineItem::TransactableType },
nil?: true

#transaction_idString

The ID of the parent transaction.

Parameters:

  • value (String)

Returns:

  • (String)


97
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 97

required :transaction_id, String

#typeSymbol, ModernTreasury::Models::Transactions::TransactionLineItem::Type

Indicates whether the line item is originating or receiving (see https://www.moderntreasury.com/journal/beginners-guide-to-ach for more).

Parameters:

  • value (ModernTreasury::Models::Transactions::TransactionLineItem::type_)

Returns:



104
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 104

required :type, enum: -> { ModernTreasury::Transactions::TransactionLineItem::Type }

#updated_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


109
# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 109

required :updated_at, Time

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/modern_treasury/models/transactions/transaction_line_item.rb', line 160

Instance Method Details

#to_hash{

Returns:

  • ({)


78
# File 'sig/modern_treasury/models/transactions/transaction_line_item.rbs', line 78

def to_hash: -> {