Class: Dodopayments::Models::CustomField
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::CustomField
- Defined in:
- lib/dodopayments/models/custom_field.rb
Defined Under Namespace
Modules: FieldType
Instance Attribute Summary collapse
-
#field_type ⇒ Symbol, Dodopayments::Models::CustomField::FieldType
Type of field determining validation rules.
-
#key ⇒ String
Unique identifier for this field (used as key in responses).
-
#label ⇒ String
Display label shown to customer.
-
#options ⇒ Array<String>?
Options for dropdown type (required for dropdown, ignored for others).
-
#placeholder ⇒ String?
Placeholder text for the input.
-
#required ⇒ Boolean?
Whether this field is required.
Instance Method Summary collapse
-
#initialize(field_type:, key:, label:, options: nil, placeholder: nil, required: nil) ⇒ Object
constructor
Definition of a custom field for checkout.
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(field_type:, key:, label:, options: nil, placeholder: nil, required: nil) ⇒ Object
Definition of a custom field for checkout
|
|
# File 'lib/dodopayments/models/custom_field.rb', line 42
|
Instance Attribute Details
#field_type ⇒ Symbol, Dodopayments::Models::CustomField::FieldType
Type of field determining validation rules
10 |
# File 'lib/dodopayments/models/custom_field.rb', line 10 required :field_type, enum: -> { Dodopayments::CustomField::FieldType } |
#key ⇒ String
Unique identifier for this field (used as key in responses)
16 |
# File 'lib/dodopayments/models/custom_field.rb', line 16 required :key, String |
#label ⇒ String
Display label shown to customer
22 |
# File 'lib/dodopayments/models/custom_field.rb', line 22 required :label, String |
#options ⇒ Array<String>?
Options for dropdown type (required for dropdown, ignored for others)
28 |
# File 'lib/dodopayments/models/custom_field.rb', line 28 optional :options, Dodopayments::Internal::Type::ArrayOf[String], nil?: true |
#placeholder ⇒ String?
Placeholder text for the input
34 |
# File 'lib/dodopayments/models/custom_field.rb', line 34 optional :placeholder, String, nil?: true |
#required ⇒ Boolean?
Whether this field is required
40 |
# File 'lib/dodopayments/models/custom_field.rb', line 40 optional :required, Dodopayments::Internal::Type::Boolean |