module NetSuite::Support::Attributes

Public Instance Methods

attributes() click to toggle source
# File lib/netsuite/support/attributes.rb, line 5
def attributes
  @attributes ||= {}
end
attributes=(attributes) click to toggle source
# File lib/netsuite/support/attributes.rb, line 9
def attributes=(attributes)
  @attributes = attributes
end
initialize_from_attributes_hash(attributes = {}) click to toggle source
# File lib/netsuite/support/attributes.rb, line 13
def initialize_from_attributes_hash(attributes = {})
  attributes.select { |k,v| self.class.fields.include?(k) }.each do |k,v|
    send("#{k}=", v)
  end
  self.klass = attributes[:class] if attributes[:class]
end