Class: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb,
sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs

Overview

See Also:

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

Defined Under Namespace

Modules: ExpiresAfterUnit Classes: InvoiceSettings

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil) ⇒ Object

Some parameter documentations has been truncated, see InvoiceSettings for more details.

Settings for invoices generated by triggered top-ups.

Parameters:

  • auto_collection (Boolean)

    Whether the credits purchase invoice should auto collect with the customer's sav

  • net_terms (Integer)

    The net terms determines the difference between the invoice date and the issue d

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

    An optional memo to display on the invoice.

  • require_successful_payment (Boolean) (defaults to: nil)

    When true, credit blocks created by this top-up will require that the correspond



# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 127

Instance Attribute Details

#active_fromTime?

The date from which the top-up is active. If unspecified, the top-up is active immediately. This should not be more than 10 days in the past.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


54
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 54

optional :active_from, Time, nil?: true

#amountString

The amount to increment when the threshold is reached.

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 21

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)


28
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 28

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)


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

optional :expires_after, Integer, nil?: true

#expires_after_unitSymbol, ...

The unit of expires_after.

Parameters:

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

Returns:



67
68
69
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 67

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

#external_customer_idString

Parameters:

  • value (String)

Returns:

  • (String)


15
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 15

required :external_customer_id, String

#invoice_settingsOrb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings

Settings for invoices generated by triggered top-ups.

Parameters:

  • value (Orb::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings)

Returns:



34
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 34

required :invoice_settings, -> { Orb::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings }

#per_unit_cost_basisString

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

Parameters:

  • value (String)

Returns:

  • (String)


40
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 40

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)


47
# File 'lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb', line 47

required :threshold, String

Instance Method Details

#to_hash{

Returns:

  • ({)


54
# File 'sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs', line 54

def to_hash: -> {