Class: Stigg::Models::V1::ProductUpdateProductParams::ProductSettings

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/product_update_product_params.rb

Defined Under Namespace

Modules: SubscriptionCancellationTime, SubscriptionEndSetup, SubscriptionStartSetup

Instance Attribute Summary collapse

Class Method 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(subscription_cancellation_time:, subscription_end_setup:, subscription_start_setup:, downgrade_plan_id: nil, prorate_at_end_of_billing_period: nil, subscription_start_plan_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Stigg::Models::V1::ProductUpdateProductParams::ProductSettings for more details.

Parameters:



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/stigg/models/v1/product_update_product_params.rb', line 72

class ProductSettings < Stigg::Internal::Type::BaseModel
  # @!attribute subscription_cancellation_time
  #   Time when the subscription will be cancelled
  #
  #   @return [Symbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionCancellationTime]
  required :subscription_cancellation_time,
           enum: -> {
             Stigg::V1::ProductUpdateProductParams::ProductSettings::SubscriptionCancellationTime
           },
           api_name: :subscriptionCancellationTime

  # @!attribute subscription_end_setup
  #   Setup for the end of the subscription
  #
  #   @return [Symbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionEndSetup]
  required :subscription_end_setup,
           enum: -> { Stigg::V1::ProductUpdateProductParams::ProductSettings::SubscriptionEndSetup },
           api_name: :subscriptionEndSetup

  # @!attribute subscription_start_setup
  #   Setup for the start of the subscription
  #
  #   @return [Symbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionStartSetup]
  required :subscription_start_setup,
           enum: -> {
             Stigg::V1::ProductUpdateProductParams::ProductSettings::SubscriptionStartSetup
           },
           api_name: :subscriptionStartSetup

  # @!attribute downgrade_plan_id
  #   ID of the plan to downgrade to at the end of the billing period
  #
  #   @return [String, nil]
  optional :downgrade_plan_id, String, api_name: :downgradePlanId, nil?: true

  # @!attribute prorate_at_end_of_billing_period
  #   Indicates if the subscription should be prorated at the end of the billing
  #   period
  #
  #   @return [Boolean, nil]
  optional :prorate_at_end_of_billing_period,
           Stigg::Internal::Type::Boolean,
           api_name: :prorateAtEndOfBillingPeriod,
           nil?: true

  # @!attribute subscription_start_plan_id
  #   ID of the plan to start the subscription with
  #
  #   @return [String, nil]
  optional :subscription_start_plan_id, String, api_name: :subscriptionStartPlanId, nil?: true

  # @!method initialize(subscription_cancellation_time:, subscription_end_setup:, subscription_start_setup:, downgrade_plan_id: nil, prorate_at_end_of_billing_period: nil, subscription_start_plan_id: nil)
  #   Some parameter documentations has been truncated, see
  #   {Stigg::Models::V1::ProductUpdateProductParams::ProductSettings} for more
  #   details.
  #
  #   @param subscription_cancellation_time [Symbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionCancellationTime] Time when the subscription will be cancelled
  #
  #   @param subscription_end_setup [Symbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionEndSetup] Setup for the end of the subscription
  #
  #   @param subscription_start_setup [Symbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionStartSetup] Setup for the start of the subscription
  #
  #   @param downgrade_plan_id [String, nil] ID of the plan to downgrade to at the end of the billing period
  #
  #   @param prorate_at_end_of_billing_period [Boolean, nil] Indicates if the subscription should be prorated at the end of the billing perio
  #
  #   @param subscription_start_plan_id [String, nil] ID of the plan to start the subscription with

  # Time when the subscription will be cancelled
  #
  # @see Stigg::Models::V1::ProductUpdateProductParams::ProductSettings#subscription_cancellation_time
  module SubscriptionCancellationTime
    extend Stigg::Internal::Type::Enum

    END_OF_BILLING_PERIOD = :END_OF_BILLING_PERIOD
    IMMEDIATE = :IMMEDIATE
    SPECIFIC_DATE = :SPECIFIC_DATE

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Setup for the end of the subscription
  #
  # @see Stigg::Models::V1::ProductUpdateProductParams::ProductSettings#subscription_end_setup
  module SubscriptionEndSetup
    extend Stigg::Internal::Type::Enum

    DOWNGRADE_TO_FREE = :DOWNGRADE_TO_FREE
    CANCEL_SUBSCRIPTION = :CANCEL_SUBSCRIPTION

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Setup for the start of the subscription
  #
  # @see Stigg::Models::V1::ProductUpdateProductParams::ProductSettings#subscription_start_setup
  module SubscriptionStartSetup
    extend Stigg::Internal::Type::Enum

    PLAN_SELECTION = :PLAN_SELECTION
    TRIAL_PERIOD = :TRIAL_PERIOD
    FREE_PLAN = :FREE_PLAN

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#downgrade_plan_idString?

ID of the plan to downgrade to at the end of the billing period

Returns:

  • (String, nil)


105
# File 'lib/stigg/models/v1/product_update_product_params.rb', line 105

optional :downgrade_plan_id, String, api_name: :downgradePlanId, nil?: true

#prorate_at_end_of_billing_periodBoolean?

Indicates if the subscription should be prorated at the end of the billing period

Returns:

  • (Boolean, nil)


112
113
114
115
# File 'lib/stigg/models/v1/product_update_product_params.rb', line 112

optional :prorate_at_end_of_billing_period,
Stigg::Internal::Type::Boolean,
api_name: :prorateAtEndOfBillingPeriod,
nil?: true

#subscription_cancellation_timeSymbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionCancellationTime

Time when the subscription will be cancelled



77
78
79
80
81
# File 'lib/stigg/models/v1/product_update_product_params.rb', line 77

required :subscription_cancellation_time,
enum: -> {
  Stigg::V1::ProductUpdateProductParams::ProductSettings::SubscriptionCancellationTime
},
api_name: :subscriptionCancellationTime

#subscription_end_setupSymbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionEndSetup

Setup for the end of the subscription



87
88
89
# File 'lib/stigg/models/v1/product_update_product_params.rb', line 87

required :subscription_end_setup,
enum: -> { Stigg::V1::ProductUpdateProductParams::ProductSettings::SubscriptionEndSetup },
api_name: :subscriptionEndSetup

#subscription_start_plan_idString?

ID of the plan to start the subscription with

Returns:

  • (String, nil)


121
# File 'lib/stigg/models/v1/product_update_product_params.rb', line 121

optional :subscription_start_plan_id, String, api_name: :subscriptionStartPlanId, nil?: true

#subscription_start_setupSymbol, Stigg::Models::V1::ProductUpdateProductParams::ProductSettings::SubscriptionStartSetup

Setup for the start of the subscription



95
96
97
98
99
# File 'lib/stigg/models/v1/product_update_product_params.rb', line 95

required :subscription_start_setup,
enum: -> {
  Stigg::V1::ProductUpdateProductParams::ProductSettings::SubscriptionStartSetup
},
api_name: :subscriptionStartSetup

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/product_update_product_params.rb', line 150