Class: EPlat::Shopify::Product
- Inherits:
-
Product
- Object
- Product
- EPlat::Shopify::Product
show all
- Defined in:
- lib/e_plat/resource/platform_specific/shopify/product.rb
Defined Under Namespace
Classes: Image, Option, Variant
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.delete(id, options = {}) ⇒ Object
51
52
53
54
55
56
57
58
|
# File 'lib/e_plat/resource/platform_specific/shopify/product.rb', line 51
def self.delete(id, options = {})
if client.api_version == "2024_01"
super(id, options)
else
resource = new(id: id)
resource.delete
end
end
|
Instance Method Details
60
61
62
|
# File 'lib/e_plat/resource/platform_specific/shopify/product.rb', line 60
def graphql_input
"EPlat::Shopify::GraphQL::#{EPlat.shopify_graphql_version}::Input::Product".constantize
end
|
64
65
66
|
# File 'lib/e_plat/resource/platform_specific/shopify/product.rb', line 64
def product_variants_bulk_input
"EPlat::Shopify::GraphQL::#{EPlat.shopify_graphql_version}::Input::Product::VariantsBulk".constantize
end
|
#variants_bulk_update_fragment ⇒ Object
68
69
70
71
72
|
# File 'lib/e_plat/resource/platform_specific/shopify/product.rb', line 68
def variants_bulk_update_fragment
graphql_proc = eval "EPlat::Shopify::GraphQL::#{ EPlat.shopify_graphql_version }::Mutation.product_variants_bulk_update_fragment"
graphql_proc.call product_variants_bulk_input.mutation_input(self, :update)
end
|