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.

Parameters:

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

    Client secret for an embedded checkout.

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

    When the link stops working.

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

    Id of the payment that settles the plan change.

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

    Checkout page URL. Give this to the customer.



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

Instance Attribute Details

#client_secretString?

Client secret for an embedded checkout.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :payment_link, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {