Class: Magento::ProductAttribute

Inherits:
Base
  • Object
show all
Defined in:
lib/magento/product_attribute.rb

Overview

www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_attribute 100 Requested store view not found. 101 Requested attribute not found.

Instance Attribute Summary

Attributes inherited from Base

#attributes

Class Method Summary collapse

Methods included from Base::ClassMethods

#api_path, #commit

Methods included from Base::InstanceMethods

#id, #id=, #initialize, #method_missing, #object_attributes=

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Magento::Base::InstanceMethods

Class Method Details

.current_store(*args) ⇒ Object

catalog_product_attribute.currentStore Set/Get current store view

Return: int

Arguments:

mixed storeView - store view id or code (optional)



30
31
32
# File 'lib/magento/product_attribute.rb', line 30

def current_store(*args)
  commit("currentStore", *args)
end

.list(*args) ⇒ Object

catalog_product_attribute.list Retrieve attribute list

Return: array

Arguments:

int setId - attribute set ID



15
16
17
18
19
20
# File 'lib/magento/product_attribute.rb', line 15

def list(*args)
  results = commit("list", *args)
  results.collect do |result|
    new(result)
  end
end

.options(*args) ⇒ Object

catalog_product_attribute.options Retrieve attribute options

Return: array

Arguments:

mixed attributeId - attribute ID or code mixed storeView - store view ID or code (optional)



44
45
46
# File 'lib/magento/product_attribute.rb', line 44

def options(*args)
  commit("options", *args)
end