Class: Orb::Models::Customers::CreditListResponse

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

Overview

See Also:

  • Orb::Resources::Customers::Credits#list

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::Customers::CreditListResponse for more details.

Parameters:



# File 'lib/orb/models/customers/credit_list_response.rb', line 85

Instance Attribute Details

#balanceFloat

Parameters:

  • value (Float)

Returns:

  • (Float)


16
# File 'lib/orb/models/customers/credit_list_response.rb', line 16

required :balance, Float

#credit_allocationOrb::Models::Customers::CreditListResponse::CreditAllocation?

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



72
73
74
# File 'lib/orb/models/customers/credit_list_response.rb', line 72

optional :credit_allocation,
-> { Orb::Models::Customers::CreditListResponse::CreditAllocation },
nil?: true

#credit_block_sourceSymbol, Orb::Models::Customers::CreditListResponse::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::Customers::CreditListResponse::credit_block_source)

Returns:



26
# File 'lib/orb/models/customers/credit_list_response.rb', line 26

required :credit_block_source, enum: -> { Orb::Models::Customers::CreditListResponse::CreditBlockSource }

#credit_commitmentOrb::Models::Customers::CreditListResponse::CreditCommitment?

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



81
82
83
# File 'lib/orb/models/customers/credit_list_response.rb', line 81

optional :credit_commitment,
-> { Orb::Models::Customers::CreditListResponse::CreditCommitment },
nil?: true

#effective_dateTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


31
# File 'lib/orb/models/customers/credit_list_response.rb', line 31

required :effective_date, Time, nil?: true

#expiry_dateTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


36
# File 'lib/orb/models/customers/credit_list_response.rb', line 36

required :expiry_date, Time, nil?: true

#filtersArray<Orb::Models::Customers::CreditListResponse::Filter>



41
# File 'lib/orb/models/customers/credit_list_response.rb', line 41

required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Customers::CreditListResponse::Filter] }

#idString

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/orb/models/customers/credit_list_response.rb', line 11

required :id, String

#maximum_initial_balanceFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


46
# File 'lib/orb/models/customers/credit_list_response.rb', line 46

required :maximum_initial_balance, Float, nil?: true

#metadataHash{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})


55
# File 'lib/orb/models/customers/credit_list_response.rb', line 55

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

#per_unit_cost_basisString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


60
# File 'lib/orb/models/customers/credit_list_response.rb', line 60

required :per_unit_cost_basis, String, nil?: true

#statusSymbol, Orb::Models::Customers::CreditListResponse::Status

Parameters:

  • value (Orb::Models::Customers::CreditListResponse::status)

Returns:



65
# File 'lib/orb/models/customers/credit_list_response.rb', line 65

required :status, enum: -> { Orb::Models::Customers::CreditListResponse::Status }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/customers/credit_list_response.rb', line 128

Instance Method Details

#to_hash{

Returns:

  • ({)


60
# File 'sig/orb/models/customers/credit_list_response.rbs', line 60

def to_hash: -> {