module Support
  module Services
    class OwsProduct
      include HTTParty

      base_uri DOMAINS[:ows_product]

      class << self
        # returns true if the upc is not in use or reserved for the orchard
        def upc_available?(upc)
          path = "/upc/available/#{upc}"
          response = head(path)

          response.code == 200
        end
      end
    end
  end
end
