Sha256: e5cc384a19d56f68b11725f5c1ed8452e5c0679ac01d6940e8b2f11e27338372

Contents?: true

Size: 819 Bytes

Versions: 11

Compression:

Stored size: 819 Bytes

Contents

module Seko
  class Company

    def self.format(company)
      {
        "Request" => {
          "Company" => {
            "CompanyCode"        => company[:code],
            "CompanyDescription" => company[:description],
            "CompanyType"        => "Ship To"
          },
          "List" => {
            "Address" => address(company[:address])
          }
        }
      }
    end

    def self.address(address)
      {
        "AddressLine1" => address[:address1],
        "AddressLine2" => address[:address2],
        "AddressLine3" => address[:address3],
        "AddressType"  => "Delivery",
        "City"         => address[:city],
        "CountryCode"  => address[:country],
        "County"       => address[:country_name],
        "PostcodeZip"  => address[:zipcode]
      }
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
seko-0.0.11 lib/seko/company.rb
seko-0.0.10 lib/seko/company.rb
seko-0.0.9 lib/seko/company.rb
seko-0.0.8 lib/seko/company.rb
seko-0.0.7 lib/seko/company.rb
seko-0.0.6 lib/seko/company.rb
seko-0.0.5 lib/seko/company.rb
seko-0.0.4 lib/seko/company.rb
seko-0.0.3 lib/seko/company.rb
seko-0.0.2 lib/seko/company.rb
seko-0.0.1 lib/seko/company.rb