e_plat 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/e_plat/mapping/shopify/v_2026_10/metafield.rb +26 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/order/billing_address.rb +14 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/order/shipping_address.rb +30 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/order.rb +26 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/product/image.rb +52 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/product/option.rb +45 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/product/variant/option_value.rb +58 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/product/variant.rb +179 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/product.rb +100 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/script_tag.rb +26 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/shop.rb +26 -0
- data/lib/e_plat/mapping/shopify/v_2026_10/webhook.rb +29 -0
- data/lib/e_plat/resource/collection.rb +9 -2
- data/lib/e_plat/resource/concerns/graph_q_lable.rb +54 -1
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_04/mutation/product/variant.rb +12 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_04/mutation/product.rb +8 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input/product/variant.rb +84 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input/product/variants_bulk.rb +56 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input/product.rb +36 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input.rb +133 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/mutation/product/variant.rb +98 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/mutation/product.rb +63 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/mutation.rb +5 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/query/product/variant.rb +44 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/query/product.rb +58 -0
- data/lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/query.rb +5 -0
- data/lib/e_plat/resource/platform_specific/shopify/product/variant.rb +6 -1
- data/lib/e_plat/version.rb +1 -1
- data/lib/e_plat.rb +2 -2
- metadata +23 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
module EPlat::Shopify::GraphQL::V202610::Query::Product
|
|
3
|
+
extend ActiveSupport::Concern
|
|
4
|
+
|
|
5
|
+
included do
|
|
6
|
+
|
|
7
|
+
def self.products
|
|
8
|
+
->(args) do
|
|
9
|
+
formatted_args = args.present? ? "(#{args})" : ""
|
|
10
|
+
|
|
11
|
+
<<~GRAPHQL
|
|
12
|
+
query getProducts {
|
|
13
|
+
products#{formatted_args} {
|
|
14
|
+
nodes {
|
|
15
|
+
#{EPlat::Shopify::Product.graphql_fields}
|
|
16
|
+
}
|
|
17
|
+
pageInfo {
|
|
18
|
+
endCursor
|
|
19
|
+
startCursor
|
|
20
|
+
hasNextPage
|
|
21
|
+
hasPreviousPage
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
GRAPHQL
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.product
|
|
30
|
+
->(args) do
|
|
31
|
+
formatted_args = args.present? ? "(#{args})" : ""
|
|
32
|
+
|
|
33
|
+
<<~GRAPHQL
|
|
34
|
+
query getProduct {
|
|
35
|
+
product#{formatted_args} {
|
|
36
|
+
#{EPlat::Shopify::Product.graphql_fields}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
GRAPHQL
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.products_count
|
|
44
|
+
->(args) do
|
|
45
|
+
formatted_args = args.present? ? "(#{args})" : ""
|
|
46
|
+
|
|
47
|
+
<<~GRAPHQL
|
|
48
|
+
query productsCount {
|
|
49
|
+
productsCount#{formatted_args} {
|
|
50
|
+
count
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
GRAPHQL
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -25,7 +25,7 @@ class EPlat::Shopify::Product::Variant < EPlat::Product::Variant
|
|
|
25
25
|
createdAt
|
|
26
26
|
updatedAt
|
|
27
27
|
taxable
|
|
28
|
-
barcode
|
|
28
|
+
#{ "barcode" if barcode_field_supported? }
|
|
29
29
|
image {
|
|
30
30
|
#{ EPlat::Shopify::Product::Image.graphql_fields }
|
|
31
31
|
}
|
|
@@ -47,6 +47,11 @@ class EPlat::Shopify::Product::Variant < EPlat::Product::Variant
|
|
|
47
47
|
GRAPHQL
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
# Shopify deprecated the single barcode field in 2026-10 in favour of the barcodes connection
|
|
51
|
+
def self.barcode_field_supported?
|
|
52
|
+
EPlat.config.shopify_api_version < "2026_10"
|
|
53
|
+
end
|
|
54
|
+
|
|
50
55
|
def graphql_input
|
|
51
56
|
"EPlat::Shopify::GraphQL::#{EPlat.shopify_graphql_version}::Input::Product::Variant".constantize
|
|
52
57
|
end
|
data/lib/e_plat/version.rb
CHANGED
data/lib/e_plat.rb
CHANGED
|
@@ -22,7 +22,7 @@ loader.setup
|
|
|
22
22
|
|
|
23
23
|
module EPlat
|
|
24
24
|
extend Dry::Configurable
|
|
25
|
-
SUPPORTED_SHOPIFY_API_VERSIONS = %w[2024_01 2024_07 2025_01 2025_10 2026_04].freeze
|
|
25
|
+
SUPPORTED_SHOPIFY_API_VERSIONS = %w[2024_01 2024_07 2025_01 2025_10 2026_04 2026_10].freeze
|
|
26
26
|
SUPPORTED_BIGCOMMERCE_API_VERSIONS = ['3'].freeze
|
|
27
27
|
SUPPORTED_WOOCOMMERCE_API_VERSIONS = ['3'].freeze
|
|
28
28
|
SUPPORTED_PLATFORMS = %w[shopify bigcommerce woocommerce].freeze
|
|
@@ -43,7 +43,7 @@ module EPlat
|
|
|
43
43
|
].freeze
|
|
44
44
|
PROTECTED_PREFIX = '_protected_'
|
|
45
45
|
|
|
46
|
-
setting(:shopify_api_version, default: ENV['EPLAT_SHOPIFY_API_VERSION'] || '
|
|
46
|
+
setting(:shopify_api_version, default: ENV['EPLAT_SHOPIFY_API_VERSION'] || '2026_10', constructor: lambda do |value|
|
|
47
47
|
SUPPORTED_SHOPIFY_API_VERSIONS.include?(value.underscore) ? value.underscore : raise(ArgumentError, "Shopify API version #{value} is not supported")
|
|
48
48
|
end)
|
|
49
49
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: e_plat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- oliwoodsuk
|
|
@@ -322,6 +322,18 @@ files:
|
|
|
322
322
|
- lib/e_plat/mapping/shopify/v_2026_04/script_tag.rb
|
|
323
323
|
- lib/e_plat/mapping/shopify/v_2026_04/shop.rb
|
|
324
324
|
- lib/e_plat/mapping/shopify/v_2026_04/webhook.rb
|
|
325
|
+
- lib/e_plat/mapping/shopify/v_2026_10/metafield.rb
|
|
326
|
+
- lib/e_plat/mapping/shopify/v_2026_10/order.rb
|
|
327
|
+
- lib/e_plat/mapping/shopify/v_2026_10/order/billing_address.rb
|
|
328
|
+
- lib/e_plat/mapping/shopify/v_2026_10/order/shipping_address.rb
|
|
329
|
+
- lib/e_plat/mapping/shopify/v_2026_10/product.rb
|
|
330
|
+
- lib/e_plat/mapping/shopify/v_2026_10/product/image.rb
|
|
331
|
+
- lib/e_plat/mapping/shopify/v_2026_10/product/option.rb
|
|
332
|
+
- lib/e_plat/mapping/shopify/v_2026_10/product/variant.rb
|
|
333
|
+
- lib/e_plat/mapping/shopify/v_2026_10/product/variant/option_value.rb
|
|
334
|
+
- lib/e_plat/mapping/shopify/v_2026_10/script_tag.rb
|
|
335
|
+
- lib/e_plat/mapping/shopify/v_2026_10/shop.rb
|
|
336
|
+
- lib/e_plat/mapping/shopify/v_2026_10/webhook.rb
|
|
325
337
|
- lib/e_plat/mapping/virtual_collection/base.rb
|
|
326
338
|
- lib/e_plat/mapping/virtual_collection/bigcommerce/order_line_items.rb
|
|
327
339
|
- lib/e_plat/mapping/virtual_collection/shopify/product/variant/option_value.rb
|
|
@@ -417,6 +429,16 @@ files:
|
|
|
417
429
|
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_04/query.rb
|
|
418
430
|
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_04/query/product.rb
|
|
419
431
|
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_04/query/product/variant.rb
|
|
432
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input.rb
|
|
433
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input/product.rb
|
|
434
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input/product/variant.rb
|
|
435
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/input/product/variants_bulk.rb
|
|
436
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/mutation.rb
|
|
437
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/mutation/product.rb
|
|
438
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/mutation/product/variant.rb
|
|
439
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/query.rb
|
|
440
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/query/product.rb
|
|
441
|
+
- lib/e_plat/resource/platform_specific/shopify/graph_q_l/v_2026_10/query/product/variant.rb
|
|
420
442
|
- lib/e_plat/resource/platform_specific/shopify/metafield.rb
|
|
421
443
|
- lib/e_plat/resource/platform_specific/shopify/order.rb
|
|
422
444
|
- lib/e_plat/resource/platform_specific/shopify/order/Consignment.rb
|