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

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/orb/models/customers/credits/ledger_create_entry_params.rb

Overview

Defined Under Namespace

Modules: EntryType, VoidReason Classes: InvoiceSettings

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class 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, #initialize, 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

This class inherits a constructor from Orb::Internal::Type::BaseModel

Instance Attribute Details

#amountFloat

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

Returns:

  • (Float)


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

required :amount, Float

#block_idString

The ID of the block to reverse a decrement from.

Returns:

  • (String)


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

required :block_id, String

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

Returns:

  • (String, nil)


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

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.

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#effective_dateTime?

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

Returns:

  • (Time, nil)


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

optional :effective_date, Time, nil?: true

#entry_typeSymbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType



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

required :entry_type, enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::EntryType }

#expiry_dateTime?

An ISO 8601 format date that identifies the origination credit block to expire

Returns:

  • (Time, nil)


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

optional :expiry_date, Time, nil?: true

#invoice_settingsOrb::Models::Customers::Credits::LedgerCreateEntryParams::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.



59
60
61
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 59

optional :invoice_settings,
-> { Orb::Customers::Credits::LedgerCreateEntryParams::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`.

Returns:

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


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

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

Returns:

  • (String, nil)


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

optional :per_unit_cost_basis, String, nil?: true

#target_expiry_dateDate

A future date (specified in YYYY-MM-DD format) used for expiration change, denoting when credits transferred (as part of a partial block expiration) should expire.

Returns:

  • (Date)


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

required :target_expiry_date, Date

#void_reasonSymbol, ...

Can only be specified when ‘entry_type=void`. The reason for the void.



96
97
98
# File 'lib/orb/models/customers/credits/ledger_create_entry_params.rb', line 96

optional :void_reason,
enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason },
nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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


.variantsArray(Date, Time)

Returns:

  • (Array(Date, Time))


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