Class: Dodopayments::Models::SubscriptionUpdateParams

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

Overview

See Also:

  • Dodopayments::Resources::Subscriptions#update

Defined Under Namespace

Modules: CancelReason Classes: CreditEntitlementCart, DisableOnDemand

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Dodopayments

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

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

#initialize(credit_entitlement_id:, credits_amount: nil, expires_after_days: nil, low_balance_threshold_percent: nil, max_rollover_count: nil, overage_enabled: nil, overage_limit: nil, rollover_enabled: nil, rollover_percentage: nil, rollover_timeframe_count: nil, rollover_timeframe_interval: nil) ⇒ Object

Parameters:

  • credit_entitlement_id (String)
  • credits_amount (String, nil) (defaults to: nil)
  • expires_after_days (Integer, nil) (defaults to: nil)
  • low_balance_threshold_percent (Integer, nil) (defaults to: nil)
  • max_rollover_count (Integer, nil) (defaults to: nil)
  • overage_enabled (Boolean, nil) (defaults to: nil)
  • overage_limit (String, nil) (defaults to: nil)
  • rollover_enabled (Boolean, nil) (defaults to: nil)
  • rollover_percentage (Integer, nil) (defaults to: nil)
  • rollover_timeframe_count (Integer, nil) (defaults to: nil)
  • rollover_timeframe_interval (Symbol, Dodopayments::Models::TimeInterval, nil) (defaults to: nil)

    Unit of a duration count (e.g. license-key validity period).



# File 'lib/dodopayments/models/subscription_update_params.rb', line 221

Instance Attribute Details

#billingDodopayments::Models::BillingAddress?

Parameters:

Returns:



18
# File 'lib/dodopayments/models/subscription_update_params.rb', line 18

optional :billing, -> { Dodopayments::BillingAddress }, nil?: true

#cancel_at_next_billing_dateBoolean?

When set, the subscription will remain active until the end of billing period

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


24
# File 'lib/dodopayments/models/subscription_update_params.rb', line 24

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

#cancel_reasonSymbol, ...

Parameters:

  • value (Dodopayments::Models::SubscriptionUpdateParams::cancel_reason, nil)

Returns:



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

optional :cancel_reason, enum: -> { Dodopayments::SubscriptionUpdateParams::CancelReason }, nil?: true

#cancellation_commentString?

Free-text cancellation comment (only valid when cancelling or scheduling cancellation).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


36
# File 'lib/dodopayments/models/subscription_update_params.rb', line 36

optional :cancellation_comment, String, nil?: true

#cancellation_feedbackSymbol, ...

Customer-supplied churn reason (only valid when cancelling or scheduling cancellation).

Parameters:

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

Returns:



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

optional :cancellation_feedback, enum: -> { Dodopayments::CancellationFeedback }, nil?: true

#credit_entitlement_cartArray<Dodopayments::Models::SubscriptionUpdateParams::CreditEntitlementCart>?

Update credit entitlement cart settings

Parameters:

  • value (::Array[Dodopayments::SubscriptionUpdateParams::CreditEntitlementCart], nil)

Returns:



49
50
51
52
53
# File 'lib/dodopayments/models/subscription_update_params.rb', line 49

optional :credit_entitlement_cart,
-> {
  Dodopayments::Internal::Type::ArrayOf[Dodopayments::SubscriptionUpdateParams::CreditEntitlementCart]
},
nil?: true

#customer_business_nameString?

Optional business / legal name associated with the tax id. When provided together with a valid tax id for a B2B subscription, this name is rendered on the invoice instead of the customer's personal name. Send null to explicitly clear the business name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


62
# File 'lib/dodopayments/models/subscription_update_params.rb', line 62

optional :customer_business_name, String, nil?: true

#customer_nameString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


67
# File 'lib/dodopayments/models/subscription_update_params.rb', line 67

optional :customer_name, String, nil?: true

#disable_on_demandDodopayments::Models::SubscriptionUpdateParams::DisableOnDemand?

Parameters:

  • value (Dodopayments::SubscriptionUpdateParams::DisableOnDemand, nil)

Returns:



72
# File 'lib/dodopayments/models/subscription_update_params.rb', line 72

optional :disable_on_demand, -> { Dodopayments::SubscriptionUpdateParams::DisableOnDemand }, nil?: true

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

Arbitrary key-value metadata. Values can be string, integer, number, or boolean.

Parameters:

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

Returns:

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


78
79
80
# File 'lib/dodopayments/models/subscription_update_params.rb', line 78

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

#next_billing_dateTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


85
# File 'lib/dodopayments/models/subscription_update_params.rb', line 85

optional :next_billing_date, Time, nil?: true

#statusSymbol, ...

Parameters:

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

Returns:



90
# File 'lib/dodopayments/models/subscription_update_params.rb', line 90

optional :status, enum: -> { Dodopayments::SubscriptionStatus }, nil?: true

#subscription_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :subscription_id, String

#subscription_period_countInteger?

New number of subscription_period_interval units the subscription entitlement should span. Used together with subscription_period_interval to extend the subscription period. The resulting period must not be shorter than the current one (this endpoint only extends).

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


99
# File 'lib/dodopayments/models/subscription_update_params.rb', line 99

optional :subscription_period_count, Integer, nil?: true

#subscription_period_intervalSymbol, ...

New interval unit for the subscription period. When changing the period, this may be supplied alongside subscription_period_count; if omitted the existing interval is retained.

Parameters:

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

Returns:



107
# File 'lib/dodopayments/models/subscription_update_params.rb', line 107

optional :subscription_period_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true

#tax_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


112
# File 'lib/dodopayments/models/subscription_update_params.rb', line 112

optional :tax_id, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/dodopayments/models/subscription_update_params.rb', line 160

Instance Method Details

#to_hash{

Returns:

  • ({)


80
# File 'sig/dodopayments/models/subscription_update_params.rbs', line 80

def to_hash: -> {