Class: Dodopayments::Models::SubscriptionChangePlanResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/subscription_change_plan_response.rb,
sig/dodopayments/models/subscription_change_plan_response.rbs

Overview

See Also:

  • Dodopayments::Resources::Subscriptions#change_plan

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(client_secret: nil, expires_on: nil, payment_id: nil, payment_link: nil) ⇒ Object

Handles for a hosted checkout page that settles a plan change.

The four fields repeat UpdatePaymentMethodResponse and a subset of CreateSubscriptionResponse. A shared type would rename the generated SDK types for all three routes, so each route keeps its own.



# File 'lib/dodopayments/models/subscription_change_plan_response.rb', line 31


Instance Attribute Details

#client_secretString?

Client secret for an embedded checkout.



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

optional :client_secret, String, nil?: true

#expires_onTime?

When the link stops working.



17
# File 'lib/dodopayments/models/subscription_change_plan_response.rb', line 17

optional :expires_on, Time, nil?: true

#payment_idString?

Id of the payment that settles the plan change.



23
# File 'lib/dodopayments/models/subscription_change_plan_response.rb', line 23

optional :payment_id, String, nil?: true

Checkout page URL. Give this to the customer.



29
# File 'lib/dodopayments/models/subscription_change_plan_response.rb', line 29

optional :payment_link, String, nil?: true

Instance Method Details

#to_hash{



27
# File 'sig/dodopayments/models/subscription_change_plan_response.rbs', line 27

def to_hash: -> {