Class: Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/customers/credits/top_up_create_params.rb

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

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

Parameters:

  • amount (String) (defaults to: )

    The amount to increment when the threshold is reached.

  • currency (String) (defaults to: )

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

  • invoice_settings (Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings) (defaults to: )

    Settings for invoices generated by triggered top-ups.

  • per_unit_cost_basis (String) (defaults to: )

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

  • threshold (String) (defaults to: )

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

  • active_from (Time, nil) (defaults to: nil)

    The date from which the top-up is active. If unspecified, the top-up is active i

  • 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::TopUpCreateParams::ExpiresAfterUnit, nil) (defaults to: nil)

    The unit of expires_after.

  • request_options (Orb::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/orb/models/customers/credits/top_up_create_params.rb', line 88

class InvoiceSettings < Orb::Internal::Type::BaseModel
  # @!attribute auto_collection
  #   Whether the credits purchase invoice should auto collect with the customer's
  #   saved payment method.
  #
  #   @return [Boolean]
  required :auto_collection, Orb::Internal::Type::Boolean

  # @!attribute net_terms
  #   The net terms determines the difference between the invoice date and the issue
  #   date for the invoice. If you intend the invoice to be due on issue, set this
  #   to 0.
  #
  #   @return [Integer]
  required :net_terms, Integer

  # @!attribute memo
  #   An optional memo to display on the invoice.
  #
  #   @return [String, nil]
  optional :memo, String, nil?: true

  # @!attribute require_successful_payment
  #   When true, credit blocks created by this top-up will require that the
  #   corresponding invoice is paid before they are drawn down from. If any topup
  #   block is pending payment, further automatic top-ups will be paused until the
  #   invoice is paid or voided.
  #
  #   @return [Boolean, nil]
  optional :require_successful_payment, Orb::Internal::Type::Boolean

  # @!method initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings} for more
  #   details.
  #
  #   Settings for invoices generated by triggered top-ups.
  #
  #   @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav
  #
  #   @param net_terms [Integer] The net terms determines the difference between the invoice date and the issue d
  #
  #   @param memo [String, nil] An optional memo to display on the invoice.
  #
  #   @param require_successful_payment [Boolean] When true, credit blocks created by this top-up will require that the correspond
end

Instance Attribute Details

#auto_collectionBoolean

Whether the credits purchase invoice should auto collect with the customer’s saved payment method.

Returns:

  • (Boolean)


94
# File 'lib/orb/models/customers/credits/top_up_create_params.rb', line 94

required :auto_collection, Orb::Internal::Type::Boolean

#memoString?

An optional memo to display on the invoice.

Returns:

  • (String, nil)


108
# File 'lib/orb/models/customers/credits/top_up_create_params.rb', line 108

optional :memo, String, nil?: true

#net_termsInteger

The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0.

Returns:

  • (Integer)


102
# File 'lib/orb/models/customers/credits/top_up_create_params.rb', line 102

required :net_terms, Integer

#require_successful_paymentBoolean?

When true, credit blocks created by this top-up will require that the corresponding invoice is paid before they are drawn down from. If any topup block is pending payment, further automatic top-ups will be paused until the invoice is paid or voided.

Returns:

  • (Boolean, nil)


117
# File 'lib/orb/models/customers/credits/top_up_create_params.rb', line 117

optional :require_successful_payment, Orb::Internal::Type::Boolean