Class: WhopSDK::Models::PlanUpdateParams::CustomField

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/plan_update_params.rb

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(billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, offer_cancel_discount: nil, override_tax_type: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::PlanUpdateParams for more details.

Parameters:

  • billing_period (Integer, nil) (defaults to: nil)

    The interval at which the plan charges (renewal plans).

  • currency (Symbol, WhopSDK::Models::Currency, nil) (defaults to: nil)

    The available currencies on the platform

  • custom_fields (Array<WhopSDK::Models::PlanUpdateParams::CustomField>, nil) (defaults to: nil)

    An array of custom field objects.

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

    The description of the plan.

  • expiration_days (Integer, nil) (defaults to: nil)

    The interval at which the plan charges (expiration plans).

  • image (WhopSDK::Models::PlanUpdateParams::Image, nil) (defaults to: nil)

    An image for the plan. This will be visible on the product page to customers.

  • initial_price (Float, nil) (defaults to: nil)

    An additional amount charged upon first purchase.

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

    A personal description or notes section for the business.

  • offer_cancel_discount (Boolean, nil) (defaults to: nil)

    Whether or not to offer a discount to cancel a subscription.

  • override_tax_type (Symbol, WhopSDK::Models::TaxType, nil) (defaults to: nil)

    Whether or not the tax is included in a plan’s price (or if it hasn’t been set u

  • renewal_price (Float, nil) (defaults to: nil)

    The amount the customer is charged every billing period.

  • stock (Integer, nil) (defaults to: nil)

    The number of units available for purchase.

  • strike_through_initial_price (Float, nil) (defaults to: nil)

    The price to display with a strikethrough for the initial price. Provided as a n

  • strike_through_renewal_price (Float, nil) (defaults to: nil)

    The price to display with a strikethrough for the renewal price. Provided as a n

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

    The title of the plan. This will be visible on the product page to customers.

  • trial_period_days (Integer, nil) (defaults to: nil)

    The number of free trial days added before a renewal plan.

  • unlimited_stock (Boolean, nil) (defaults to: nil)

    Limits/doesn’t limit the number of units available for purchase.

  • visibility (Symbol, WhopSDK::Models::Visibility, nil) (defaults to: nil)

    Visibility of a resource

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/whop_sdk/models/plan_update_params.rb', line 165

class CustomField < WhopSDK::Internal::Type::BaseModel
  # @!attribute field_type
  #   The type of the custom field.
  #
  #   @return [Symbol, :text]
  required :field_type, const: :text

  # @!attribute name
  #   The name of the custom field.
  #
  #   @return [String]
  required :name, String

  # @!attribute id
  #   The ID of the custom field (if being updated)
  #
  #   @return [String, nil]
  optional :id, String, nil?: true

  # @!attribute order
  #   The order of the field.
  #
  #   @return [Integer, nil]
  optional :order, Integer, nil?: true

  # @!attribute placeholder
  #   The placeholder value of the field.
  #
  #   @return [String, nil]
  optional :placeholder, String, nil?: true

  # @!attribute required
  #   Whether or not the field is required.
  #
  #   @return [Boolean, nil]
  optional :required, WhopSDK::Internal::Type::Boolean, nil?: true

  # @!method initialize(name:, id: nil, order: nil, placeholder: nil, required: nil, field_type: :text)
  #   @param name [String] The name of the custom field.
  #
  #   @param id [String, nil] The ID of the custom field (if being updated)
  #
  #   @param order [Integer, nil] The order of the field.
  #
  #   @param placeholder [String, nil] The placeholder value of the field.
  #
  #   @param required [Boolean, nil] Whether or not the field is required.
  #
  #   @param field_type [Symbol, :text] The type of the custom field.
end

Instance Attribute Details

#field_typeSymbol, :text

The type of the custom field.

Returns:

  • (Symbol, :text)


170
# File 'lib/whop_sdk/models/plan_update_params.rb', line 170

required :field_type, const: :text

#idString?

The ID of the custom field (if being updated)

Returns:

  • (String, nil)


182
# File 'lib/whop_sdk/models/plan_update_params.rb', line 182

optional :id, String, nil?: true

#nameString

The name of the custom field.

Returns:

  • (String)


176
# File 'lib/whop_sdk/models/plan_update_params.rb', line 176

required :name, String

#orderInteger?

The order of the field.

Returns:

  • (Integer, nil)


188
# File 'lib/whop_sdk/models/plan_update_params.rb', line 188

optional :order, Integer, nil?: true

#placeholderString?

The placeholder value of the field.

Returns:

  • (String, nil)


194
# File 'lib/whop_sdk/models/plan_update_params.rb', line 194

optional :placeholder, String, nil?: true

#requiredBoolean?

Whether or not the field is required.

Returns:

  • (Boolean, nil)


200
# File 'lib/whop_sdk/models/plan_update_params.rb', line 200

optional :required, WhopSDK::Internal::Type::Boolean, nil?: true