module Support
  module Services
    class OwsProductPhysical
      include HTTParty

      base_uri DOMAINS[:ows_product_physical]

      class << self
        def create_product(session_id, data)
          path = "/product"

          options = {
            body: data.to_json,
            headers: {
              "Content-Type" => "application/json",
              "session" => session_id
            }
          }

          response = post(path, options)

          JSON.parse(response.body)
        end
      end
    end
  end
end
