Class: Responsys::Api::Object::FieldType

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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.get_message("api.object.field_type.incorrect_field_type")
  end
end

Instance Attribute Details

#field_type_stringObject

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_apiObject



17
18
19
# File 'lib/responsys/api/object/field_type.rb', line 17

def to_api
  @field_type_string
end