Class: Dodopayments::Models::SubscriptionChargeParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/dodopayments/models/subscription_charge_params.rb,
sig/dodopayments/models/subscription_charge_params.rbs

Overview

See Also:

  • Dodopayments::Resources::Subscriptions#charge

Defined Under Namespace

Classes: CustomerBalanceConfig

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Dodopayments

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

#initializeObject



33
# File 'sig/dodopayments/models/subscription_charge_params.rbs', line 33

def initialize: (

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.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


28
# File 'lib/dodopayments/models/subscription_charge_params.rb', line 28

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

#customer_balance_configDodopayments::Models::SubscriptionChargeParams::CustomerBalanceConfig?

Specify how customer balance is used for the payment

Parameters:

  • value (Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig, nil)

Returns:



34
35
36
# File 'lib/dodopayments/models/subscription_charge_params.rb', line 34

optional :customer_balance_config,
-> { Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig },
nil?: true

#metadataHash{Symbol=>String, Float, Boolean}?

Metadata for the payment. If not passed, the metadata of the subscription will be taken

Parameters:

  • value (Dodopayments::Models::metadata, nil)

Returns:

  • (Hash{Symbol=>String, Float, Boolean}, nil)


43
44
45
# File 'lib/dodopayments/models/subscription_charge_params.rb', line 43

optional :metadata,
-> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] },
nil?: true

#product_currencySymbol, ...

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

Parameters:

  • value (Dodopayments::Models::currency, nil)

Returns:



52
# File 'lib/dodopayments/models/subscription_charge_params.rb', line 52

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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


59
# File 'lib/dodopayments/models/subscription_charge_params.rb', line 59

optional :product_description, String, nil?: true

#product_priceInteger

The product price. Represented in the lowest denomination of the currency (e.g., cents for USD). For example, to charge $1.00, pass 100.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


20
# File 'lib/dodopayments/models/subscription_charge_params.rb', line 20

required :product_price, Integer

#subscription_idString

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/dodopayments/models/subscription_charge_params.rb', line 13

required :subscription_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


44
# File 'sig/dodopayments/models/subscription_charge_params.rbs', line 44

def to_hash: -> {