Class: EPlat::Shopify::GraphQL::V202510::Input::Product::VariantsBulk

Inherits:
EPlat::Shopify::GraphQL::V202510::Input
  • Object
show all
Defined in:
lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2025_10/input/product/variants_bulk.rb

Constant Summary collapse

USES_ELEMENT_NAME_AS_INPUT_ROOT_KEY =
false
SUPPORTED_FIELDS =
%w[
	barcode
	compareAtPrice
	id
	inventoryItem
	inventoryPolicy
	inventoryQuantities
	mediaSrc
	metafields
	optionValues
	price
	taxable
].freeze
SUPPORTED_NAMED_ARGUMENT_FIELDS =
{
	variants: %w[
		barcode
		compareAtPrice
		id
		inventoryItem
		inventoryPolicy
		inventoryQuantities
		mediaSrc
		metafields
		optionValues
		price
		taxable
	],
	inventory_item: %w[
		cost
		countryCodeOfOrigin
		countryHarmonizedSystemCodes
		harmonizedSystemCode
		measurement
		provinceCodeOfOrigin
		requiresShipping
		sku
		tracked
	],
	option_values: %w[
		name
		optionId
		linkedMetafieldValue
		optionId
		optionName
	]
}.with_indifferent_access.freeze

Class Method Summary collapse

Class Method Details

.mutation_input(product, action) ⇒ Object



52
53
54
55
56
57
# File 'lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2025_10/input/product/variants_bulk.rb', line 52

def self.mutation_input(product, action)
	new(
		product_id: EPlat::Product.formatted_id(product.id),
		variants: product.as_json["product"]["variants"]
	).query_input
end