module Xeroizer::Record::ModelDefinitionHelper::InstanceMethods

Public Instance Methods

id() click to toggle source

Returns the value of the Xero primary key for this record if it exists.

# File lib/xeroizer/record/model_definition_helper.rb, line 87
def id
  self[self.class.primary_key_name]
end
id=(new_id) click to toggle source

Sets the value of the Xero primary key for this record if it exists.

# File lib/xeroizer/record/model_definition_helper.rb, line 92
def id=(new_id)
  parent.mark_dirty(self) if parent
  self[self.class.primary_key_name] = new_id
end