Class: WhopSDK::Models::PlanCreateParams::CustomField
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::PlanCreateParams::CustomField
- Defined in:
- lib/whop_sdk/models/plan_create_params.rb,
sig/whop_sdk/models/plan_create_params.rbs
Defined Under Namespace
Modules: FieldType
Instance Attribute Summary collapse
-
#field_type ⇒ Symbol, ...
The type of the custom field.
-
#id ⇒ String?
The ID of the custom field (if being updated).
-
#name ⇒ String?
The name of the custom field.
-
#order ⇒ Integer?
The order of the field.
-
#placeholder ⇒ String?
An example response displayed in the input field.
-
#required ⇒ Boolean?
Whether or not the field is required.
Instance Method Summary collapse
- #initialize(id: nil, field_type: nil, name: nil, order: nil, placeholder: nil, required: nil) ⇒ Object constructor
- #to_hash ⇒ {
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(id: nil, field_type: nil, name: nil, order: nil, placeholder: nil, required: nil) ⇒ Object
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 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 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 235 class CustomField < WhopSDK::Internal::Type::BaseModel # @!attribute id # The ID of the custom field (if being updated). # # @return [String, nil] optional :id, String # @!attribute field_type # The type of the custom field. # # @return [Symbol, WhopSDK::Models::PlanCreateParams::CustomField::FieldType, nil] optional :field_type, enum: -> { WhopSDK::PlanCreateParams::CustomField::FieldType } # @!attribute name # The name of the custom field. # # @return [String, nil] optional :name, String # @!attribute order # The order of the field. # # @return [Integer, nil] optional :order, Integer # @!attribute placeholder # An example response displayed in the input 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 # @!method initialize(id: nil, field_type: nil, name: nil, order: nil, placeholder: nil, required: nil) # @param id [String] The ID of the custom field (if being updated). # # @param field_type [Symbol, WhopSDK::Models::PlanCreateParams::CustomField::FieldType] The type of the custom field. # # @param name [String] The name of the custom field. # # @param order [Integer] The order of the field. # # @param placeholder [String, nil] An example response displayed in the input field. # # @param required [Boolean] Whether or not the field is required. # The type of the custom field. # # @see WhopSDK::Models::PlanCreateParams::CustomField#field_type module FieldType extend WhopSDK::Internal::Type::Enum TEXT = :text # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#field_type ⇒ Symbol, ...
The type of the custom field.
246 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 246 optional :field_type, enum: -> { WhopSDK::PlanCreateParams::CustomField::FieldType } |
#id ⇒ String?
The ID of the custom field (if being updated).
240 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 240 optional :id, String |
#name ⇒ String?
The name of the custom field.
252 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 252 optional :name, String |
#order ⇒ Integer?
The order of the field.
258 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 258 optional :order, Integer |
#placeholder ⇒ String?
An example response displayed in the input field.
264 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 264 optional :placeholder, String, nil?: true |
#required ⇒ Boolean?
Whether or not the field is required.
270 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 270 optional :required, WhopSDK::Internal::Type::Boolean |
Instance Method Details
#to_hash ⇒ {
212 |
# File 'sig/whop_sdk/models/plan_create_params.rbs', line 212
def to_hash: -> {
|