Class: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment

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

Defined Under Namespace

Classes: Filter, InvoiceSettings

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

#initializeObject



77
# File 'sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs', line 77

def initialize: (

Instance Attribute Details

#amountFloat

The number of credits to effect. Note that this is required for increment, decrement, void, or undo operations.

Parameters:

  • value (Float)

Returns:

  • (Float)


49
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 49

required :amount, Float

#currencyString?

The currency or custom pricing unit to use for this ledger entry. If this is a real-world currency, it must match the customer's invoicing currency.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


61
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 61

optional :currency, String, nil?: true

#descriptionString?

Optional metadata that can be specified when adding ledger results via the API. For example, this can be used to note an increment refers to trial credits, or for noting corrections as a result of an incident, etc.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


69
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 69

optional :description, String, nil?: true

#effective_dateTime?

An ISO 8601 format date that denotes when this credit balance should become available for use.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


76
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 76

optional :effective_date, Time, nil?: true

#entry_typeSymbol, :increment

Parameters:

  • value (:increment)

Returns:

  • (Symbol, :increment)


54
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 54

required :entry_type, const: :increment

#expiry_dateTime?

An ISO 8601 format date that denotes when this credit balance should expire.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


82
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 82

optional :expiry_date, Time, nil?: true

#filtersArray<Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter>?

Optional filter to specify which items this credit block applies to. If not specified, the block will apply to all items for the pricing unit.

Parameters:

  • value (::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter], nil)

Returns:



89
90
91
92
93
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 89

optional :filters,
-> {
  Orb::Internal::Type::ArrayOf[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter]
},
nil?: true

#invoice_settingsOrb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings?

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:

  • value (Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings, nil)

Returns:



102
103
104
105
106
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 102

optional :invoice_settings,
-> {
  Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings
},
nil?: true

#metadataHash{Symbol=>String, nil}?

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Parameters:

  • value (::Hash[Symbol, String?], nil)

Returns:

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


114
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 114

optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true

#per_unit_cost_basisString?

Can only be specified when entry_type=increment. How much, in the customer's currency, a customer paid for a single credit in this block

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


121
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 121

optional :per_unit_cost_basis, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 199

Instance Method Details

#to_hash{

Returns:

  • ({)


90
# File 'sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs', line 90

def to_hash: -> {