Class: Responsys::Api::Object::FieldType
- Inherits:
-
Object
- Object
- Responsys::Api::Object::FieldType
- Includes:
- Exceptions
- Defined in:
- lib/responsys/api/object/field_type.rb
Constant Summary collapse
- FIELD_TYPES =
%w(STR500 STR4000 NUMBER TIMESTAMP INTEGER)
Instance Attribute Summary collapse
-
#field_type_string ⇒ Object
Returns the value of attribute field_type_string.
Instance Method Summary collapse
-
#initialize(field_type) ⇒ FieldType
constructor
A new instance of FieldType.
- #to_api ⇒ Object
Constructor Details
#initialize(field_type) ⇒ FieldType
Returns a new instance of FieldType.
9 10 11 12 13 14 15 |
# File 'lib/responsys/api/object/field_type.rb', line 9 def initialize(field_type) if FIELD_TYPES.include? field_type @field_type_string = field_type else raise ParameterException, Responsys::Helper.("api.object.field_type.incorrect_field_type") end end |
Instance Attribute Details
#field_type_string ⇒ Object
Returns the value of attribute field_type_string.
6 7 8 |
# File 'lib/responsys/api/object/field_type.rb', line 6 def field_type_string @field_type_string end |
Instance Method Details
#to_api ⇒ Object
17 18 19 |
# File 'lib/responsys/api/object/field_type.rb', line 17 def to_api @field_type_string end |