Class: Dodopayments::Models::OnDemandSubscription

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/on_demand_subscription.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(mandate_only: , adaptive_currency_fees_inclusive: nil, product_currency: nil, product_description: nil, product_price: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::OnDemandSubscription for more details.

Parameters:

  • mandate_only (Boolean) (defaults to: )

    If set as True, does not perform any charge and only authorizes payment method d

  • adaptive_currency_fees_inclusive (Boolean, nil) (defaults to: nil)

    Whether adaptive currency fees should be included in the product_price (true) or

  • product_currency (Symbol, Dodopayments::Models::Currency, nil) (defaults to: nil)

    Optional currency of the product price. If not specified, defaults to the curren

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

    Optional product description override for billing and line items.

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

    Product price for the initial charge to customer



# File 'lib/dodopayments/models/on_demand_subscription.rb', line 43

Instance Attribute Details

#adaptive_currency_fees_inclusiveBoolean?

Whether adaptive currency fees should be included in the product_price (true) or added on top (false). This field is ignored if adaptive pricing is not enabled for the business.

Returns:

  • (Boolean, nil)


19
# File 'lib/dodopayments/models/on_demand_subscription.rb', line 19

optional :adaptive_currency_fees_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true

#mandate_onlyBoolean

If set as True, does not perform any charge and only authorizes payment method details for future use.

Returns:

  • (Boolean)


11
# File 'lib/dodopayments/models/on_demand_subscription.rb', line 11

required :mandate_only, Dodopayments::Internal::Type::Boolean

#product_currencySymbol, ...

Optional currency of the product price. If not specified, defaults to the currency of the product.

Returns:



26
# File 'lib/dodopayments/models/on_demand_subscription.rb', line 26

optional :product_currency, enum: -> { Dodopayments::Currency }, nil?: true

#product_descriptionString?

Optional product description override for billing and line items. If not specified, the stored description of the product will be used.

Returns:

  • (String, nil)


33
# File 'lib/dodopayments/models/on_demand_subscription.rb', line 33

optional :product_description, String, nil?: true

#product_priceInteger?

Product price for the initial charge to customer If not specified the stored price of the product will be used Represented in the lowest denomination of the currency (e.g., cents for USD). For example, to charge $1.00, pass ‘100`.

Returns:

  • (Integer, nil)


41
# File 'lib/dodopayments/models/on_demand_subscription.rb', line 41

optional :product_price, Integer, nil?: true