Class: NetSuite::Records::CustomField

Inherits:
Object
  • Object
show all
Includes:
Support::Fields, Support::Records
Defined in:
lib/netsuite/records/custom_field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::Records

#netsuite_type, netsuite_type, #record_type, #record_type_without_namespace, record_type_without_namespace, #refresh, #to_attributes!, #to_record

Methods included from Namespaces::PlatformCore

#record_namespace

Methods included from Support::Attributes

#attributes, #attributes=, #initialize_from_attributes_hash

Methods included from Support::Fields

included

Constructor Details

#initialize(attributes = {}) ⇒ CustomField

Returns a new instance of CustomField.



10
11
12
13
14
15
# File 'lib/netsuite/records/custom_field.rb', line 10

def initialize(attributes = {})
  @script_id   = attributes.delete(:script_id) || attributes.delete(:@script_id)
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
  @type        = attributes.delete(:type) || attributes.delete(:"@xsi:type")
  self.attributes = attributes
end

Instance Attribute Details

#internal_idObject (readonly)

Returns the value of attribute internal_id.



7
8
9
# File 'lib/netsuite/records/custom_field.rb', line 7

def internal_id
  @internal_id
end

#script_idObject (readonly)

Returns the value of attribute script_id.



7
8
9
# File 'lib/netsuite/records/custom_field.rb', line 7

def script_id
  @script_id
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/netsuite/records/custom_field.rb', line 8

def type
  @type
end

Instance Method Details

#valueObject



17
18
19
# File 'lib/netsuite/records/custom_field.rb', line 17

def value
  attributes[:value]
end