Class: Mailtrap::ContactField
- Inherits:
-
Struct
- Object
- Struct
- Mailtrap::ContactField
- Defined in:
- lib/mailtrap/contact_field.rb
Overview
Data Transfer Object for Contact Field
Instance Attribute Summary collapse
-
#data_type ⇒ String
readonly
The data type of the field Allowed values: text, integer, float, boolean, date.
-
#id ⇒ Integer
readonly
The contact field ID.
-
#merge_tag ⇒ String
readonly
Personalize your campaigns by adding a merge tag.
-
#name ⇒ String
readonly
The name of the contact field (max 80 characters).
Instance Method Summary collapse
-
#to_h ⇒ Hash
The contact field attributes as a hash.
Instance Attribute Details
#data_type ⇒ String (readonly)
The data type of the field Allowed values: text, integer, float, boolean, date
12 13 14 |
# File 'lib/mailtrap/contact_field.rb', line 12 def data_type @data_type end |
#id ⇒ Integer (readonly)
The contact field ID
12 13 14 |
# File 'lib/mailtrap/contact_field.rb', line 12 def id @id end |
#merge_tag ⇒ String (readonly)
Personalize your campaigns by adding a merge tag. This field will be replaced with unique contact details for each recipient (max 80 characters)
12 13 14 |
# File 'lib/mailtrap/contact_field.rb', line 12 def merge_tag @merge_tag end |
#name ⇒ String (readonly)
The name of the contact field (max 80 characters)
12 13 14 |
# File 'lib/mailtrap/contact_field.rb', line 12 def name @name end |
Instance Method Details
#to_h ⇒ Hash
Returns The contact field attributes as a hash.
14 15 16 |
# File 'lib/mailtrap/contact_field.rb', line 14 def to_h super.compact end |