shopify_api 11.1.0 → 12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/close-waiting-for-response-issues.yml +20 -0
- data/.github/workflows/remove-labels-on-activity.yml +16 -0
- data/.github/workflows/stale.yml +31 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +29 -27
- data/lib/shopify_api/admin_versions.rb +2 -2
- data/lib/shopify_api/auth/jwt_payload.rb +2 -2
- data/lib/shopify_api/auth/oauth/auth_query.rb +1 -1
- data/lib/shopify_api/auth/oauth.rb +5 -5
- data/lib/shopify_api/auth/session.rb +1 -1
- data/lib/shopify_api/clients/graphql/client.rb +3 -3
- data/lib/shopify_api/clients/graphql/storefront.rb +2 -2
- data/lib/shopify_api/clients/http_client.rb +1 -1
- data/lib/shopify_api/clients/rest/admin.rb +10 -10
- data/lib/shopify_api/rest/base.rb +3 -3
- data/lib/shopify_api/rest/resources/2022_01/abandoned_checkout.rb +4 -3
- data/lib/shopify_api/rest/resources/2022_01/customer.rb +26 -0
- data/lib/shopify_api/rest/resources/2022_01/draft_order.rb +3 -1
- data/lib/shopify_api/rest/resources/2022_01/fulfillment_request.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_01/gift_card.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_01/metafield.rb +12 -5
- data/lib/shopify_api/rest/resources/2022_04/abandoned_checkout.rb +4 -3
- data/lib/shopify_api/rest/resources/2022_04/customer.rb +26 -0
- data/lib/shopify_api/rest/resources/2022_04/draft_order.rb +3 -1
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_request.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_04/gift_card.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_04/metafield.rb +8 -8
- data/lib/shopify_api/rest/resources/2022_07/abandoned_checkout.rb +4 -3
- data/lib/shopify_api/rest/resources/2022_07/customer.rb +20 -0
- data/lib/shopify_api/rest/resources/2022_07/dispute_evidence.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/gift_card.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_07/metafield.rb +8 -8
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/abandoned_checkout.rb +4 -3
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/access_scope.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/android_pay_key.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/apple_pay_certificate.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/application_charge.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/application_credit.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/article.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/asset.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/assigned_fulfillment_order.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/balance.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/blog.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/cancellation_request.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/carrier_service.rb +0 -3
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/checkout.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/collect.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/collection.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/collection_listing.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/comment.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/country.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/currency.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/custom_collection.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/customer.rb +29 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/customer_address.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/customer_saved_search.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/deprecated_api_call.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/discount_code.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/dispute.rb +0 -0
- data/lib/shopify_api/rest/resources/2022_10/dispute_evidence.rb +117 -0
- data/lib/shopify_api/rest/resources/2022_10/dispute_file_upload.rb +81 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/draft_order.rb +3 -1
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/event.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/fulfillment.rb +2 -49
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/fulfillment_event.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/fulfillment_order.rb +30 -1
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/fulfillment_request.rb +5 -1
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/fulfillment_service.rb +3 -3
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/gift_card.rb +9 -1
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/gift_card_adjustment.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/image.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/inventory_item.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/inventory_level.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/location.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/locations_for_move.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/marketing_event.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/metafield.rb +8 -8
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/mobile_platform_application.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/order.rb +3 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/order_risk.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/page.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/payment.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/payment_gateway.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/payment_transaction.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/payout.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/policy.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/price_rule.rb +3 -3
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/product.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/product_listing.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/product_resource_feedback.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/province.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/recurring_application_charge.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/redirect.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/refund.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/report.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/resource_feedback.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/script_tag.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/shipping_zone.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/shop.rb +3 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/smart_collection.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/storefront_access_token.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/tender_transaction.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/theme.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/transaction.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/usage_charge.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/user.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/variant.rb +0 -0
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/webhook.rb +0 -0
- data/lib/shopify_api/utils/graphql_proxy.rb +2 -2
- data/lib/shopify_api/utils/session_utils.rb +5 -5
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/registrations/http.rb +7 -1
- data/lib/shopify_api/webhooks/registry.rb +8 -8
- data/service.yml +0 -1
- metadata +81 -76
@@ -35,7 +35,6 @@ module ShopifyAPI
|
|
35
35
|
@product_image_id = T.let(nil, T.nilable(Integer))
|
36
36
|
@type = T.let(nil, T.nilable(String))
|
37
37
|
@updated_at = T.let(nil, T.nilable(String))
|
38
|
-
@value_type = T.let(nil, T.nilable(String))
|
39
38
|
@variant_id = T.let(nil, T.nilable(Integer))
|
40
39
|
end
|
41
40
|
|
@@ -51,6 +50,7 @@ module ShopifyAPI
|
|
51
50
|
{http_method: :delete, operation: :delete, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
|
52
51
|
{http_method: :delete, operation: :delete, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
|
53
52
|
{http_method: :delete, operation: :delete, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
|
53
|
+
{http_method: :delete, operation: :delete, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
|
54
54
|
{http_method: :delete, operation: :delete, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
|
55
55
|
{http_method: :delete, operation: :delete, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
|
56
56
|
{http_method: :get, operation: :count, ids: [:article_id], path: "articles/<article_id>/metafields/count.json"},
|
@@ -61,12 +61,14 @@ module ShopifyAPI
|
|
61
61
|
{http_method: :get, operation: :count, ids: [], path: "metafields/count.json"},
|
62
62
|
{http_method: :get, operation: :count, ids: [:order_id], path: "orders/<order_id>/metafields/count.json"},
|
63
63
|
{http_method: :get, operation: :count, ids: [:page_id], path: "pages/<page_id>/metafields/count.json"},
|
64
|
+
{http_method: :get, operation: :count, ids: [:page_id], path: "pages/<page_id>/metafields/count.json"},
|
64
65
|
{http_method: :get, operation: :count, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields/count.json"},
|
65
66
|
{http_method: :get, operation: :count, ids: [:product_id], path: "products/<product_id>/metafields/count.json"},
|
66
67
|
{http_method: :get, operation: :count, ids: [:variant_id], path: "variants/<variant_id>/metafields/count.json"},
|
67
68
|
{http_method: :get, operation: :get, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
|
68
69
|
{http_method: :get, operation: :get, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
|
69
70
|
{http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
|
71
|
+
{http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
|
70
72
|
{http_method: :get, operation: :get, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
|
71
73
|
{http_method: :get, operation: :get, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
|
72
74
|
{http_method: :get, operation: :get, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
|
@@ -75,7 +77,6 @@ module ShopifyAPI
|
|
75
77
|
{http_method: :get, operation: :get, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
|
76
78
|
{http_method: :get, operation: :get, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
|
77
79
|
{http_method: :get, operation: :get, ids: [], path: "metafields.json"},
|
78
|
-
{http_method: :get, operation: :get, ids: [], path: "metafields.json"},
|
79
80
|
{http_method: :get, operation: :get, ids: [:id], path: "metafields/<id>.json"},
|
80
81
|
{http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
|
81
82
|
{http_method: :get, operation: :get, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
|
@@ -87,6 +88,7 @@ module ShopifyAPI
|
|
87
88
|
{http_method: :get, operation: :get, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
|
88
89
|
{http_method: :get, operation: :get, ids: [:variant_id], path: "variants/<variant_id>/metafields.json"},
|
89
90
|
{http_method: :get, operation: :get, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
|
91
|
+
{http_method: :get, operation: :get, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
|
90
92
|
{http_method: :post, operation: :post, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
|
91
93
|
{http_method: :post, operation: :post, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
|
92
94
|
{http_method: :post, operation: :post, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
|
@@ -149,8 +151,6 @@ module ShopifyAPI
|
|
149
151
|
attr_reader :type
|
150
152
|
sig { returns(T.nilable(String)) }
|
151
153
|
attr_reader :updated_at
|
152
|
-
sig { returns(T.nilable(String)) }
|
153
|
-
attr_reader :value_type
|
154
154
|
sig { returns(T.nilable(Integer)) }
|
155
155
|
attr_reader :variant_id
|
156
156
|
|
@@ -168,6 +168,7 @@ module ShopifyAPI
|
|
168
168
|
product_image_id: T.nilable(T.any(Integer, String)),
|
169
169
|
product_id: T.nilable(T.any(Integer, String)),
|
170
170
|
variant_id: T.nilable(T.any(Integer, String)),
|
171
|
+
fields: T.untyped,
|
171
172
|
session: Auth::Session
|
172
173
|
).returns(T.nilable(Metafield))
|
173
174
|
end
|
@@ -183,12 +184,13 @@ module ShopifyAPI
|
|
183
184
|
product_image_id: nil,
|
184
185
|
product_id: nil,
|
185
186
|
variant_id: nil,
|
187
|
+
fields: nil,
|
186
188
|
session: ShopifyAPI::Context.active_session
|
187
189
|
)
|
188
190
|
result = base_find(
|
189
191
|
session: session,
|
190
192
|
ids: {id: id, article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
|
191
|
-
params: {},
|
193
|
+
params: {fields: fields},
|
192
194
|
)
|
193
195
|
T.cast(result[0], T.nilable(Metafield))
|
194
196
|
end
|
@@ -253,7 +255,6 @@ module ShopifyAPI
|
|
253
255
|
namespace: T.untyped,
|
254
256
|
key: T.untyped,
|
255
257
|
type: T.untyped,
|
256
|
-
value_type: T.untyped,
|
257
258
|
fields: T.untyped,
|
258
259
|
metafield: T.nilable(T::Hash[T.untyped, T.untyped]),
|
259
260
|
session: Auth::Session,
|
@@ -280,7 +281,6 @@ module ShopifyAPI
|
|
280
281
|
namespace: nil,
|
281
282
|
key: nil,
|
282
283
|
type: nil,
|
283
|
-
value_type: nil,
|
284
284
|
fields: nil,
|
285
285
|
metafield: nil,
|
286
286
|
session: ShopifyAPI::Context.active_session,
|
@@ -289,7 +289,7 @@ module ShopifyAPI
|
|
289
289
|
response = base_find(
|
290
290
|
session: session,
|
291
291
|
ids: {article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
|
292
|
-
params: {limit: limit, since_id: since_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, namespace: namespace, key: key, type: type,
|
292
|
+
params: {limit: limit, since_id: since_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, namespace: namespace, key: key, type: type, fields: fields, metafield: metafield}.merge(kwargs).compact,
|
293
293
|
)
|
294
294
|
|
295
295
|
T.cast(response, T::Array[Metafield])
|
File without changes
|
@@ -51,6 +51,7 @@ module ShopifyAPI
|
|
51
51
|
@id = T.let(nil, T.nilable(Integer))
|
52
52
|
@landing_site = T.let(nil, T.nilable(String))
|
53
53
|
@location_id = T.let(nil, T.nilable(Integer))
|
54
|
+
@merchant_of_record_app_id = T.let(nil, T.nilable(Integer))
|
54
55
|
@name = T.let(nil, T.nilable(String))
|
55
56
|
@note = T.let(nil, T.nilable(String))
|
56
57
|
@note_attributes = T.let(nil, T.nilable(T::Array[T.untyped]))
|
@@ -185,6 +186,8 @@ module ShopifyAPI
|
|
185
186
|
attr_reader :landing_site
|
186
187
|
sig { returns(T.nilable(Integer)) }
|
187
188
|
attr_reader :location_id
|
189
|
+
sig { returns(T.nilable(Integer)) }
|
190
|
+
attr_reader :merchant_of_record_app_id
|
188
191
|
sig { returns(T.nilable(String)) }
|
189
192
|
attr_reader :name
|
190
193
|
sig { returns(T.nilable(String)) }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -19,6 +19,7 @@ module ShopifyAPI
|
|
19
19
|
@allocation_limit = T.let(nil, T.nilable(Integer))
|
20
20
|
@allocation_method = T.let(nil, T.nilable(String))
|
21
21
|
@created_at = T.let(nil, T.nilable(String))
|
22
|
+
@customer_segment_prerequisite_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
|
22
23
|
@customer_selection = T.let(nil, T.nilable(String))
|
23
24
|
@ends_at = T.let(nil, T.nilable(String))
|
24
25
|
@entitled_collection_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
|
@@ -31,7 +32,6 @@ module ShopifyAPI
|
|
31
32
|
@prerequisite_customer_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
|
32
33
|
@prerequisite_product_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
|
33
34
|
@prerequisite_quantity_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
34
|
-
@prerequisite_saved_search_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
|
35
35
|
@prerequisite_shipping_price_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
36
36
|
@prerequisite_subtotal_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
37
37
|
@prerequisite_to_entitlement_purchase = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
@@ -64,6 +64,8 @@ module ShopifyAPI
|
|
64
64
|
attr_reader :allocation_method
|
65
65
|
sig { returns(T.nilable(String)) }
|
66
66
|
attr_reader :created_at
|
67
|
+
sig { returns(T.nilable(T::Array[Integer])) }
|
68
|
+
attr_reader :customer_segment_prerequisite_ids
|
67
69
|
sig { returns(T.nilable(String)) }
|
68
70
|
attr_reader :customer_selection
|
69
71
|
sig { returns(T.nilable(String)) }
|
@@ -88,8 +90,6 @@ module ShopifyAPI
|
|
88
90
|
attr_reader :prerequisite_product_ids
|
89
91
|
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
90
92
|
attr_reader :prerequisite_quantity_range
|
91
|
-
sig { returns(T.nilable(T::Array[Integer])) }
|
92
|
-
attr_reader :prerequisite_saved_search_ids
|
93
93
|
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
94
94
|
attr_reader :prerequisite_shipping_price_range
|
95
95
|
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -44,6 +44,7 @@ module ShopifyAPI
|
|
44
44
|
@id = T.let(nil, T.nilable(Integer))
|
45
45
|
@latitude = T.let(nil, T.nilable(Float))
|
46
46
|
@longitude = T.let(nil, T.nilable(Float))
|
47
|
+
@marketing_sms_consent_enabled_at_checkout = T.let(nil, T.nilable(T::Boolean))
|
47
48
|
@money_format = T.let(nil, T.nilable(String))
|
48
49
|
@money_in_emails_format = T.let(nil, T.nilable(String))
|
49
50
|
@money_with_currency_format = T.let(nil, T.nilable(String))
|
@@ -135,6 +136,8 @@ module ShopifyAPI
|
|
135
136
|
attr_reader :latitude
|
136
137
|
sig { returns(T.nilable(Float)) }
|
137
138
|
attr_reader :longitude
|
139
|
+
sig { returns(T.nilable(T::Boolean)) }
|
140
|
+
attr_reader :marketing_sms_consent_enabled_at_checkout
|
138
141
|
sig { returns(T.nilable(String)) }
|
139
142
|
attr_reader :money_format
|
140
143
|
sig { returns(T.nilable(String)) }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -12,7 +12,7 @@ module ShopifyAPI
|
|
12
12
|
headers: T::Hash[String, T.untyped],
|
13
13
|
body: String,
|
14
14
|
cookies: T.nilable(T::Hash[String, String]),
|
15
|
-
tries: Integer
|
15
|
+
tries: Integer,
|
16
16
|
).returns(Clients::HttpResponse)
|
17
17
|
end
|
18
18
|
def proxy_query(headers:, body:, cookies: nil, tries: 1)
|
@@ -21,7 +21,7 @@ module ShopifyAPI
|
|
21
21
|
normalized_headers = HttpUtils.normalize_headers(headers)
|
22
22
|
|
23
23
|
session = Utils::SessionUtils.load_current_session(
|
24
|
-
auth_header: normalized_headers["authorization"], cookies: cookies, is_online: true
|
24
|
+
auth_header: normalized_headers["authorization"], cookies: cookies, is_online: true,
|
25
25
|
)
|
26
26
|
|
27
27
|
if session.nil? || !session.online?
|
@@ -13,7 +13,7 @@ module ShopifyAPI
|
|
13
13
|
params(
|
14
14
|
auth_header: T.nilable(String),
|
15
15
|
cookies: T.nilable(T::Hash[String, String]),
|
16
|
-
is_online: T::Boolean
|
16
|
+
is_online: T::Boolean,
|
17
17
|
).returns(T.nilable(Auth::Session))
|
18
18
|
end
|
19
19
|
def load_current_session(auth_header: nil, cookies: nil, is_online: false)
|
@@ -29,7 +29,7 @@ module ShopifyAPI
|
|
29
29
|
params(
|
30
30
|
auth_header: T.nilable(String),
|
31
31
|
cookies: T.nilable(T::Hash[String, String]),
|
32
|
-
is_online: T::Boolean
|
32
|
+
is_online: T::Boolean,
|
33
33
|
).returns(T::Boolean)
|
34
34
|
end
|
35
35
|
def delete_current_session(auth_header: nil, cookies: nil, is_online: false)
|
@@ -55,7 +55,7 @@ module ShopifyAPI
|
|
55
55
|
|
56
56
|
sig do
|
57
57
|
params(
|
58
|
-
shop: String
|
58
|
+
shop: String,
|
59
59
|
).returns(T::Boolean)
|
60
60
|
end
|
61
61
|
def delete_offline_session(shop:)
|
@@ -74,7 +74,7 @@ module ShopifyAPI
|
|
74
74
|
Auth::Session.new(
|
75
75
|
shop: T.must(Context.private_shop),
|
76
76
|
access_token: Context.api_secret_key,
|
77
|
-
scope: Context.scope.to_a
|
77
|
+
scope: Context.scope.to_a,
|
78
78
|
)
|
79
79
|
end
|
80
80
|
|
@@ -82,7 +82,7 @@ module ShopifyAPI
|
|
82
82
|
params(
|
83
83
|
auth_header: T.nilable(String),
|
84
84
|
cookies: T.nilable(T::Hash[String, String]),
|
85
|
-
online: T::Boolean
|
85
|
+
online: T::Boolean,
|
86
86
|
).returns(T.nilable(String))
|
87
87
|
end
|
88
88
|
def current_session_id(auth_header, cookies, online)
|
data/lib/shopify_api/version.rb
CHANGED
@@ -9,7 +9,13 @@ module ShopifyAPI
|
|
9
9
|
|
10
10
|
sig { override.returns(String) }
|
11
11
|
def callback_address
|
12
|
-
|
12
|
+
if @path.match?(%r{^https://})
|
13
|
+
@path
|
14
|
+
elsif @path.match?(/^#{Context.host_name}/)
|
15
|
+
"https://#{@path}"
|
16
|
+
else
|
17
|
+
"https://#{Context.host_name}/#{@path}"
|
18
|
+
end
|
13
19
|
end
|
14
20
|
|
15
21
|
sig { override.returns(T::Hash[Symbol, String]) }
|
@@ -41,7 +41,7 @@ module ShopifyAPI
|
|
41
41
|
sig do
|
42
42
|
params(
|
43
43
|
topic: String,
|
44
|
-
session: Auth::Session
|
44
|
+
session: Auth::Session,
|
45
45
|
).returns(RegisterResult)
|
46
46
|
end
|
47
47
|
def register(topic:, session:)
|
@@ -61,11 +61,11 @@ module ShopifyAPI
|
|
61
61
|
register_body = send_register_request(
|
62
62
|
client,
|
63
63
|
registration,
|
64
|
-
register_check_result[:webhook_id]
|
64
|
+
register_check_result[:webhook_id],
|
65
65
|
)
|
66
66
|
registered = registration_sucessful?(
|
67
67
|
register_body,
|
68
|
-
registration.mutation_name(register_check_result[:webhook_id])
|
68
|
+
registration.mutation_name(register_check_result[:webhook_id]),
|
69
69
|
)
|
70
70
|
end
|
71
71
|
|
@@ -74,7 +74,7 @@ module ShopifyAPI
|
|
74
74
|
|
75
75
|
sig do
|
76
76
|
params(
|
77
|
-
session: Auth::Session
|
77
|
+
session: Auth::Session,
|
78
78
|
).returns(T::Array[RegisterResult])
|
79
79
|
end
|
80
80
|
def register_all(session:)
|
@@ -83,7 +83,7 @@ module ShopifyAPI
|
|
83
83
|
topics.each do |topic|
|
84
84
|
register_response = register(
|
85
85
|
topic: topic,
|
86
|
-
session: session
|
86
|
+
session: session,
|
87
87
|
)
|
88
88
|
result.push(register_response)
|
89
89
|
end
|
@@ -93,7 +93,7 @@ module ShopifyAPI
|
|
93
93
|
sig do
|
94
94
|
params(
|
95
95
|
topic: String,
|
96
|
-
session: T.nilable(Auth::Session)
|
96
|
+
session: T.nilable(Auth::Session),
|
97
97
|
).returns(T::Hash[String, T.untyped])
|
98
98
|
end
|
99
99
|
def unregister(topic:, session:)
|
@@ -130,7 +130,7 @@ module ShopifyAPI
|
|
130
130
|
sig do
|
131
131
|
params(
|
132
132
|
topic: String,
|
133
|
-
client: Clients::Graphql::Admin
|
133
|
+
client: Clients::Graphql::Admin,
|
134
134
|
).returns(T.nilable(String))
|
135
135
|
end
|
136
136
|
def get_webhook_id(topic:, client:)
|
@@ -194,7 +194,7 @@ module ShopifyAPI
|
|
194
194
|
params(
|
195
195
|
client: Clients::Graphql::Admin,
|
196
196
|
registration: Registration,
|
197
|
-
webhook_id: T.nilable(String)
|
197
|
+
webhook_id: T.nilable(String),
|
198
198
|
).returns(T::Hash[String, T.untyped])
|
199
199
|
end
|
200
200
|
def send_register_request(client, registration, webhook_id)
|
data/service.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -250,6 +250,9 @@ files:
|
|
250
250
|
- ".github/pull_request_template.md"
|
251
251
|
- ".github/workflows/build.yml"
|
252
252
|
- ".github/workflows/cla.yml"
|
253
|
+
- ".github/workflows/close-waiting-for-response-issues.yml"
|
254
|
+
- ".github/workflows/remove-labels-on-activity.yml"
|
255
|
+
- ".github/workflows/stale.yml"
|
253
256
|
- ".rubocop.yml"
|
254
257
|
- BREAKING_CHANGES_FOR_OLDER_VERSIONS.md
|
255
258
|
- CHANGELOG.md
|
@@ -317,80 +320,6 @@ files:
|
|
317
320
|
- lib/shopify_api/inflector.rb
|
318
321
|
- lib/shopify_api/rest/base.rb
|
319
322
|
- lib/shopify_api/rest/base_errors.rb
|
320
|
-
- lib/shopify_api/rest/resources/2021_10/abandoned_checkout.rb
|
321
|
-
- lib/shopify_api/rest/resources/2021_10/access_scope.rb
|
322
|
-
- lib/shopify_api/rest/resources/2021_10/android_pay_key.rb
|
323
|
-
- lib/shopify_api/rest/resources/2021_10/apple_pay_certificate.rb
|
324
|
-
- lib/shopify_api/rest/resources/2021_10/application_charge.rb
|
325
|
-
- lib/shopify_api/rest/resources/2021_10/application_credit.rb
|
326
|
-
- lib/shopify_api/rest/resources/2021_10/article.rb
|
327
|
-
- lib/shopify_api/rest/resources/2021_10/asset.rb
|
328
|
-
- lib/shopify_api/rest/resources/2021_10/assigned_fulfillment_order.rb
|
329
|
-
- lib/shopify_api/rest/resources/2021_10/balance.rb
|
330
|
-
- lib/shopify_api/rest/resources/2021_10/blog.rb
|
331
|
-
- lib/shopify_api/rest/resources/2021_10/cancellation_request.rb
|
332
|
-
- lib/shopify_api/rest/resources/2021_10/carrier_service.rb
|
333
|
-
- lib/shopify_api/rest/resources/2021_10/checkout.rb
|
334
|
-
- lib/shopify_api/rest/resources/2021_10/collect.rb
|
335
|
-
- lib/shopify_api/rest/resources/2021_10/collection.rb
|
336
|
-
- lib/shopify_api/rest/resources/2021_10/collection_listing.rb
|
337
|
-
- lib/shopify_api/rest/resources/2021_10/comment.rb
|
338
|
-
- lib/shopify_api/rest/resources/2021_10/country.rb
|
339
|
-
- lib/shopify_api/rest/resources/2021_10/currency.rb
|
340
|
-
- lib/shopify_api/rest/resources/2021_10/custom_collection.rb
|
341
|
-
- lib/shopify_api/rest/resources/2021_10/customer.rb
|
342
|
-
- lib/shopify_api/rest/resources/2021_10/customer_address.rb
|
343
|
-
- lib/shopify_api/rest/resources/2021_10/customer_saved_search.rb
|
344
|
-
- lib/shopify_api/rest/resources/2021_10/deprecated_api_call.rb
|
345
|
-
- lib/shopify_api/rest/resources/2021_10/discount_code.rb
|
346
|
-
- lib/shopify_api/rest/resources/2021_10/dispute.rb
|
347
|
-
- lib/shopify_api/rest/resources/2021_10/draft_order.rb
|
348
|
-
- lib/shopify_api/rest/resources/2021_10/event.rb
|
349
|
-
- lib/shopify_api/rest/resources/2021_10/fulfillment.rb
|
350
|
-
- lib/shopify_api/rest/resources/2021_10/fulfillment_event.rb
|
351
|
-
- lib/shopify_api/rest/resources/2021_10/fulfillment_order.rb
|
352
|
-
- lib/shopify_api/rest/resources/2021_10/fulfillment_request.rb
|
353
|
-
- lib/shopify_api/rest/resources/2021_10/fulfillment_service.rb
|
354
|
-
- lib/shopify_api/rest/resources/2021_10/gift_card.rb
|
355
|
-
- lib/shopify_api/rest/resources/2021_10/gift_card_adjustment.rb
|
356
|
-
- lib/shopify_api/rest/resources/2021_10/image.rb
|
357
|
-
- lib/shopify_api/rest/resources/2021_10/inventory_item.rb
|
358
|
-
- lib/shopify_api/rest/resources/2021_10/inventory_level.rb
|
359
|
-
- lib/shopify_api/rest/resources/2021_10/location.rb
|
360
|
-
- lib/shopify_api/rest/resources/2021_10/locations_for_move.rb
|
361
|
-
- lib/shopify_api/rest/resources/2021_10/marketing_event.rb
|
362
|
-
- lib/shopify_api/rest/resources/2021_10/metafield.rb
|
363
|
-
- lib/shopify_api/rest/resources/2021_10/mobile_platform_application.rb
|
364
|
-
- lib/shopify_api/rest/resources/2021_10/order.rb
|
365
|
-
- lib/shopify_api/rest/resources/2021_10/order_risk.rb
|
366
|
-
- lib/shopify_api/rest/resources/2021_10/page.rb
|
367
|
-
- lib/shopify_api/rest/resources/2021_10/payment.rb
|
368
|
-
- lib/shopify_api/rest/resources/2021_10/payment_gateway.rb
|
369
|
-
- lib/shopify_api/rest/resources/2021_10/payment_transaction.rb
|
370
|
-
- lib/shopify_api/rest/resources/2021_10/payout.rb
|
371
|
-
- lib/shopify_api/rest/resources/2021_10/policy.rb
|
372
|
-
- lib/shopify_api/rest/resources/2021_10/price_rule.rb
|
373
|
-
- lib/shopify_api/rest/resources/2021_10/product.rb
|
374
|
-
- lib/shopify_api/rest/resources/2021_10/product_listing.rb
|
375
|
-
- lib/shopify_api/rest/resources/2021_10/product_resource_feedback.rb
|
376
|
-
- lib/shopify_api/rest/resources/2021_10/province.rb
|
377
|
-
- lib/shopify_api/rest/resources/2021_10/recurring_application_charge.rb
|
378
|
-
- lib/shopify_api/rest/resources/2021_10/redirect.rb
|
379
|
-
- lib/shopify_api/rest/resources/2021_10/refund.rb
|
380
|
-
- lib/shopify_api/rest/resources/2021_10/report.rb
|
381
|
-
- lib/shopify_api/rest/resources/2021_10/resource_feedback.rb
|
382
|
-
- lib/shopify_api/rest/resources/2021_10/script_tag.rb
|
383
|
-
- lib/shopify_api/rest/resources/2021_10/shipping_zone.rb
|
384
|
-
- lib/shopify_api/rest/resources/2021_10/shop.rb
|
385
|
-
- lib/shopify_api/rest/resources/2021_10/smart_collection.rb
|
386
|
-
- lib/shopify_api/rest/resources/2021_10/storefront_access_token.rb
|
387
|
-
- lib/shopify_api/rest/resources/2021_10/tender_transaction.rb
|
388
|
-
- lib/shopify_api/rest/resources/2021_10/theme.rb
|
389
|
-
- lib/shopify_api/rest/resources/2021_10/transaction.rb
|
390
|
-
- lib/shopify_api/rest/resources/2021_10/usage_charge.rb
|
391
|
-
- lib/shopify_api/rest/resources/2021_10/user.rb
|
392
|
-
- lib/shopify_api/rest/resources/2021_10/variant.rb
|
393
|
-
- lib/shopify_api/rest/resources/2021_10/webhook.rb
|
394
323
|
- lib/shopify_api/rest/resources/2022_01/abandoned_checkout.rb
|
395
324
|
- lib/shopify_api/rest/resources/2022_01/access_scope.rb
|
396
325
|
- lib/shopify_api/rest/resources/2022_01/android_pay_key.rb
|
@@ -615,6 +544,82 @@ files:
|
|
615
544
|
- lib/shopify_api/rest/resources/2022_07/user.rb
|
616
545
|
- lib/shopify_api/rest/resources/2022_07/variant.rb
|
617
546
|
- lib/shopify_api/rest/resources/2022_07/webhook.rb
|
547
|
+
- lib/shopify_api/rest/resources/2022_10/abandoned_checkout.rb
|
548
|
+
- lib/shopify_api/rest/resources/2022_10/access_scope.rb
|
549
|
+
- lib/shopify_api/rest/resources/2022_10/android_pay_key.rb
|
550
|
+
- lib/shopify_api/rest/resources/2022_10/apple_pay_certificate.rb
|
551
|
+
- lib/shopify_api/rest/resources/2022_10/application_charge.rb
|
552
|
+
- lib/shopify_api/rest/resources/2022_10/application_credit.rb
|
553
|
+
- lib/shopify_api/rest/resources/2022_10/article.rb
|
554
|
+
- lib/shopify_api/rest/resources/2022_10/asset.rb
|
555
|
+
- lib/shopify_api/rest/resources/2022_10/assigned_fulfillment_order.rb
|
556
|
+
- lib/shopify_api/rest/resources/2022_10/balance.rb
|
557
|
+
- lib/shopify_api/rest/resources/2022_10/blog.rb
|
558
|
+
- lib/shopify_api/rest/resources/2022_10/cancellation_request.rb
|
559
|
+
- lib/shopify_api/rest/resources/2022_10/carrier_service.rb
|
560
|
+
- lib/shopify_api/rest/resources/2022_10/checkout.rb
|
561
|
+
- lib/shopify_api/rest/resources/2022_10/collect.rb
|
562
|
+
- lib/shopify_api/rest/resources/2022_10/collection.rb
|
563
|
+
- lib/shopify_api/rest/resources/2022_10/collection_listing.rb
|
564
|
+
- lib/shopify_api/rest/resources/2022_10/comment.rb
|
565
|
+
- lib/shopify_api/rest/resources/2022_10/country.rb
|
566
|
+
- lib/shopify_api/rest/resources/2022_10/currency.rb
|
567
|
+
- lib/shopify_api/rest/resources/2022_10/custom_collection.rb
|
568
|
+
- lib/shopify_api/rest/resources/2022_10/customer.rb
|
569
|
+
- lib/shopify_api/rest/resources/2022_10/customer_address.rb
|
570
|
+
- lib/shopify_api/rest/resources/2022_10/customer_saved_search.rb
|
571
|
+
- lib/shopify_api/rest/resources/2022_10/deprecated_api_call.rb
|
572
|
+
- lib/shopify_api/rest/resources/2022_10/discount_code.rb
|
573
|
+
- lib/shopify_api/rest/resources/2022_10/dispute.rb
|
574
|
+
- lib/shopify_api/rest/resources/2022_10/dispute_evidence.rb
|
575
|
+
- lib/shopify_api/rest/resources/2022_10/dispute_file_upload.rb
|
576
|
+
- lib/shopify_api/rest/resources/2022_10/draft_order.rb
|
577
|
+
- lib/shopify_api/rest/resources/2022_10/event.rb
|
578
|
+
- lib/shopify_api/rest/resources/2022_10/fulfillment.rb
|
579
|
+
- lib/shopify_api/rest/resources/2022_10/fulfillment_event.rb
|
580
|
+
- lib/shopify_api/rest/resources/2022_10/fulfillment_order.rb
|
581
|
+
- lib/shopify_api/rest/resources/2022_10/fulfillment_request.rb
|
582
|
+
- lib/shopify_api/rest/resources/2022_10/fulfillment_service.rb
|
583
|
+
- lib/shopify_api/rest/resources/2022_10/gift_card.rb
|
584
|
+
- lib/shopify_api/rest/resources/2022_10/gift_card_adjustment.rb
|
585
|
+
- lib/shopify_api/rest/resources/2022_10/image.rb
|
586
|
+
- lib/shopify_api/rest/resources/2022_10/inventory_item.rb
|
587
|
+
- lib/shopify_api/rest/resources/2022_10/inventory_level.rb
|
588
|
+
- lib/shopify_api/rest/resources/2022_10/location.rb
|
589
|
+
- lib/shopify_api/rest/resources/2022_10/locations_for_move.rb
|
590
|
+
- lib/shopify_api/rest/resources/2022_10/marketing_event.rb
|
591
|
+
- lib/shopify_api/rest/resources/2022_10/metafield.rb
|
592
|
+
- lib/shopify_api/rest/resources/2022_10/mobile_platform_application.rb
|
593
|
+
- lib/shopify_api/rest/resources/2022_10/order.rb
|
594
|
+
- lib/shopify_api/rest/resources/2022_10/order_risk.rb
|
595
|
+
- lib/shopify_api/rest/resources/2022_10/page.rb
|
596
|
+
- lib/shopify_api/rest/resources/2022_10/payment.rb
|
597
|
+
- lib/shopify_api/rest/resources/2022_10/payment_gateway.rb
|
598
|
+
- lib/shopify_api/rest/resources/2022_10/payment_transaction.rb
|
599
|
+
- lib/shopify_api/rest/resources/2022_10/payout.rb
|
600
|
+
- lib/shopify_api/rest/resources/2022_10/policy.rb
|
601
|
+
- lib/shopify_api/rest/resources/2022_10/price_rule.rb
|
602
|
+
- lib/shopify_api/rest/resources/2022_10/product.rb
|
603
|
+
- lib/shopify_api/rest/resources/2022_10/product_listing.rb
|
604
|
+
- lib/shopify_api/rest/resources/2022_10/product_resource_feedback.rb
|
605
|
+
- lib/shopify_api/rest/resources/2022_10/province.rb
|
606
|
+
- lib/shopify_api/rest/resources/2022_10/recurring_application_charge.rb
|
607
|
+
- lib/shopify_api/rest/resources/2022_10/redirect.rb
|
608
|
+
- lib/shopify_api/rest/resources/2022_10/refund.rb
|
609
|
+
- lib/shopify_api/rest/resources/2022_10/report.rb
|
610
|
+
- lib/shopify_api/rest/resources/2022_10/resource_feedback.rb
|
611
|
+
- lib/shopify_api/rest/resources/2022_10/script_tag.rb
|
612
|
+
- lib/shopify_api/rest/resources/2022_10/shipping_zone.rb
|
613
|
+
- lib/shopify_api/rest/resources/2022_10/shop.rb
|
614
|
+
- lib/shopify_api/rest/resources/2022_10/smart_collection.rb
|
615
|
+
- lib/shopify_api/rest/resources/2022_10/storefront_access_token.rb
|
616
|
+
- lib/shopify_api/rest/resources/2022_10/tender_transaction.rb
|
617
|
+
- lib/shopify_api/rest/resources/2022_10/theme.rb
|
618
|
+
- lib/shopify_api/rest/resources/2022_10/transaction.rb
|
619
|
+
- lib/shopify_api/rest/resources/2022_10/usage_charge.rb
|
620
|
+
- lib/shopify_api/rest/resources/2022_10/user.rb
|
621
|
+
- lib/shopify_api/rest/resources/2022_10/variant.rb
|
622
|
+
- lib/shopify_api/rest/resources/2022_10/webhook.rb
|
618
623
|
- lib/shopify_api/utils/graphql_proxy.rb
|
619
624
|
- lib/shopify_api/utils/hmac_validator.rb
|
620
625
|
- lib/shopify_api/utils/http_utils.rb
|