Sha256: 6f6faad3ccf3e2378ba40b0bf592cfc4212598fa5753485a78dbff615b51c2f4

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

module GoPuff
  module ProdcatApi
    class FetchProduct < FetchProducts
      def initialize(product_id:, location_id:, point_of_sale: 'US', headers: {}, thread: nil)
        super(
          product_ids: [product_id],
          location_id: location_id,
          point_of_sale: point_of_sale,
          headers: headers,
          thread: thread,
        )
      end

      def call
        super&.first
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
go_puff-prodcat_api-0.9.3.pre.beta.1 lib/go_puff/prodcat_api/fetch_product.rb