Class: Orb::Models::InvoiceLineItemCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/orb/models/invoice_line_item_create_params.rb,
sig/orb/models/invoice_line_item_create_params.rbs

Overview

See Also:

  • Orb::Resources::InvoiceLineItems#create

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(amount:, end_date:, invoice_id:, quantity:, start_date:, item_id: nil, name: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::InvoiceLineItemCreateParams for more details.

Parameters:

  • amount (String)

    The total amount in the invoice's currency to add to the line item.

  • end_date (Date)

    A date string to specify the line item's end date in the customer's timezone.

  • invoice_id (String)

    The id of the Invoice to add this line item.

  • quantity (Float)

    The number of units on the line item

  • start_date (Date)

    A date string to specify the line item's start date in the customer's timezone.

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

    The id of the item to associate with this line item. If provided without name,

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

    The name to use for the line item. If item_id is not provided, Orb will search

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


# File 'lib/orb/models/invoice_line_item_create_params.rb', line 60

Instance Attribute Details

#amountString

The total amount in the invoice's currency to add to the line item.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/orb/models/invoice_line_item_create_params.rb', line 14

required :amount, String

#end_dateDate

A date string to specify the line item's end date in the customer's timezone.

Parameters:

  • value (Date)

Returns:

  • (Date)


20
# File 'lib/orb/models/invoice_line_item_create_params.rb', line 20

required :end_date, Date

#invoice_idString

The id of the Invoice to add this line item.

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/orb/models/invoice_line_item_create_params.rb', line 26

required :invoice_id, String

#item_idString?

The id of the item to associate with this line item. If provided without name, the item's name will be used for the price/line item. If provided with name, the item will be associated but name will be used for the line item. At least one of name or item_id must be provided.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


47
# File 'lib/orb/models/invoice_line_item_create_params.rb', line 47

optional :item_id, String, nil?: true

#nameString?

The name to use for the line item. If item_id is not provided, Orb will search for an item with this name. If found, that item will be associated with the line item. If not found, a new item will be created with this name. If item_id is provided, this name will be used for the line item, but the item association will be based on item_id. At least one of name or item_id must be provided.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


58
# File 'lib/orb/models/invoice_line_item_create_params.rb', line 58

optional :name, String, nil?: true

#quantityFloat

The number of units on the line item

Parameters:

  • value (Float)

Returns:

  • (Float)


32
# File 'lib/orb/models/invoice_line_item_create_params.rb', line 32

required :quantity, Float

#start_dateDate

A date string to specify the line item's start date in the customer's timezone.

Parameters:

  • value (Date)

Returns:

  • (Date)


38
# File 'lib/orb/models/invoice_line_item_create_params.rb', line 38

required :start_date, Date

Instance Method Details

#to_hash{

Returns:

  • ({)


44
# File 'sig/orb/models/invoice_line_item_create_params.rbs', line 44

def to_hash: -> {