Class: Gemgento::ProductCategory

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
ProductTouches
Defined in:
app/models/gemgento/product_category.rb

Overview

Author:

  • Gemgento LLC

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sync_neededObject

Returns the value of attribute sync_needed.



20
21
22
# File 'app/models/gemgento/product_category.rb', line 20

def sync_needed
  @sync_needed
end

Instance Method Details

#update_magento_category_productObject



22
23
24
25
26
27
28
29
30
31
32
# File 'app/models/gemgento/product_category.rb', line 22

def update_magento_category_product
  response = API::SOAP::Catalog::Category.update_product(self)

  if response.success?
    self.sync_needed = false
    return true
  else
    errors.add(:base, response.body[:faultstring])
    return false
  end
end