Class: Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block

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

Overview

See Also:

  • Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties#block

Defined Under Namespace

Modules: CreditBlockSource, Status Classes: CreditAllocation, CreditCommitment, Filter

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(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil, credit_commitment: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block for more details.

The Credit Block resource models prepaid credits within Orb.

Parameters:



# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 172


Instance Attribute Details

#balance ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


97
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 97

required :balance, String

#credit_allocation ⇒ Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditAllocation?

The credit allocation that funded a block. Extends the allocation resource serialized on prices with the catalog-item attribution of the funding price.

Parameters:

  • value (Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditAllocation, nil)

Returns:



155
156
157
158
159
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 155

optional :credit_allocation,
-> {
  Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditAllocation
},
nil?: true

#credit_block_source ⇒ Symbol, Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditBlockSource

How this credit block was created: allocation (a subscription's recurring credit allocation), top_up (an automatic balance-threshold top-up), commitment (a subscription commitment true-up rolled forward as credit), or manual (a manual credit ledger increment, including credits voided or expired off another block).

Parameters:

  • value (Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::credit_block_source)

Returns:



107
108
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 107

required :credit_block_source,
enum: -> { Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditBlockSource }

#credit_commitment ⇒ Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditCommitment?

The subscription commitment whose true-up rolled forward into this credit block. Present only when credit_block_source is commitment.

Parameters:

  • value (Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditCommitment, nil)

Returns:



166
167
168
169
170
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 166

optional :credit_commitment,
-> {
  Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::CreditCommitment
},
nil?: true

#effective_date ⇒ Time?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


113
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 113

required :effective_date, Time, nil?: true

#expiry_date ⇒ Time?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


118
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 118

required :expiry_date, Time, nil?: true

#filters ⇒ Array<Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::Filter>

Parameters:

  • value (::Array[Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::Filter])

Returns:



123
124
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 123

required :filters,
-> { Orb::Internal::Type::ArrayOf[Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::Filter] }

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


92
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 92

required :id, String

#maximum_initial_balance ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


129
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 129

required :maximum_initial_balance, String, nil?: true

#metadata ⇒ Hash{Symbol=>String}

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. 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])

Returns:

  • (Hash{Symbol=>String})


138
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 138

required :metadata, Orb::Internal::Type::HashOf[String]

#per_unit_cost_basis ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


143
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 143

required :per_unit_cost_basis, String, nil?: true

#status ⇒ Symbol, Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::Status

Parameters:

  • value (Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::status)

Returns:



148
# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 148

required :status, enum: -> { Orb::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::Status }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb', line 218


Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


116
# File 'sig/orb/models/customer_credit_ledger_incremented_webhook_event.rbs', line 116

def to_hash: -> {