Class: Prestashop::Mapper::ProductSupplier
- Defined in:
- lib/prestashop/mapper/models/product_supplier.rb
Instance Attribute Summary collapse
-
#id_currency ⇒ Object
readonly
Returns the value of attribute id_currency.
-
#id_product ⇒ Object
readonly
Returns the value of attribute id_product.
-
#id_product_attribute ⇒ Object
readonly
Returns the value of attribute id_product_attribute.
-
#id_supplier ⇒ Object
readonly
Returns the value of attribute id_supplier.
-
#product_supplier_price_te ⇒ Object
readonly
Returns the value of attribute product_supplier_price_te.
-
#product_supplier_reference ⇒ Object
readonly
Returns the value of attribute product_supplier_reference.
Instance Method Summary collapse
- #hash ⇒ Object
-
#initialize(args = {}) ⇒ ProductSupplier
constructor
A new instance of ProductSupplier.
Methods inherited from Model
#hash_lang, #meta_description, #meta_keywords, #meta_title, model, resource
Methods included from Extension
Constructor Details
#initialize(args = {}) ⇒ ProductSupplier
Returns a new instance of ProductSupplier.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 10 def initialize args = {} @id_supplier = settings[:id_supplier] @id_product = args.fetch(:id_product) @id_product_attribute = args.fetch(:id_product_attribute, 0) @id_currency = args.fetch(:id_currency, 0) @product_supplier_reference = args[:product_supplier_reference] @product_supplier_price_te = args[:product_supplier_price_te] end |
Instance Attribute Details
#id_currency ⇒ Object (readonly)
Returns the value of attribute id_currency.
8 9 10 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 8 def id_currency @id_currency end |
#id_product ⇒ Object (readonly)
Returns the value of attribute id_product.
8 9 10 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 8 def id_product @id_product end |
#id_product_attribute ⇒ Object (readonly)
Returns the value of attribute id_product_attribute.
8 9 10 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 8 def id_product_attribute @id_product_attribute end |
#id_supplier ⇒ Object (readonly)
Returns the value of attribute id_supplier.
8 9 10 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 8 def id_supplier @id_supplier end |
#product_supplier_price_te ⇒ Object (readonly)
Returns the value of attribute product_supplier_price_te.
8 9 10 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 8 def product_supplier_price_te @product_supplier_price_te end |
#product_supplier_reference ⇒ Object (readonly)
Returns the value of attribute product_supplier_reference.
8 9 10 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 8 def product_supplier_reference @product_supplier_reference end |
Instance Method Details
#hash ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/prestashop/mapper/models/product_supplier.rb', line 21 def hash { id_product: id_product, id_product_attribute: id_product_attribute, id_supplier: id_supplier, product_supplier_reference: product_supplier_reference, product_supplier_price_te: product_supplier_price_te, id_currency: id_currency } end |