Class: Orb::Models::Customers::Credits::TopUpListResponse

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

Overview

See Also:

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

Defined Under Namespace

Modules: ExpiresAfterUnit

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(id:, amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, expires_after: nil, expires_after_unit: nil) ⇒ Object

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

Parameters:

  • id (String)
  • amount (String)

    The amount to increment when the threshold is reached.

  • currency (String)

    The currency or custom pricing unit to use for this top-up. If this is a real-wo

  • invoice_settings (Orb::Models::Customers::Credits::TopUpInvoiceSettings)

    Settings for invoices generated by triggered top-ups.

  • per_unit_cost_basis (String)

    How much, in the customer's currency, to charge for each unit.

  • threshold (String)

    The threshold at which to trigger the top-up. If the balance is at or below this

  • expires_after (Integer, nil) (defaults to: nil)

    The number of days or months after which the top-up expires. If unspecified, it

  • expires_after_unit (Symbol, Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit, nil) (defaults to: nil)

    The unit of expires_after.



# File 'lib/orb/models/customers/credits/top_up_list_response.rb', line 61

Instance Attribute Details

#amountString

The amount to increment when the threshold is reached.

Parameters:

  • value (String)

Returns:

  • (String)


18
# File 'lib/orb/models/customers/credits/top_up_list_response.rb', line 18

required :amount, String

#currencyString

The currency or custom pricing unit to use for this top-up. If this is a real-world currency, it must match the customer's invoicing currency.

Parameters:

  • value (String)

Returns:

  • (String)


25
# File 'lib/orb/models/customers/credits/top_up_list_response.rb', line 25

required :currency, String

#expires_afterInteger?

The number of days or months after which the top-up expires. If unspecified, it does not expire.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


51
# File 'lib/orb/models/customers/credits/top_up_list_response.rb', line 51

optional :expires_after, Integer, nil?: true

#expires_after_unitSymbol, ...

The unit of expires_after.

Parameters:

  • value (Orb::Models::Customers::Credits::TopUpListResponse::expires_after_unit, nil)

Returns:



57
58
59
# File 'lib/orb/models/customers/credits/top_up_list_response.rb', line 57

optional :expires_after_unit,
enum: -> { Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit },
nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/orb/models/customers/credits/top_up_list_response.rb', line 12

required :id, String

#invoice_settingsOrb::Models::Customers::Credits::TopUpInvoiceSettings

Settings for invoices generated by triggered top-ups.

Parameters:

  • value (Orb::Customers::Credits::TopUpInvoiceSettings)

Returns:



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

required :invoice_settings, -> { Orb::Customers::Credits::TopUpInvoiceSettings }

#per_unit_cost_basisString

How much, in the customer's currency, to charge for each unit.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :per_unit_cost_basis, String

#thresholdString

The threshold at which to trigger the top-up. If the balance is at or below this threshold, the top-up will be triggered.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :threshold, String

Instance Method Details

#to_hash{

Returns:

  • ({)


45
# File 'sig/orb/models/customers/credits/top_up_list_response.rbs', line 45

def to_hash: -> {