Class: Orb::Models::CreditBlockRetrieveResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::CreditBlockRetrieveResponse
- Defined in:
- lib/orb/models/credit_block_retrieve_response.rb,
sig/orb/models/credit_block_retrieve_response.rbs
Overview
Defined Under Namespace
Modules: CreditBlockSource, Status Classes: CreditAllocation, CreditCommitment, Filter
Instance Attribute Summary collapse
- #balance ⇒ Float
-
#credit_allocation ⇒ Orb::Models::CreditBlockRetrieveResponse::CreditAllocation?
The credit allocation that funded a block.
-
#credit_block_source ⇒ Symbol, Orb::Models::CreditBlockRetrieveResponse::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), ormanual(a manual credit ledger increment, including credits voided or expired off another block). -
#credit_commitment ⇒ Orb::Models::CreditBlockRetrieveResponse::CreditCommitment?
The subscription commitment whose true-up rolled forward into this credit block.
- #effective_date ⇒ Time?
- #expiry_date ⇒ Time?
- #filters ⇒ Array<Orb::Models::CreditBlockRetrieveResponse::Filter>
- #id ⇒ String
- #maximum_initial_balance ⇒ Float?
-
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource.
- #per_unit_cost_basis ⇒ String?
- #status ⇒ Symbol, Orb::Models::CreditBlockRetrieveResponse::Status
Class Method Summary collapse
Instance Method Summary collapse
-
#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
constructor
Some parameter documentations has been truncated, see CreditBlockRetrieveResponse for more details.
- #to_hash ⇒ {
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::CreditBlockRetrieveResponse for more details.
The Credit Block resource models prepaid credits within Orb.
|
|
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 80
|
Instance Attribute Details
#balance ⇒ Float
15 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 15 required :balance, Float |
#credit_allocation ⇒ Orb::Models::CreditBlockRetrieveResponse::CreditAllocation?
The credit allocation that funded a block. Extends the allocation resource serialized on prices with the catalog-item attribution of the funding price.
71 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 71 optional :credit_allocation, -> { Orb::Models::CreditBlockRetrieveResponse::CreditAllocation }, nil?: true |
#credit_block_source ⇒ Symbol, Orb::Models::CreditBlockRetrieveResponse::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).
25 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 25 required :credit_block_source, enum: -> { Orb::Models::CreditBlockRetrieveResponse::CreditBlockSource } |
#credit_commitment ⇒ Orb::Models::CreditBlockRetrieveResponse::CreditCommitment?
The subscription commitment whose true-up rolled forward into this credit block.
Present only when credit_block_source is commitment.
78 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 78 optional :credit_commitment, -> { Orb::Models::CreditBlockRetrieveResponse::CreditCommitment }, nil?: true |
#effective_date ⇒ Time?
30 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 30 required :effective_date, Time, nil?: true |
#expiry_date ⇒ Time?
35 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 35 required :expiry_date, Time, nil?: true |
#filters ⇒ Array<Orb::Models::CreditBlockRetrieveResponse::Filter>
40 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 40 required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditBlockRetrieveResponse::Filter] } |
#id ⇒ String
10 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 10 required :id, String |
#maximum_initial_balance ⇒ Float?
45 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 45 required :maximum_initial_balance, Float, 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.
54 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 54 required :metadata, Orb::Internal::Type::HashOf[String] |
#per_unit_cost_basis ⇒ String?
59 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 59 required :per_unit_cost_basis, String, nil?: true |
#status ⇒ Symbol, Orb::Models::CreditBlockRetrieveResponse::Status
64 |
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 64 required :status, enum: -> { Orb::Models::CreditBlockRetrieveResponse::Status } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/orb/models/credit_block_retrieve_response.rb', line 125
|
Instance Method Details
#to_hash ⇒ {
59 |
# File 'sig/orb/models/credit_block_retrieve_response.rbs', line 59
def to_hash: -> {
|