Class: WhopSDK::Models::ProductCreateParams::PlanOptions::CustomField

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/product_create_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(base_currency: nil, billing_period: nil, custom_fields: nil, initial_price: nil, plan_type: nil, release_method: nil, renewal_price: nil, visibility: nil) ⇒ Object

The details to assign an autogenerated plan.

Parameters:

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

    The available currencies on the platform

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

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

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

    An array of custom field objects.

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

    An additional amount charged upon first purchase.

  • plan_type (Symbol, WhopSDK::Models::PlanType, nil) (defaults to: nil)

    The type of plan that can be attached to an access pass

  • release_method (Symbol, WhopSDK::Models::ReleaseMethod, nil) (defaults to: nil)

    The methods of how a plan can be released.

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

    The amount the customer is charged every billing period.

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

    Visibility of a resource



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/whop_sdk/models/product_create_params.rb', line 305

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)


310
# File 'lib/whop_sdk/models/product_create_params.rb', line 310

required :field_type, const: :text

#idString?

The ID of the custom field (if being updated)

Returns:

  • (String, nil)


322
# File 'lib/whop_sdk/models/product_create_params.rb', line 322

optional :id, String, nil?: true

#nameString

The name of the custom field.

Returns:

  • (String)


316
# File 'lib/whop_sdk/models/product_create_params.rb', line 316

required :name, String

#orderInteger?

The order of the field.

Returns:

  • (Integer, nil)


328
# File 'lib/whop_sdk/models/product_create_params.rb', line 328

optional :order, Integer, nil?: true

#placeholderString?

The placeholder value of the field.

Returns:

  • (String, nil)


334
# File 'lib/whop_sdk/models/product_create_params.rb', line 334

optional :placeholder, String, nil?: true

#requiredBoolean?

Whether or not the field is required.

Returns:

  • (Boolean, nil)


340
# File 'lib/whop_sdk/models/product_create_params.rb', line 340

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