Class: ModernTreasury::Models::Invoices::LineItemUpdateParams

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

Overview

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(invoice_id: , description: nil, direction: nil, metadata: nil, name: nil, quantity: nil, unit_amount: nil, unit_amount_decimal: nil, request_options: {}) ⇒ Object

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

Parameters:

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

    An optional free-form description of the line item.

  • direction (String) (defaults to: nil)

    Either ‘debit` or `credit`. `debit` indicates that a client owes the business mo

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

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

  • name (String) (defaults to: nil)

    The name of the line item, typically a product or SKU name.

  • quantity (Integer) (defaults to: nil)

    The number of units of a product or service that this line item is for.

  • unit_amount (Integer) (defaults to: nil)

    The cost per unit of the product or service that this line item is for,

  • unit_amount_decimal (String) (defaults to: nil)

    The cost per unit of the product or service that this line item is for,

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


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

Instance Attribute Details

#descriptionString?

An optional free-form description of the line item.

Returns:

  • (String, nil)


20
# File 'lib/modern_treasury/models/invoices/line_item_update_params.rb', line 20

optional :description, String

#directionString?

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.

Returns:

  • (String, nil)


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

optional :direction, String

#invoice_idString

Returns:

  • (String)


14
# File 'lib/modern_treasury/models/invoices/line_item_update_params.rb', line 14

required :invoice_id, String

#metadataHash{Symbol=>String}?

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

Returns:

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


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

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

#nameString?

The name of the line item, typically a product or SKU name.

Returns:

  • (String, nil)


41
# File 'lib/modern_treasury/models/invoices/line_item_update_params.rb', line 41

optional :name, String

#quantityInteger?

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.

Returns:

  • (Integer, nil)


48
# File 'lib/modern_treasury/models/invoices/line_item_update_params.rb', line 48

optional :quantity, Integer

#unit_amountInteger?

The cost per unit of the product or service that this line item is for, specified in the invoice currency’s smallest unit.

Returns:

  • (Integer, nil)


55
# File 'lib/modern_treasury/models/invoices/line_item_update_params.rb', line 55

optional :unit_amount, Integer

#unit_amount_decimalString?

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

Returns:

  • (String, nil)


63
# File 'lib/modern_treasury/models/invoices/line_item_update_params.rb', line 63

optional :unit_amount_decimal, String