Sha256: 6c768c076f3bce0f62ff78519e2b0d7fa080ab4860ec741244cd4e8d841202b0
Contents?: true
Size: 550 Bytes
Versions: 5
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true require "shopify_cli" module Extension module Tasks class GetProduct < ShopifyCli::Task API_VERSION = "2021-07" GRAPHQL_FILE = "get_variant_id" def call(context, shop) response = ShopifyCli::AdminAPI.query( context, GRAPHQL_FILE, shop: shop, api_version: API_VERSION ) context.abort(context.message("tasks.errors.store_error")) if response.nil? Converters::ProductConverter.from_hash(response) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems