Class: Magento::ProductTierPrice

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

Overview

www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_type 100 Product not exists. 101 Invalid data given. Details in error message. 102 Tier prices not updated. Details in error message.

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

.find_by_product_id_or_sku(id) ⇒ Object



34
35
36
# File 'lib/magento/product_tier_price.rb', line 34

def find_by_product_id_or_sku(id)
  list(id)
end

.info(*args) ⇒ Object

catalog_product_attribute_tier_price.info Retrieve product tier prices

Return: array - array of tier prices array(array(’website’ ⇒ …, ‘customer_group_id’ ⇒ …, ‘qty’ ⇒ …, ‘price’ ⇒ …))

Arguments:

mixed product - product ID or Sku



16
17
18
# File 'lib/magento/product_tier_price.rb', line 16

def info(*args)
  new(commit("info", *args))
end

.update(*args) ⇒ Object

catalog_product_attribute_tier_price.update Update product tier prices

Return: boolean

Arguments:

mixed product - product ID or Sku array tierPrices - array of tier prices

=>  array(array(’website’ ⇒ ..., ‘customer_group_id’ ⇒ ..., ‘qty’ ⇒ ..., ‘price’ ⇒ ...))


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

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