Class: Seko::Product

Inherits:
Object
  • Object
show all
Defined in:
lib/seko/product.rb

Class Method Summary collapse

Class Method Details

.format(attributes) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/seko/product.rb', line 12

def self.format(attributes)
  {
    "Request" => {
      "List" => {
        "SupplierMapping" => supplier
      },
      "ProductMaster" => {
        "ProductCode"        => attributes[:upc],
        "ProductDescription" => Filter.parse(attributes[:description])
      }
    }
  }
end

.supplierObject



4
5
6
7
8
9
10
# File 'lib/seko/product.rb', line 4

def self.supplier
  {
    "SupplierCode"        => Seko.config[:supplier_code],
    "SupplierDescription" => Seko.config[:supplier_description],
    "UOM"                 => Seko.config[:supplier_uom]
  }
end