Class: Dodopayments::Models::UpdateSubscriptionPlanReq
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::UpdateSubscriptionPlanReq
- Defined in:
- lib/dodopayments/models/update_subscription_plan_req.rb
Direct Known Subclasses
SubscriptionChangePlanParams, SubscriptionPreviewChangePlanParams
Defined Under Namespace
Modules: EffectiveAt, OnPaymentFailure, ProrationBillingMode
Instance Attribute Summary collapse
-
#adaptive_currency_fees_inclusive ⇒ Boolean?
Whether adaptive currency fees should be included in the price (true) or added on top (false).
-
#addons ⇒ Array<Dodopayments::Models::AttachAddon>?
Addons for the new plan.
-
#discount_code ⇒ String?
deprecated
Deprecated.
Use ‘discount_id` instead.
-
#discount_codes ⇒ Array<String>?
Stacked discount codes to apply to the new plan.
-
#effective_at ⇒ Symbol, ...
When to apply the plan change.
-
#metadata ⇒ Hash{Symbol=>String}?
Metadata for the payment.
-
#on_payment_failure ⇒ Symbol, ...
Controls behavior when the plan change payment fails.
-
#product_id ⇒ String
Unique identifier of the product to subscribe to.
-
#proration_billing_mode ⇒ Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::ProrationBillingMode
Proration Billing Mode.
-
#quantity ⇒ Integer
Number of units to subscribe for.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see UpdateSubscriptionPlanReq for more details.
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(product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::UpdateSubscriptionPlanReq for more details.
|
|
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 87
|
Instance Attribute Details
#adaptive_currency_fees_inclusive ⇒ Boolean?
Whether adaptive currency fees should be included in the price (true) or added on top (false). If not specified, uses the subscription’s stored setting.
30 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 30 optional :adaptive_currency_fees_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true |
#addons ⇒ Array<Dodopayments::Models::AttachAddon>?
Addons for the new plan. Note : Leaving this empty would remove any existing addons
37 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 37 optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true |
#discount_code ⇒ String?
Use ‘discount_id` instead.
DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.
46 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 46 optional :discount_code, String, nil?: true |
#discount_codes ⇒ Array<String>?
Stacked discount codes to apply to the new plan. Max 20. Cannot be used together with discount_code. If provided, replaces any existing discount codes. Empty array removes all discounts. If not provided (None), existing discounts with preserve_on_plan_change=true are preserved.
55 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 55 optional :discount_codes, Dodopayments::Internal::Type::ArrayOf[String], nil?: true |
#effective_at ⇒ Symbol, ...
When to apply the plan change.
-
‘immediately` (default): Apply the plan change right away
-
‘next_billing_date`: Schedule the change for the next billing date
64 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 64 optional :effective_at, enum: -> { Dodopayments::UpdateSubscriptionPlanReq::EffectiveAt } |
#metadata ⇒ Hash{Symbol=>String}?
Metadata for the payment. If not passed, the metadata of the subscription will be taken
71 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 71 optional :metadata, Dodopayments::Internal::Type::HashOf[String], nil?: true |
#on_payment_failure ⇒ Symbol, ...
Controls behavior when the plan change payment fails.
-
‘prevent_change`: Keep subscription on current plan until payment succeeds
-
‘apply_change` (default): Apply plan change immediately regardless of payment outcome
If not specified, uses the business-level default setting.
83 84 85 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 83 optional :on_payment_failure, enum: -> { Dodopayments::UpdateSubscriptionPlanReq::OnPaymentFailure }, nil?: true |
#product_id ⇒ String
Unique identifier of the product to subscribe to
10 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 10 required :product_id, String |
#proration_billing_mode ⇒ Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::ProrationBillingMode
Proration Billing Mode
16 17 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 16 required :proration_billing_mode, enum: -> { Dodopayments::UpdateSubscriptionPlanReq::ProrationBillingMode } |
#quantity ⇒ Integer
Number of units to subscribe for. Must be at least 1.
23 |
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 23 required :quantity, Integer |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/dodopayments/models/update_subscription_plan_req.rb', line 122
|