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

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

Modules: VoidReason

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(amount:, block_id:, currency: nil, description: nil, metadata: nil, void_reason: nil, entry_type: :void) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void for more details.

Parameters:

  • amount (Float)

    The number of credits to effect. Note that this is required for increment, decre

  • block_id (String)

    The ID of the block to void.

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

    The currency or custom pricing unit to use for this ledger entry. If this is a r

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

    Optional metadata that can be specified when adding ledger results via the API.

  • metadata (Hash{Symbol=>String, nil}, nil) (defaults to: nil)

    User-specified key/value pairs for the resource. Individual keys can be removed

  • void_reason (Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason, nil) (defaults to: nil)

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

  • entry_type (Symbol, :void) (defaults to: :void)


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

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)


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

required :amount, Float

#block_idString

The ID of the block to void.

Parameters:

  • value (String)

Returns:

  • (String)


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

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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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)


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

optional :description, String, nil?: true

#entry_typeSymbol, :void

Parameters:

  • value (:void)

Returns:

  • (Symbol, :void)


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

required :entry_type, const: :void

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


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

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

#void_reasonSymbol, ...

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

Parameters:

  • value (Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::void_reason, nil)

Returns:



509
510
511
512
513
# File 'lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb', line 509

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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {