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

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/customers/credits/ledger_create_entry_params.rb

Defined Under Namespace

Modules: InvoiceDate

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

Some parameter documentations has been truncated, see Orb::Models::Customers::Credits::LedgerCreateEntryParams::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) (defaults to: )

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

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

    The net terms determines the difference between the invoice date and the issue d

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

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

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

    An optional memo to display on the invoice.

  • 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 180

Instance Attribute Details

#auto_collectionBoolean

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

Returns:

  • (Boolean)


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

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

#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.

Returns:

  • (Date, Time, nil)


161
162
163
164
165
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 161

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

#memoString?

An optional memo to display on the invoice.

Returns:

  • (String, nil)


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

optional :memo, String, nil?: true

#net_termsInteger?

The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0.

Returns:

  • (Integer, nil)


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

required :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.

Returns:

  • (Boolean, nil)


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

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