Class: ModernTreasury::Models::LineItem

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

Overview

Defined Under Namespace

Modules: ItemizableType Classes: Accounting

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(account_id: nil, class_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Accounting for more details.

Parameters:

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

    The ID of one of your accounting categories. Note that these will only be access

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

    The ID of one of the class objects in your accounting system. Class objects trac



# File 'lib/modern_treasury/models/line_item.rb', line 91


Instance Attribute Details

#accountingModernTreasury::Models::LineItem::Accounting

Deprecated.


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

required :accounting, -> { ModernTreasury::LineItem::Accounting }

#accounting_category_idString?

Deprecated.

The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.

Returns:

  • (String, nil)


25
# File 'lib/modern_treasury/models/line_item.rb', line 25

required :accounting_category_id, String, nil?: true

#accounting_ledger_class_idString?

Deprecated.

The ID of one of the class objects in your accounting system. Class objects track segments of your business independent of client or project. Note that these will only be accessible if your accounting system has been connected.

Returns:

  • (String, nil)


35
# File 'lib/modern_treasury/models/line_item.rb', line 35

required :accounting_ledger_class_id, String, nil?: true

#amountInteger

Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000.

Returns:

  • (Integer)


42
# File 'lib/modern_treasury/models/line_item.rb', line 42

required :amount, Integer

#created_atTime

Returns:

  • (Time)


47
# File 'lib/modern_treasury/models/line_item.rb', line 47

required :created_at, Time

#descriptionString?

A free-form description of the line item.

Returns:

  • (String, nil)


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

required :description, String, nil?: true

#idString

Returns:

  • (String)


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

required :id, String

#itemizable_idString

The ID of the payment order or expected payment.

Returns:

  • (String)


59
# File 'lib/modern_treasury/models/line_item.rb', line 59

required :itemizable_id, String

#itemizable_typeSymbol, ModernTreasury::Models::LineItem::ItemizableType

One of ‘payment_orders` or `expected_payments`.



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

required :itemizable_type, enum: -> { ModernTreasury::LineItem::ItemizableType }

#live_modeBoolean

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

Returns:

  • (Boolean)


72
# File 'lib/modern_treasury/models/line_item.rb', line 72

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

#metadataHash{Symbol=>String}

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

Returns:

  • (Hash{Symbol=>String})


79
# File 'lib/modern_treasury/models/line_item.rb', line 79

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

#objectString

Returns:

  • (String)


84
# File 'lib/modern_treasury/models/line_item.rb', line 84

required :object, String

#updated_atTime

Returns:

  • (Time)


89
# File 'lib/modern_treasury/models/line_item.rb', line 89

required :updated_at, Time