Class: Gemgento::API::SOAP::Catalog::ProductAttributeSet

Inherits:
Object
  • Object
show all
Defined in:
lib/gemgento/api/soap/catalog/product_attribute_set.rb

Class Method Summary collapse

Class Method Details

.attribute_addObject



43
44
45
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 43

def self.attribute_add
  # TODO: add an attribute to a set on Magento
end

.attribute_removeObject



47
48
49
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 47

def self.attribute_remove
  # TODO: remove an attribute from a set on Magento
end

.createObject

Create a new product attribute set in Magento



34
35
36
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 34

def self.create
  # TODO: create a new product attribute set on Magento
end

.fetch_allVoid

Pull all Magento ProductAttributeSet data into Gemgento.

Returns:

  • (Void)


10
11
12
13
14
15
16
17
18
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 10

def self.fetch_all
  response = list

  if response.success?
    response.body[:result][:item].each do |product_attribute_set|
      sync_magento_to_local(product_attribute_set)
    end
  end
end

.group_addObject



51
52
53
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 51

def self.group_add
  # TODO: add a new group for attributes in the set on Magento
end

.group_removeObject



55
56
57
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 55

def self.group_remove
  # TODO: remove a group of attributes in the set on Magento
end

.group_renameObject



59
60
61
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 59

def self.group_rename
  # TODO: rename a group in the set on Magento
end

.listGemgento::MagentoResponse

Get a list of ProductAttributeSets from Magento.



23
24
25
26
27
28
29
30
31
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 23

def self.list
  response = MagentoApi.create_call(:catalog_product_attribute_set_list)

  if response.success?
    response.body[:result][:item] = [response.body[:result][:item]] unless response.body[:result][:item].is_a? Array
  end

  return response
end

.updateObject

Update existing Magento product attribute set



39
40
41
# File 'lib/gemgento/api/soap/catalog/product_attribute_set.rb', line 39

def self.update
  # TODO: update a product attribute set on Magento
end