Sha256: 9b7bf906a58d3a4dbc4e938aa9205a86ec8d99366f8834ed0a97076bbd19453a

Contents?: true

Size: 1.07 KB

Versions: 4

Compression:

Stored size: 1.07 KB

Contents

module TophatterMerchant
  class Metadata < Resource
    class << self
      def all
        get(url: "#{path}.json")
      end

      def categories
        get(url: "#{path}/categories.json")
      end

      def conditions
        get(url: "#{path}/conditions.json")
      end

      def brands
        get(url: "#{path}/brands.json")
      end

      def materials
        get(url: "#{path}/materials.json")
      end

      def sizes
        get(url: "#{path}/sizes.json")
      end

      def colors
        get(url: "#{path}/colors.json")
      end

      def countries
        get(url: "#{path}/countries.json")
      end

      def country_codes
        get(url: "#{path}/country_codes.json")
      end

      def states
        get(url: "#{path}/states.json")
      end

      def provinces
        get(url: "#{path}/provinces.json")
      end

      def territories
        get(url: "#{path}/territories.json")
      end

      def carriers
        get(url: "#{path}/carriers.json")
      end

      protected

      def path
        super + '/metadata'
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tophatter-merchant-1.3.3 lib/tophatter_merchant/metadata.rb
tophatter-merchant-1.3.2 lib/tophatter_merchant/metadata.rb
tophatter-merchant-1.3.1 lib/tophatter_merchant/metadata.rb
tophatter-merchant-1.3.0 lib/tophatter_merchant/metadata.rb