Class: ModernTreasury::Models::Invoices::InvoiceLineItem
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::Invoices::InvoiceLineItem
- Defined in:
- lib/modern_treasury/models/invoices/invoice_line_item.rb
Overview
Instance Attribute Summary collapse
-
#amount ⇒ Integer
The total amount for this line item specified in the invoice currency’s smallest unit.
- #created_at ⇒ Time
-
#description ⇒ String
An optional free-form description of the line item.
-
#direction ⇒ String
Either ‘debit` or `credit`.
- #id ⇒ String
-
#invoice_id ⇒ String
The ID of the invoice for this line item.
-
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
-
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs.
-
#name ⇒ String
The name of the line item, typically a product or SKU name.
- #object ⇒ String
-
#quantity ⇒ Integer
The number of units of a product or service that this line item is for.
-
#unit_amount ⇒ Integer
The cost per unit of the product or service that this line item is for, specified in the invoice currency’s smallest unit.
-
#unit_amount_decimal ⇒ String
The cost per unit of the product or service that this line item is for, specified in the invoice currency’s smallest unit.
- #updated_at ⇒ Time
Method Summary
Methods inherited from Internal::Type::BaseModel
#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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
This class inherits a constructor from ModernTreasury::Internal::Type::BaseModel
Instance Attribute Details
#amount ⇒ Integer
The total amount for this line item specified in the invoice currency’s smallest unit.
18 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 18 required :amount, Integer |
#created_at ⇒ Time
23 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 23 required :created_at, Time |
#description ⇒ String
An optional free-form description of the line item.
29 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 29 required :description, String |
#direction ⇒ String
Either ‘debit` or `credit`. `debit` indicates that a client owes the business money and increases the invoice’s ‘total_amount` due. `credit` has the opposite intention and effect.
37 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 37 required :direction, String |
#id ⇒ String
11 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 11 required :id, String |
#invoice_id ⇒ String
The ID of the invoice for this line item.
43 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 43 required :invoice_id, String |
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
50 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 50 required :live_mode, ModernTreasury::Internal::Type::Boolean |
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs. Both the key and value must be strings.
57 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 57 required :metadata, ModernTreasury::Internal::Type::HashOf[String] |
#name ⇒ String
The name of the line item, typically a product or SKU name.
63 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 63 required :name, String |
#object ⇒ String
68 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 68 required :object, String |
#quantity ⇒ Integer
The number of units of a product or service that this line item is for. Must be a whole number. Defaults to 1 if not provided.
75 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 75 required :quantity, Integer |
#unit_amount ⇒ Integer
The cost per unit of the product or service that this line item is for, specified in the invoice currency’s smallest unit.
82 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 82 required :unit_amount, Integer |
#unit_amount_decimal ⇒ String
The cost per unit of the product or service that this line item is for, specified in the invoice currency’s smallest unit. Accepts decimal strings with up to 12 decimals
90 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 90 required :unit_amount_decimal, String |
#updated_at ⇒ Time
95 |
# File 'lib/modern_treasury/models/invoices/invoice_line_item.rb', line 95 required :updated_at, Time |