Class: SignwellSDK::Models::V1::DocumentTemplateCreateParams::Field

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/signwell_sdk/models/v1/document_template_create_params.rb

Defined Under Namespace

Modules: Option, Value

Instance Attribute Summary collapse

Class Method 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:, api_id: nil, is_other: nil) ⇒ Object

Detailed option object

Parameters:

  • name (String)

    Option display name

  • api_id (String) (defaults to: nil)

    Unique identifier for the option

  • is_other (Boolean) (defaults to: nil)

    Whether this is the special “Other” option



# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 491

Instance Attribute Details

#allow_otherBoolean?

Whether to allow “Other” option with text input (for dropdown/select fields only)

Returns:

  • (Boolean, nil)


393
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 393

optional :allow_other, SignwellSDK::Internal::Type::Boolean

#api_idString?

Unique identifier of the field. Useful when needing to reference specific field values or update a document and its fields.

Returns:

  • (String, nil)


400
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 400

optional :api_id, String

#date_formatSymbol, ...

Date fields only: date format to use for the field. Valid values: MM/DD/YYYY, DD/MM/YYYY, YYYY/MM/DD, Month DD, YYYY, and MM/DD/YYYY hh:mm:ss a. Defaults to MM/DD/YYYY.

Returns:



408
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 408

optional :date_format, enum: -> { SignwellSDK::DateFormat }

#default_optionString?

Default selected option (for dropdown/select fields only)

Returns:

  • (String, nil)


414
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 414

optional :default_option, String

#fixed_widthBoolean?

Text fields only: whether the field width will stay fixed and text will display in multiple lines, rather than one long line. If set to ‘false` the field width will automatically grow horizontally to fit text on one line. Defaults to `false`.

Returns:

  • (Boolean, nil)


423
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 423

optional :fixed_width, SignwellSDK::Internal::Type::Boolean

#heightFloat?

Height of the field (in pixels). Maximum height varies by field type: Signature/Initials (200px), others (74px). When using text tags if the height is greater than the maximum height, the height will be set to the maximum height.

Returns:

  • (Float, nil)


431
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 431

optional :height, Float

#labelString?

Text and Date fields only: label that is displayed when the field is empty.

Returns:

  • (String, nil)


437
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 437

optional :label, String

#lock_sign_dateBoolean?

Date fields only: makes fields readonly and automatically populates with the date the recipient signed. Defaults to ‘false`.

Returns:

  • (Boolean, nil)


444
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 444

optional :lock_sign_date, SignwellSDK::Internal::Type::Boolean

#nameString?

Checkbox fields only. At least 2 checkbox fields in an array of fields must be assigned to the same recipient and grouped with selection requirements.

Returns:

  • (String, nil)


451
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 451

optional :name, String

#optionsArray<String, SignwellSDK::Models::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption>?

Array of dropdown options (for dropdown/select fields only)



457
458
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 457

optional :options,
-> { SignwellSDK::Internal::Type::ArrayOf[union: SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option] }

#pageInteger

The page number within the file. If the page does not exist within the file then the field won’t be created.

Returns:

  • (Integer)


357
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 357

required :page, Integer

#placeholder_idString

Unique identifier of the placeholder assigned to the field.

Returns:

  • (String)


363
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 363

required :placeholder_id, String

#requiredBoolean?

Whether the field must be completed by the recipient. Defaults to ‘true` except for checkbox type fields.

Returns:

  • (Boolean, nil)


465
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 465

optional :required, SignwellSDK::Internal::Type::Boolean

#typeSymbol, SignwellSDK::Models::FieldType

Field type of the field. Valid field types: initials, signatures, checkbox, date, and text. To autofill fields with contact data, use an autofill field type. To group checkbox fields, enter an api_id for each checkbox and add the checkbox_groups parameter.

Returns:



372
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 372

required :type, enum: -> { SignwellSDK::FieldType }

#validationSymbol, ...

Text fields only: optional validation for field values. Valid values: numbers, letters, email_address, us_phone_number, us_zip_code, us_ssn, us_age, alphanumeric, us_bank_routing_number, us_bank_account.

Returns:



473
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 473

optional :validation, enum: -> { SignwellSDK::TextValidation }

#valueString, ...

Varies according to the field type. Text fields accept strings or numbers. Date fields accept Iso8601 date strings. CheckBoxes accept booleans. Signature and Initials fields can’t be signed through API requests. Autofill text fields accept strings or numbers.

Returns:

  • (String, Boolean, Float, nil)


482
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 482

optional :value, union: -> { SignwellSDK::V1::DocumentTemplateCreateParams::Field::Value }

#widthFloat?

Width of the field (in pixels). For text fields, width will auto-grow unless ‘fixed_width` is true.

Returns:

  • (Float, nil)


489
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 489

optional :width, Float

#xFloat

Horizontal value in the coordinates of the field (in pixels). Coordinates are specific to the page where fields are located.

Returns:

  • (Float)


379
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 379

required :x, Float

#y_Float

Vertical value in the coordinates of the field (in pixels). Coordinates are specific to the page where fields are located.

Returns:

  • (Float)


386
# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 386

required :y_, Float, api_name: :y

Class Method Details

.variantsArray(String, SignwellSDK::Models::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption)



# File 'lib/signwell_sdk/models/v1/document_template_create_params.rb', line 573