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(name:, id: nil, order: nil, placeholder: nil, required: nil, field_type: :text) ⇒ Object

Parameters:

  • name (String)

    The name of the custom field.

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

    The ID of the custom field (if being updated)

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

    The order of the field.

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

    The placeholder value of the field.

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

    Whether or not the field is required.

  • field_type (Symbol, :text) (defaults to: :text)

    The type of the custom field.



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/whop_sdk/models/product_create_params.rb', line 251

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)


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

required :field_type, const: :text

#idString?

The ID of the custom field (if being updated)

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#nameString

The name of the custom field.

Returns:

  • (String)


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

required :name, String

#orderInteger?

The order of the field.

Returns:

  • (Integer, nil)


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

optional :order, Integer, nil?: true

#placeholderString?

The placeholder value of the field.

Returns:

  • (String, nil)


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

optional :placeholder, String, nil?: true

#requiredBoolean?

Whether or not the field is required.

Returns:

  • (Boolean, nil)


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

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