Class: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/orb/models/customers/credits/ledger_create_entry_params.rb,
sig/orb/models/customers/credits/ledger_create_entry_params.rbs

Overview

See Also:

  • Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment#invoice_settings

Defined Under Namespace

Modules: CustomDueDate, InvoiceDate

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(auto_collection:, custom_due_date: nil, invoice_date: nil, item_id: nil, mark_as_paid: nil, memo: nil, net_terms: nil, require_successful_payment: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings for more details.

Passing invoice_settings automatically generates an invoice for the newly added credits. If invoice_settings is passed, you must specify per_unit_cost_basis, as the calculation of the invoice total is done on that basis.

Parameters:

  • auto_collection (Boolean)

    Whether the credits purchase invoice should auto collect with the customer's sav

  • custom_due_date (Date, Time, nil) (defaults to: nil)

    An optional custom due date for the invoice. If not set, the due date will be ca

  • invoice_date (Date, Time, nil) (defaults to: nil)

    An ISO 8601 format date that denotes when this invoice should be dated in the cu

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

    The ID of the Item to be used for the invoice line item. If not provided, a defa

  • mark_as_paid (Boolean) (defaults to: nil)

    If true, the new credits purchase invoice will be marked as paid.

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

    An optional memo to display on the invoice.

  • net_terms (Integer, nil) (defaults to: nil)

    The net terms determines the due date of the invoice. Due date is calculated bas

  • require_successful_payment (Boolean) (defaults to: nil)

    If true, the new credit block will require that the corresponding invoice is pai



# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 273

Instance Attribute Details

#auto_collectionBoolean

Whether the credits purchase invoice should auto collect with the customer's saved payment method.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


211
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 211

required :auto_collection, Orb::Internal::Type::Boolean

#custom_due_dateDate, ...

An optional custom due date for the invoice. If not set, the due date will be calculated based on the net_terms value.

Parameters:

  • value (Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::custom_due_date, nil)

Returns:

  • (Date, Time, nil)


218
219
220
221
222
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 218

optional :custom_due_date,
union: -> {
  Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::CustomDueDate
},
nil?: true

#invoice_dateDate, ...

An ISO 8601 format date that denotes when this invoice should be dated in the customer's timezone. If not provided, the invoice date will default to the credit block's effective date.

Parameters:

  • value (Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::invoice_date, nil)

Returns:

  • (Date, Time, nil)


230
231
232
233
234
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 230

optional :invoice_date,
union: -> {
  Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::InvoiceDate
},
nil?: true

#item_idString?

The ID of the Item to be used for the invoice line item. If not provided, a default 'Credits' item will be used.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


241
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 241

optional :item_id, String, nil?: true

#mark_as_paidBoolean?

If true, the new credits purchase invoice will be marked as paid.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


247
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 247

optional :mark_as_paid, Orb::Internal::Type::Boolean

#memoString?

An optional memo to display on the invoice.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


253
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 253

optional :memo, String, nil?: true

#net_termsInteger?

The net terms determines the due date of the invoice. Due date is calculated based on the invoice or issuance date, depending on the account's configured due date calculation method. A value of '0' here represents that the invoice is due on issue, whereas a value of '30' represents that the customer has 30 days to pay the invoice. You must set either net_terms or custom_due_date, but not both.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


264
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 264

optional :net_terms, Integer, nil?: true

#require_successful_paymentBoolean?

If true, the new credit block will require that the corresponding invoice is paid before it can be drawn down from.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


271
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 271

optional :require_successful_payment, Orb::Internal::Type::Boolean

Class Method Details

.variantsArray(Date, Time)

Returns:

  • (Array(Date, Time))


# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 310

Instance Method Details

#to_hash{

Returns:

  • ({)


195
# File 'sig/orb/models/customers/credits/ledger_create_entry_params.rbs', line 195

def to_hash: -> {