Method: Magentwo::Base#save

Defined in:
lib/model/base.rb

#saveObject



19
20
21
22
23
24
# File 'lib/model/base.rb', line 19

def save
  self.validate
  self.check_presence self.class.unique_identifier
  response = Magentwo::Base.call :put, "#{self.class.base_path}/#{self.send(self.class.unique_identifier)}", self
  self.class.new response
end