shopify_api 11.1.0 → 12.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/BUG_REPORT.md +40 -0
- data/.github/ISSUE_TEMPLATE/ENHANCEMENT.md +9 -0
- data/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +9 -0
- data/.github/workflows/build.yml +0 -3
- 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 +33 -0
- data/CHANGELOG.md +30 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +55 -39
- data/README.md +12 -14
- data/docs/getting_started.md +1 -1
- data/docs/usage/oauth.md +3 -4
- data/docs/usage/session_storage.md +1 -1
- data/lib/shopify_api/admin_versions.rb +3 -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 +18 -12
- 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 +4 -4
- data/lib/shopify_api/clients/rest/admin.rb +10 -10
- data/lib/shopify_api/context.rb +57 -16
- data/lib/shopify_api/errors/feature_deprecated_error.rb +9 -0
- data/lib/shopify_api/errors/http_response_error.rb +7 -3
- data/lib/shopify_api/errors/log_level_not_found_error.rb +9 -0
- data/lib/shopify_api/logger.rb +82 -0
- data/lib/shopify_api/rest/base.rb +14 -7
- data/lib/shopify_api/rest/resources/2022_01/abandoned_checkout.rb +4 -3
- data/lib/shopify_api/rest/resources/2022_01/assigned_fulfillment_order.rb +7 -0
- data/lib/shopify_api/rest/resources/2022_01/customer.rb +35 -1
- data/lib/shopify_api/rest/resources/2022_01/draft_order.rb +3 -1
- data/lib/shopify_api/rest/resources/2022_01/fulfillment.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb +3 -3
- 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/assigned_fulfillment_order.rb +7 -0
- data/lib/shopify_api/rest/resources/2022_04/customer.rb +35 -1
- data/lib/shopify_api/rest/resources/2022_04/draft_order.rb +3 -1
- data/lib/shopify_api/rest/resources/2022_04/fulfillment.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb +3 -3
- 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 +10 -8
- data/lib/shopify_api/rest/resources/2022_07/abandoned_checkout.rb +4 -3
- data/lib/shopify_api/rest/resources/2022_07/assigned_fulfillment_order.rb +7 -0
- data/lib/shopify_api/rest/resources/2022_07/customer.rb +29 -1
- data/lib/shopify_api/rest/resources/2022_07/dispute_evidence.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/fulfillment.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb +3 -3
- data/lib/shopify_api/rest/resources/2022_07/gift_card.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_07/metafield.rb +10 -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}/assigned_fulfillment_order.rb +7 -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}/customer.rb +38 -1
- 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}/fulfillment.rb +7 -50
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/fulfillment_order.rb +33 -4
- 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}/metafield.rb +10 -8
- data/lib/shopify_api/rest/resources/{2021_10 → 2022_10}/order.rb +3 -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}/shop.rb +3 -0
- data/lib/shopify_api/rest/resources/2023_01/abandoned_checkout.rb +190 -0
- data/lib/shopify_api/rest/resources/2023_01/access_scope.rb +58 -0
- data/lib/shopify_api/rest/resources/2023_01/apple_pay_certificate.rb +105 -0
- data/lib/shopify_api/rest/resources/2023_01/application_charge.rb +104 -0
- data/lib/shopify_api/rest/resources/2023_01/application_credit.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_01/article.rb +265 -0
- data/lib/shopify_api/rest/resources/2023_01/asset.rb +118 -0
- data/lib/shopify_api/rest/resources/2023_01/assigned_fulfillment_order.rb +86 -0
- data/lib/shopify_api/rest/resources/2023_01/balance.rb +50 -0
- data/lib/shopify_api/rest/resources/2023_01/blog.rb +162 -0
- data/lib/shopify_api/rest/resources/2023_01/cancellation_request.rb +83 -0
- data/lib/shopify_api/rest/resources/2023_01/carrier_service.rb +113 -0
- data/lib/shopify_api/rest/resources/2023_01/checkout.rb +209 -0
- data/lib/shopify_api/rest/resources/2023_01/collect.rb +142 -0
- data/lib/shopify_api/rest/resources/2023_01/collection.rb +110 -0
- data/lib/shopify_api/rest/resources/2023_01/collection_listing.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_01/comment.rb +283 -0
- data/lib/shopify_api/rest/resources/2023_01/country.rb +137 -0
- data/lib/shopify_api/rest/resources/2023_01/currency.rb +57 -0
- data/lib/shopify_api/rest/resources/2023_01/custom_collection.rb +187 -0
- data/lib/shopify_api/rest/resources/2023_01/customer.rb +329 -0
- data/lib/shopify_api/rest/resources/2023_01/customer_address.rb +201 -0
- data/lib/shopify_api/rest/resources/2023_01/customer_saved_search.rb +169 -0
- data/lib/shopify_api/rest/resources/2023_01/deprecated_api_call.rb +57 -0
- data/lib/shopify_api/rest/resources/2023_01/discount_code.rb +219 -0
- data/lib/shopify_api/rest/resources/2023_01/dispute.rb +111 -0
- data/lib/shopify_api/rest/resources/2023_01/draft_order.rb +275 -0
- data/lib/shopify_api/rest/resources/2023_01/event.rb +148 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment.rb +225 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_event.rb +166 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb +316 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_service.rb +130 -0
- data/lib/shopify_api/rest/resources/2023_01/gift_card.rb +215 -0
- data/lib/shopify_api/rest/resources/2023_01/gift_card_adjustment.rb +118 -0
- data/lib/shopify_api/rest/resources/2023_01/image.rb +157 -0
- data/lib/shopify_api/rest/resources/2023_01/inventory_item.rb +108 -0
- data/lib/shopify_api/rest/resources/2023_01/inventory_level.rb +179 -0
- data/lib/shopify_api/rest/resources/2023_01/location.rb +167 -0
- data/lib/shopify_api/rest/resources/2023_01/locations_for_move.rb +56 -0
- data/lib/shopify_api/rest/resources/2023_01/marketing_event.rb +209 -0
- data/lib/shopify_api/rest/resources/2023_01/metafield.rb +344 -0
- data/lib/shopify_api/rest/resources/2023_01/mobile_platform_application.rb +110 -0
- data/lib/shopify_api/rest/resources/2023_01/order.rb +479 -0
- data/lib/shopify_api/rest/resources/2023_01/order_risk.rb +135 -0
- data/lib/shopify_api/rest/resources/2023_01/page.rb +194 -0
- data/lib/shopify_api/rest/resources/2023_01/payment.rb +140 -0
- data/lib/shopify_api/rest/resources/2023_01/payment_gateway.rb +143 -0
- data/lib/shopify_api/rest/resources/2023_01/payment_transaction.rb +107 -0
- data/lib/shopify_api/rest/resources/2023_01/payout.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_01/policy.rb +69 -0
- data/lib/shopify_api/rest/resources/2023_01/price_rule.rb +223 -0
- data/lib/shopify_api/rest/resources/2023_01/product.rb +223 -0
- data/lib/shopify_api/rest/resources/2023_01/product_listing.rb +196 -0
- data/lib/shopify_api/rest/resources/2023_01/product_resource_feedback.rb +88 -0
- data/lib/shopify_api/rest/resources/2023_01/province.rb +132 -0
- data/lib/shopify_api/rest/resources/2023_01/recurring_application_charge.rb +167 -0
- data/lib/shopify_api/rest/resources/2023_01/redirect.rb +139 -0
- data/lib/shopify_api/rest/resources/2023_01/refund.rb +151 -0
- data/lib/shopify_api/rest/resources/2023_01/report.rb +121 -0
- data/lib/shopify_api/rest/resources/2023_01/resource_feedback.rb +73 -0
- data/lib/shopify_api/rest/resources/2023_01/script_tag.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_01/shipping_zone.rb +83 -0
- data/lib/shopify_api/rest/resources/2023_01/shop.rb +221 -0
- data/lib/shopify_api/rest/resources/2023_01/smart_collection.rb +216 -0
- data/lib/shopify_api/rest/resources/2023_01/storefront_access_token.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_01/tender_transaction.rb +93 -0
- data/lib/shopify_api/rest/resources/2023_01/theme.rb +120 -0
- data/lib/shopify_api/rest/resources/2023_01/transaction.rb +181 -0
- data/lib/shopify_api/rest/resources/2023_01/usage_charge.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_01/user.rb +138 -0
- data/lib/shopify_api/rest/resources/2023_01/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2023_01/webhook.rb +168 -0
- data/lib/shopify_api/utils/graphql_proxy.rb +2 -2
- data/lib/shopify_api/utils/session_utils.rb +42 -25
- 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
- data/shopify_api.gemspec +4 -2
- metadata +195 -78
- data/.github/ISSUE_TEMPLATE.md +0 -35
- /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}/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}/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_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/{2021_10 → 2022_10}/event.rb +0 -0
- /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}/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}/mobile_platform_application.rb +0 -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}/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}/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
@@ -0,0 +1,212 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
########################################################################################################################
|
5
|
+
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
|
6
|
+
########################################################################################################################
|
7
|
+
|
8
|
+
module ShopifyAPI
|
9
|
+
class Variant < ShopifyAPI::Rest::Base
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
@prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
13
|
+
@next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
14
|
+
|
15
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session)).void }
|
16
|
+
def initialize(session: ShopifyAPI::Context.active_session)
|
17
|
+
super(session: session)
|
18
|
+
|
19
|
+
@barcode = T.let(nil, T.nilable(String))
|
20
|
+
@compare_at_price = T.let(nil, T.nilable(String))
|
21
|
+
@created_at = T.let(nil, T.nilable(String))
|
22
|
+
@fulfillment_service = T.let(nil, T.nilable(String))
|
23
|
+
@grams = T.let(nil, T.nilable(Integer))
|
24
|
+
@id = T.let(nil, T.nilable(Integer))
|
25
|
+
@image_id = T.let(nil, T.nilable(Integer))
|
26
|
+
@inventory_item_id = T.let(nil, T.nilable(Integer))
|
27
|
+
@inventory_management = T.let(nil, T.nilable(String))
|
28
|
+
@inventory_policy = T.let(nil, T.nilable(String))
|
29
|
+
@inventory_quantity = T.let(nil, T.nilable(Integer))
|
30
|
+
@inventory_quantity_adjustment = T.let(nil, T.nilable(Integer))
|
31
|
+
@old_inventory_quantity = T.let(nil, T.nilable(Integer))
|
32
|
+
@option = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
33
|
+
@position = T.let(nil, T.nilable(Integer))
|
34
|
+
@presentment_prices = T.let(nil, T.nilable(T::Array[T.untyped]))
|
35
|
+
@price = T.let(nil, T.nilable(String))
|
36
|
+
@product_id = T.let(nil, T.nilable(Integer))
|
37
|
+
@requires_shipping = T.let(nil, T.nilable(T::Boolean))
|
38
|
+
@sku = T.let(nil, T.nilable(String))
|
39
|
+
@tax_code = T.let(nil, T.nilable(String))
|
40
|
+
@taxable = T.let(nil, T.nilable(T::Boolean))
|
41
|
+
@title = T.let(nil, T.nilable(String))
|
42
|
+
@updated_at = T.let(nil, T.nilable(String))
|
43
|
+
@weight = T.let(nil, T.nilable(Float))
|
44
|
+
@weight_unit = T.let(nil, T.nilable(String))
|
45
|
+
end
|
46
|
+
|
47
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
48
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
49
|
+
@paths = T.let([
|
50
|
+
{http_method: :delete, operation: :delete, ids: [:product_id, :id], path: "products/<product_id>/variants/<id>.json"},
|
51
|
+
{http_method: :get, operation: :count, ids: [:product_id], path: "products/<product_id>/variants/count.json"},
|
52
|
+
{http_method: :get, operation: :get, ids: [:product_id], path: "products/<product_id>/variants.json"},
|
53
|
+
{http_method: :get, operation: :get, ids: [:id], path: "variants/<id>.json"},
|
54
|
+
{http_method: :post, operation: :post, ids: [:product_id], path: "products/<product_id>/variants.json"},
|
55
|
+
{http_method: :put, operation: :put, ids: [:id], path: "variants/<id>.json"}
|
56
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
57
|
+
@read_only_attributes = T.let([
|
58
|
+
:inventory_quantity,
|
59
|
+
:inventory_quantity_adjustment
|
60
|
+
], T::Array[Symbol])
|
61
|
+
|
62
|
+
sig { returns(T.nilable(String)) }
|
63
|
+
attr_reader :barcode
|
64
|
+
sig { returns(T.nilable(String)) }
|
65
|
+
attr_reader :compare_at_price
|
66
|
+
sig { returns(T.nilable(String)) }
|
67
|
+
attr_reader :created_at
|
68
|
+
sig { returns(T.nilable(String)) }
|
69
|
+
attr_reader :fulfillment_service
|
70
|
+
sig { returns(T.nilable(Integer)) }
|
71
|
+
attr_reader :grams
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
73
|
+
attr_reader :id
|
74
|
+
sig { returns(T.nilable(Integer)) }
|
75
|
+
attr_reader :image_id
|
76
|
+
sig { returns(T.nilable(Integer)) }
|
77
|
+
attr_reader :inventory_item_id
|
78
|
+
sig { returns(T.nilable(String)) }
|
79
|
+
attr_reader :inventory_management
|
80
|
+
sig { returns(T.nilable(String)) }
|
81
|
+
attr_reader :inventory_policy
|
82
|
+
sig { returns(T.nilable(Integer)) }
|
83
|
+
attr_reader :inventory_quantity
|
84
|
+
sig { returns(T.nilable(Integer)) }
|
85
|
+
attr_reader :inventory_quantity_adjustment
|
86
|
+
sig { returns(T.nilable(Integer)) }
|
87
|
+
attr_reader :old_inventory_quantity
|
88
|
+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
89
|
+
attr_reader :option
|
90
|
+
sig { returns(T.nilable(Integer)) }
|
91
|
+
attr_reader :position
|
92
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
93
|
+
attr_reader :presentment_prices
|
94
|
+
sig { returns(T.nilable(String)) }
|
95
|
+
attr_reader :price
|
96
|
+
sig { returns(T.nilable(Integer)) }
|
97
|
+
attr_reader :product_id
|
98
|
+
sig { returns(T.nilable(T::Boolean)) }
|
99
|
+
attr_reader :requires_shipping
|
100
|
+
sig { returns(T.nilable(String)) }
|
101
|
+
attr_reader :sku
|
102
|
+
sig { returns(T.nilable(String)) }
|
103
|
+
attr_reader :tax_code
|
104
|
+
sig { returns(T.nilable(T::Boolean)) }
|
105
|
+
attr_reader :taxable
|
106
|
+
sig { returns(T.nilable(String)) }
|
107
|
+
attr_reader :title
|
108
|
+
sig { returns(T.nilable(String)) }
|
109
|
+
attr_reader :updated_at
|
110
|
+
sig { returns(T.nilable(Float)) }
|
111
|
+
attr_reader :weight
|
112
|
+
sig { returns(T.nilable(String)) }
|
113
|
+
attr_reader :weight_unit
|
114
|
+
|
115
|
+
class << self
|
116
|
+
sig do
|
117
|
+
params(
|
118
|
+
id: T.any(Integer, String),
|
119
|
+
fields: T.untyped,
|
120
|
+
session: Auth::Session
|
121
|
+
).returns(T.nilable(Variant))
|
122
|
+
end
|
123
|
+
def find(
|
124
|
+
id:,
|
125
|
+
fields: nil,
|
126
|
+
session: ShopifyAPI::Context.active_session
|
127
|
+
)
|
128
|
+
result = base_find(
|
129
|
+
session: session,
|
130
|
+
ids: {id: id},
|
131
|
+
params: {fields: fields},
|
132
|
+
)
|
133
|
+
T.cast(result[0], T.nilable(Variant))
|
134
|
+
end
|
135
|
+
|
136
|
+
sig do
|
137
|
+
params(
|
138
|
+
id: T.any(Integer, String),
|
139
|
+
product_id: T.nilable(T.any(Integer, String)),
|
140
|
+
session: Auth::Session
|
141
|
+
).returns(T.untyped)
|
142
|
+
end
|
143
|
+
def delete(
|
144
|
+
id:,
|
145
|
+
product_id: nil,
|
146
|
+
session: ShopifyAPI::Context.active_session
|
147
|
+
)
|
148
|
+
request(
|
149
|
+
http_method: :delete,
|
150
|
+
operation: :delete,
|
151
|
+
session: session,
|
152
|
+
ids: {id: id, product_id: product_id},
|
153
|
+
params: {},
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
sig do
|
158
|
+
params(
|
159
|
+
product_id: T.nilable(T.any(Integer, String)),
|
160
|
+
limit: T.untyped,
|
161
|
+
presentment_currencies: T.untyped,
|
162
|
+
since_id: T.untyped,
|
163
|
+
fields: T.untyped,
|
164
|
+
session: Auth::Session,
|
165
|
+
kwargs: T.untyped
|
166
|
+
).returns(T::Array[Variant])
|
167
|
+
end
|
168
|
+
def all(
|
169
|
+
product_id: nil,
|
170
|
+
limit: nil,
|
171
|
+
presentment_currencies: nil,
|
172
|
+
since_id: nil,
|
173
|
+
fields: nil,
|
174
|
+
session: ShopifyAPI::Context.active_session,
|
175
|
+
**kwargs
|
176
|
+
)
|
177
|
+
response = base_find(
|
178
|
+
session: session,
|
179
|
+
ids: {product_id: product_id},
|
180
|
+
params: {limit: limit, presentment_currencies: presentment_currencies, since_id: since_id, fields: fields}.merge(kwargs).compact,
|
181
|
+
)
|
182
|
+
|
183
|
+
T.cast(response, T::Array[Variant])
|
184
|
+
end
|
185
|
+
|
186
|
+
sig do
|
187
|
+
params(
|
188
|
+
product_id: T.nilable(T.any(Integer, String)),
|
189
|
+
session: Auth::Session,
|
190
|
+
kwargs: T.untyped
|
191
|
+
).returns(T.untyped)
|
192
|
+
end
|
193
|
+
def count(
|
194
|
+
product_id: nil,
|
195
|
+
session: ShopifyAPI::Context.active_session,
|
196
|
+
**kwargs
|
197
|
+
)
|
198
|
+
request(
|
199
|
+
http_method: :get,
|
200
|
+
operation: :count,
|
201
|
+
session: session,
|
202
|
+
ids: {product_id: product_id},
|
203
|
+
params: {}.merge(kwargs).compact,
|
204
|
+
body: {},
|
205
|
+
entity: nil,
|
206
|
+
)
|
207
|
+
end
|
208
|
+
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
212
|
+
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
########################################################################################################################
|
5
|
+
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
|
6
|
+
########################################################################################################################
|
7
|
+
|
8
|
+
module ShopifyAPI
|
9
|
+
class Webhook < ShopifyAPI::Rest::Base
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
@prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
13
|
+
@next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
14
|
+
|
15
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session)).void }
|
16
|
+
def initialize(session: ShopifyAPI::Context.active_session)
|
17
|
+
super(session: session)
|
18
|
+
|
19
|
+
@address = T.let(nil, T.nilable(String))
|
20
|
+
@topic = T.let(nil, T.nilable(String))
|
21
|
+
@api_version = T.let(nil, T.nilable(String))
|
22
|
+
@created_at = T.let(nil, T.nilable(String))
|
23
|
+
@fields = T.let(nil, T.nilable(T::Array[T.untyped]))
|
24
|
+
@format = T.let(nil, T.nilable(String))
|
25
|
+
@id = T.let(nil, T.nilable(Integer))
|
26
|
+
@metafield_namespaces = T.let(nil, T.nilable(T::Array[T.untyped]))
|
27
|
+
@private_metafield_namespaces = T.let(nil, T.nilable(T::Array[T.untyped]))
|
28
|
+
@updated_at = T.let(nil, T.nilable(String))
|
29
|
+
end
|
30
|
+
|
31
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
32
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
33
|
+
@paths = T.let([
|
34
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "webhooks/<id>.json"},
|
35
|
+
{http_method: :get, operation: :count, ids: [], path: "webhooks/count.json"},
|
36
|
+
{http_method: :get, operation: :get, ids: [], path: "webhooks.json"},
|
37
|
+
{http_method: :get, operation: :get, ids: [:id], path: "webhooks/<id>.json"},
|
38
|
+
{http_method: :post, operation: :post, ids: [], path: "webhooks.json"},
|
39
|
+
{http_method: :put, operation: :put, ids: [:id], path: "webhooks/<id>.json"}
|
40
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
41
|
+
|
42
|
+
sig { returns(T.nilable(String)) }
|
43
|
+
attr_reader :address
|
44
|
+
sig { returns(T.nilable(String)) }
|
45
|
+
attr_reader :topic
|
46
|
+
sig { returns(T.nilable(String)) }
|
47
|
+
attr_reader :api_version
|
48
|
+
sig { returns(T.nilable(String)) }
|
49
|
+
attr_reader :created_at
|
50
|
+
sig { returns(T.nilable(T::Array[String])) }
|
51
|
+
attr_reader :fields
|
52
|
+
sig { returns(T.nilable(String)) }
|
53
|
+
attr_reader :format
|
54
|
+
sig { returns(T.nilable(Integer)) }
|
55
|
+
attr_reader :id
|
56
|
+
sig { returns(T.nilable(T::Array[String])) }
|
57
|
+
attr_reader :metafield_namespaces
|
58
|
+
sig { returns(T.nilable(T::Array[String])) }
|
59
|
+
attr_reader :private_metafield_namespaces
|
60
|
+
sig { returns(T.nilable(String)) }
|
61
|
+
attr_reader :updated_at
|
62
|
+
|
63
|
+
class << self
|
64
|
+
sig do
|
65
|
+
params(
|
66
|
+
id: T.any(Integer, String),
|
67
|
+
fields: T.untyped,
|
68
|
+
session: Auth::Session
|
69
|
+
).returns(T.nilable(Webhook))
|
70
|
+
end
|
71
|
+
def find(
|
72
|
+
id:,
|
73
|
+
fields: nil,
|
74
|
+
session: ShopifyAPI::Context.active_session
|
75
|
+
)
|
76
|
+
result = base_find(
|
77
|
+
session: session,
|
78
|
+
ids: {id: id},
|
79
|
+
params: {fields: fields},
|
80
|
+
)
|
81
|
+
T.cast(result[0], T.nilable(Webhook))
|
82
|
+
end
|
83
|
+
|
84
|
+
sig do
|
85
|
+
params(
|
86
|
+
id: T.any(Integer, String),
|
87
|
+
session: Auth::Session
|
88
|
+
).returns(T.untyped)
|
89
|
+
end
|
90
|
+
def delete(
|
91
|
+
id:,
|
92
|
+
session: ShopifyAPI::Context.active_session
|
93
|
+
)
|
94
|
+
request(
|
95
|
+
http_method: :delete,
|
96
|
+
operation: :delete,
|
97
|
+
session: session,
|
98
|
+
ids: {id: id},
|
99
|
+
params: {},
|
100
|
+
)
|
101
|
+
end
|
102
|
+
|
103
|
+
sig do
|
104
|
+
params(
|
105
|
+
address: T.untyped,
|
106
|
+
created_at_max: T.untyped,
|
107
|
+
created_at_min: T.untyped,
|
108
|
+
fields: T.untyped,
|
109
|
+
limit: T.untyped,
|
110
|
+
since_id: T.untyped,
|
111
|
+
topic: T.untyped,
|
112
|
+
updated_at_min: T.untyped,
|
113
|
+
updated_at_max: T.untyped,
|
114
|
+
session: Auth::Session,
|
115
|
+
kwargs: T.untyped
|
116
|
+
).returns(T::Array[Webhook])
|
117
|
+
end
|
118
|
+
def all(
|
119
|
+
address: nil,
|
120
|
+
created_at_max: nil,
|
121
|
+
created_at_min: nil,
|
122
|
+
fields: nil,
|
123
|
+
limit: nil,
|
124
|
+
since_id: nil,
|
125
|
+
topic: nil,
|
126
|
+
updated_at_min: nil,
|
127
|
+
updated_at_max: nil,
|
128
|
+
session: ShopifyAPI::Context.active_session,
|
129
|
+
**kwargs
|
130
|
+
)
|
131
|
+
response = base_find(
|
132
|
+
session: session,
|
133
|
+
ids: {},
|
134
|
+
params: {address: address, created_at_max: created_at_max, created_at_min: created_at_min, fields: fields, limit: limit, since_id: since_id, topic: topic, updated_at_min: updated_at_min, updated_at_max: updated_at_max}.merge(kwargs).compact,
|
135
|
+
)
|
136
|
+
|
137
|
+
T.cast(response, T::Array[Webhook])
|
138
|
+
end
|
139
|
+
|
140
|
+
sig do
|
141
|
+
params(
|
142
|
+
address: T.untyped,
|
143
|
+
topic: T.untyped,
|
144
|
+
session: Auth::Session,
|
145
|
+
kwargs: T.untyped
|
146
|
+
).returns(T.untyped)
|
147
|
+
end
|
148
|
+
def count(
|
149
|
+
address: nil,
|
150
|
+
topic: nil,
|
151
|
+
session: ShopifyAPI::Context.active_session,
|
152
|
+
**kwargs
|
153
|
+
)
|
154
|
+
request(
|
155
|
+
http_method: :get,
|
156
|
+
operation: :count,
|
157
|
+
session: session,
|
158
|
+
ids: {},
|
159
|
+
params: {address: address, topic: topic}.merge(kwargs).compact,
|
160
|
+
body: {},
|
161
|
+
entity: nil,
|
162
|
+
)
|
163
|
+
end
|
164
|
+
|
165
|
+
end
|
166
|
+
|
167
|
+
end
|
168
|
+
end
|
@@ -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,30 +13,33 @@ 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)
|
20
|
+
validate_session_storage_for_deprecated_utils
|
20
21
|
return load_private_session if Context.private?
|
21
22
|
|
22
23
|
session_id = current_session_id(auth_header, cookies, is_online)
|
23
24
|
return nil unless session_id
|
24
25
|
|
25
|
-
Context.session_storage.load_session(session_id)
|
26
|
+
T.must(Context.session_storage).load_session(session_id)
|
26
27
|
end
|
27
28
|
|
28
29
|
sig do
|
29
30
|
params(
|
30
31
|
auth_header: T.nilable(String),
|
31
32
|
cookies: T.nilable(T::Hash[String, String]),
|
32
|
-
is_online: T::Boolean
|
33
|
+
is_online: T::Boolean,
|
33
34
|
).returns(T::Boolean)
|
34
35
|
end
|
35
36
|
def delete_current_session(auth_header: nil, cookies: nil, is_online: false)
|
37
|
+
validate_session_storage_for_deprecated_utils
|
38
|
+
|
36
39
|
session_id = current_session_id(auth_header, cookies, is_online)
|
37
40
|
return false unless session_id
|
38
41
|
|
39
|
-
Context.session_storage.delete_session(session_id)
|
42
|
+
T.must(Context.session_storage).delete_session(session_id)
|
40
43
|
end
|
41
44
|
|
42
45
|
sig do
|
@@ -46,8 +49,10 @@ module ShopifyAPI
|
|
46
49
|
).returns(T.nilable(Auth::Session))
|
47
50
|
end
|
48
51
|
def load_offline_session(shop:, include_expired: false)
|
52
|
+
validate_session_storage_for_deprecated_utils
|
53
|
+
|
49
54
|
session_id = offline_session_id(shop)
|
50
|
-
session = Context.session_storage.load_session(session_id)
|
55
|
+
session = T.must(Context.session_storage).load_session(session_id)
|
51
56
|
return nil if session && !include_expired && session.expires && T.must(session.expires) < Time.now
|
52
57
|
|
53
58
|
session
|
@@ -55,42 +60,31 @@ module ShopifyAPI
|
|
55
60
|
|
56
61
|
sig do
|
57
62
|
params(
|
58
|
-
shop: String
|
63
|
+
shop: String,
|
59
64
|
).returns(T::Boolean)
|
60
65
|
end
|
61
66
|
def delete_offline_session(shop:)
|
62
|
-
|
63
|
-
Context.session_storage.delete_session(session_id)
|
64
|
-
end
|
65
|
-
|
66
|
-
private
|
67
|
-
|
68
|
-
sig { returns(Auth::Session) }
|
69
|
-
def load_private_session
|
70
|
-
unless Context.private_shop
|
71
|
-
raise Errors::SessionNotFoundError, "Could not load private shop, Context.private_shop is nil."
|
72
|
-
end
|
67
|
+
validate_session_storage_for_deprecated_utils
|
73
68
|
|
74
|
-
|
75
|
-
|
76
|
-
access_token: Context.api_secret_key,
|
77
|
-
scope: Context.scope.to_a
|
78
|
-
)
|
69
|
+
session_id = offline_session_id(shop)
|
70
|
+
T.must(Context.session_storage).delete_session(session_id)
|
79
71
|
end
|
80
72
|
|
81
73
|
sig do
|
82
74
|
params(
|
83
75
|
auth_header: T.nilable(String),
|
84
76
|
cookies: T.nilable(T::Hash[String, String]),
|
85
|
-
online: T::Boolean
|
77
|
+
online: T::Boolean,
|
86
78
|
).returns(T.nilable(String))
|
87
79
|
end
|
88
80
|
def current_session_id(auth_header, cookies, online)
|
89
81
|
if Context.embedded?
|
90
82
|
if auth_header
|
91
83
|
matches = auth_header.match(/^Bearer (.+)$/)
|
92
|
-
|
93
|
-
"Missing Bearer token in authorization header"
|
84
|
+
unless matches
|
85
|
+
ShopifyAPI::Logger.warn("Missing Bearer token in authorization header")
|
86
|
+
raise Errors::MissingJwtTokenError, "Missing Bearer token in authorization header"
|
87
|
+
end
|
94
88
|
|
95
89
|
jwt_payload = Auth::JwtPayload.new(T.must(matches[1]))
|
96
90
|
shop = jwt_payload.shop
|
@@ -129,6 +123,29 @@ module ShopifyAPI
|
|
129
123
|
def cookie_session_id(cookies)
|
130
124
|
cookies[Auth::Oauth::SessionCookie::SESSION_COOKIE_NAME]
|
131
125
|
end
|
126
|
+
|
127
|
+
private
|
128
|
+
|
129
|
+
sig { void }
|
130
|
+
def validate_session_storage_for_deprecated_utils
|
131
|
+
unless Context.session_storage
|
132
|
+
raise ShopifyAPI::Errors::SessionStorageError,
|
133
|
+
"session_storage is required in ShopifyAPI::Context when using deprecated Session utility methods."
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
sig { returns(Auth::Session) }
|
138
|
+
def load_private_session
|
139
|
+
unless Context.private_shop
|
140
|
+
raise Errors::SessionNotFoundError, "Could not load private shop, Context.private_shop is nil."
|
141
|
+
end
|
142
|
+
|
143
|
+
Auth::Session.new(
|
144
|
+
shop: T.must(Context.private_shop),
|
145
|
+
access_token: Context.api_secret_key,
|
146
|
+
scope: Context.scope.to_a,
|
147
|
+
)
|
148
|
+
end
|
132
149
|
end
|
133
150
|
end
|
134
151
|
end
|
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
|
+
"#{Context.host_scheme}://#{@path}"
|
16
|
+
else
|
17
|
+
"#{Context.host}/#{@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
data/shopify_api.gemspec
CHANGED
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
|
33
33
|
s.required_ruby_version = ">= 2.6"
|
34
34
|
|
35
|
+
s.add_runtime_dependency("activesupport")
|
35
36
|
s.add_runtime_dependency("concurrent-ruby")
|
36
37
|
s.add_runtime_dependency("hash_diff")
|
37
38
|
s.add_runtime_dependency("httparty")
|
@@ -40,13 +41,14 @@ Gem::Specification.new do |s|
|
|
40
41
|
s.add_runtime_dependency("openssl")
|
41
42
|
s.add_runtime_dependency("securerandom")
|
42
43
|
s.add_runtime_dependency("sorbet-runtime")
|
43
|
-
s.add_runtime_dependency("zeitwerk", "~> 2.5")
|
44
|
+
s.add_runtime_dependency("zeitwerk", "~> 2.5", "< 2.6.5") # https://github.com/Shopify/shopify-api-ruby/issues/1058
|
44
45
|
|
45
|
-
s.add_development_dependency("
|
46
|
+
s.add_development_dependency("pry-byebug")
|
46
47
|
s.add_development_dependency("rake")
|
47
48
|
s.add_development_dependency("rubocop")
|
48
49
|
s.add_development_dependency("rubocop-shopify")
|
49
50
|
s.add_development_dependency("rubocop-sorbet")
|
51
|
+
s.add_development_dependency("ruby-lsp")
|
50
52
|
s.add_development_dependency("sorbet")
|
51
53
|
s.add_development_dependency("tapioca")
|
52
54
|
end
|