shopify_api 12.4.0 → 12.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/api_update_reminder.md +25 -0
- data/.github/api_update_reminder_on_release.md +19 -0
- data/.github/workflows/api_update_reminder.yml +16 -0
- data/.github/workflows/api_update_reminder_on_release.yml +16 -0
- data/.github/workflows/stale.yml +20 -10
- data/CHANGELOG.md +11 -4
- data/CONTRIBUTING.md +2 -2
- data/Gemfile.lock +6 -6
- data/README.md +10 -10
- data/docs/getting_started.md +2 -2
- data/docs/usage/graphql.md +6 -0
- data/docs/usage/graphql_storefront.md +8 -2
- data/docs/usage/oauth.md +1 -1
- data/docs/usage/rest.md +9 -2
- data/docs/usage/webhooks.md +1 -1
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/clients/graphql/admin.rb +3 -3
- data/lib/shopify_api/clients/graphql/client.rb +13 -3
- data/lib/shopify_api/clients/graphql/storefront.rb +3 -3
- data/lib/shopify_api/clients/http_client.rb +8 -1
- data/lib/shopify_api/clients/rest/admin.rb +14 -3
- data/lib/shopify_api/rest/base.rb +3 -1
- data/lib/shopify_api/rest/resources/2022_07/application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2022_07/application_credit.rb +6 -1
- data/lib/shopify_api/rest/resources/2022_07/gift_card.rb +4 -4
- data/lib/shopify_api/rest/resources/2022_07/metafield.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/order.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/recurring_application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2022_07/shipping_zone.rb +6 -6
- data/lib/shopify_api/rest/resources/2022_07/usage_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2022_10/application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2022_10/application_credit.rb +6 -1
- data/lib/shopify_api/rest/resources/2022_10/gift_card.rb +4 -4
- data/lib/shopify_api/rest/resources/2022_10/metafield.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_10/order.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_10/recurring_application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2022_10/shipping_zone.rb +6 -6
- data/lib/shopify_api/rest/resources/2022_10/usage_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2023_01/application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2023_01/application_credit.rb +6 -1
- data/lib/shopify_api/rest/resources/2023_01/dispute_evidence.rb +117 -0
- data/lib/shopify_api/rest/resources/{2022_04/storefront_access_token.rb → 2023_01/dispute_file_upload.rb} +27 -33
- data/lib/shopify_api/rest/resources/2023_01/gift_card.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_01/metafield.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_01/order.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_01/recurring_application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/2023_01/shipping_zone.rb +6 -6
- data/lib/shopify_api/rest/resources/2023_01/usage_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/application_credit.rb +6 -1
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/carrier_service.rb +0 -3
- data/lib/shopify_api/rest/resources/2023_04/dispute_evidence.rb +117 -0
- data/lib/shopify_api/rest/resources/{2022_04/android_pay_key.rb → 2023_04/dispute_file_upload.rb} +29 -25
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/fulfillment.rb +2 -49
- data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/fulfillment_order.rb +36 -8
- data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/fulfillment_service.rb +3 -3
- data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/gift_card.rb +4 -4
- data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/metafield.rb +2 -2
- data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/order.rb +14 -2
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/recurring_application_charge.rb +6 -1
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/shipping_zone.rb +6 -6
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/shop.rb +3 -0
- data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/transaction.rb +3 -0
- data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/usage_charge.rb +6 -1
- data/lib/shopify_api/version.rb +1 -1
- data/shopify_api.gemspec +1 -1
- metadata +85 -152
- data/lib/shopify_api/rest/resources/2022_01/android_pay_key.rb +0 -77
- data/lib/shopify_api/rest/resources/2022_01/customer.rb +0 -326
- data/lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb +0 -281
- data/lib/shopify_api/rest/resources/2022_01/fulfillment_service.rb +0 -130
- data/lib/shopify_api/rest/resources/2022_01/gift_card.rb +0 -215
- data/lib/shopify_api/rest/resources/2022_01/metafield.rb +0 -349
- data/lib/shopify_api/rest/resources/2022_01/order.rb +0 -473
- data/lib/shopify_api/rest/resources/2022_01/price_rule.rb +0 -223
- data/lib/shopify_api/rest/resources/2022_01/usage_charge.rb +0 -97
- data/lib/shopify_api/rest/resources/2022_04/abandoned_checkout.rb +0 -190
- data/lib/shopify_api/rest/resources/2022_04/access_scope.rb +0 -58
- data/lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb +0 -105
- data/lib/shopify_api/rest/resources/2022_04/application_charge.rb +0 -104
- data/lib/shopify_api/rest/resources/2022_04/application_credit.rb +0 -87
- data/lib/shopify_api/rest/resources/2022_04/article.rb +0 -265
- data/lib/shopify_api/rest/resources/2022_04/asset.rb +0 -118
- data/lib/shopify_api/rest/resources/2022_04/assigned_fulfillment_order.rb +0 -86
- data/lib/shopify_api/rest/resources/2022_04/balance.rb +0 -50
- data/lib/shopify_api/rest/resources/2022_04/blog.rb +0 -162
- data/lib/shopify_api/rest/resources/2022_04/cancellation_request.rb +0 -83
- data/lib/shopify_api/rest/resources/2022_04/carrier_service.rb +0 -116
- data/lib/shopify_api/rest/resources/2022_04/checkout.rb +0 -209
- data/lib/shopify_api/rest/resources/2022_04/collect.rb +0 -142
- data/lib/shopify_api/rest/resources/2022_04/collection.rb +0 -110
- data/lib/shopify_api/rest/resources/2022_04/collection_listing.rb +0 -155
- data/lib/shopify_api/rest/resources/2022_04/comment.rb +0 -283
- data/lib/shopify_api/rest/resources/2022_04/country.rb +0 -137
- data/lib/shopify_api/rest/resources/2022_04/currency.rb +0 -57
- data/lib/shopify_api/rest/resources/2022_04/custom_collection.rb +0 -187
- data/lib/shopify_api/rest/resources/2022_04/customer_address.rb +0 -201
- data/lib/shopify_api/rest/resources/2022_04/customer_saved_search.rb +0 -169
- data/lib/shopify_api/rest/resources/2022_04/deprecated_api_call.rb +0 -57
- data/lib/shopify_api/rest/resources/2022_04/discount_code.rb +0 -219
- data/lib/shopify_api/rest/resources/2022_04/dispute.rb +0 -111
- data/lib/shopify_api/rest/resources/2022_04/draft_order.rb +0 -275
- data/lib/shopify_api/rest/resources/2022_04/event.rb +0 -148
- data/lib/shopify_api/rest/resources/2022_04/fulfillment.rb +0 -272
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_event.rb +0 -166
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_request.rb +0 -87
- data/lib/shopify_api/rest/resources/2022_04/gift_card_adjustment.rb +0 -118
- data/lib/shopify_api/rest/resources/2022_04/image.rb +0 -157
- data/lib/shopify_api/rest/resources/2022_04/inventory_item.rb +0 -108
- data/lib/shopify_api/rest/resources/2022_04/inventory_level.rb +0 -179
- data/lib/shopify_api/rest/resources/2022_04/location.rb +0 -167
- data/lib/shopify_api/rest/resources/2022_04/locations_for_move.rb +0 -56
- data/lib/shopify_api/rest/resources/2022_04/marketing_event.rb +0 -209
- data/lib/shopify_api/rest/resources/2022_04/mobile_platform_application.rb +0 -110
- data/lib/shopify_api/rest/resources/2022_04/order_risk.rb +0 -135
- data/lib/shopify_api/rest/resources/2022_04/page.rb +0 -194
- data/lib/shopify_api/rest/resources/2022_04/payment.rb +0 -140
- data/lib/shopify_api/rest/resources/2022_04/payment_gateway.rb +0 -143
- data/lib/shopify_api/rest/resources/2022_04/payment_transaction.rb +0 -107
- data/lib/shopify_api/rest/resources/2022_04/payout.rb +0 -97
- data/lib/shopify_api/rest/resources/2022_04/policy.rb +0 -69
- data/lib/shopify_api/rest/resources/2022_04/product.rb +0 -223
- data/lib/shopify_api/rest/resources/2022_04/product_listing.rb +0 -196
- data/lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb +0 -88
- data/lib/shopify_api/rest/resources/2022_04/province.rb +0 -132
- data/lib/shopify_api/rest/resources/2022_04/recurring_application_charge.rb +0 -167
- data/lib/shopify_api/rest/resources/2022_04/redirect.rb +0 -139
- data/lib/shopify_api/rest/resources/2022_04/refund.rb +0 -151
- data/lib/shopify_api/rest/resources/2022_04/report.rb +0 -121
- data/lib/shopify_api/rest/resources/2022_04/resource_feedback.rb +0 -73
- data/lib/shopify_api/rest/resources/2022_04/script_tag.rb +0 -155
- data/lib/shopify_api/rest/resources/2022_04/shipping_zone.rb +0 -83
- data/lib/shopify_api/rest/resources/2022_04/shop.rb +0 -218
- data/lib/shopify_api/rest/resources/2022_04/smart_collection.rb +0 -216
- data/lib/shopify_api/rest/resources/2022_04/tender_transaction.rb +0 -93
- data/lib/shopify_api/rest/resources/2022_04/theme.rb +0 -120
- data/lib/shopify_api/rest/resources/2022_04/transaction.rb +0 -181
- data/lib/shopify_api/rest/resources/2022_04/user.rb +0 -138
- data/lib/shopify_api/rest/resources/2022_04/variant.rb +0 -212
- data/lib/shopify_api/rest/resources/2022_04/webhook.rb +0 -168
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/abandoned_checkout.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/access_scope.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/apple_pay_certificate.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/article.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/asset.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/assigned_fulfillment_order.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/balance.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/blog.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/cancellation_request.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/checkout.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/collect.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/collection.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/collection_listing.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/comment.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/country.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/currency.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/custom_collection.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/customer.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/customer_address.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/customer_saved_search.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/deprecated_api_call.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/discount_code.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/dispute.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/draft_order.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/event.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/fulfillment_event.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/fulfillment_request.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/gift_card_adjustment.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/image.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/inventory_item.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/inventory_level.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/location.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/locations_for_move.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/marketing_event.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/mobile_platform_application.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/order_risk.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/page.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payment.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payment_gateway.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payment_transaction.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payout.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/policy.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/price_rule.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/product.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/product_listing.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/product_resource_feedback.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/province.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/redirect.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/refund.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/report.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/resource_feedback.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/script_tag.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/smart_collection.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/storefront_access_token.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/tender_transaction.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/theme.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/user.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/variant.rb +0 -0
- /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/webhook.rb +0 -0
@@ -1,83 +0,0 @@
|
|
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 CancellationRequest < 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
|
-
@fulfillment_order_id = T.let(nil, T.nilable(Integer))
|
20
|
-
end
|
21
|
-
|
22
|
-
@has_one = T.let({}, T::Hash[Symbol, Class])
|
23
|
-
@has_many = T.let({}, T::Hash[Symbol, Class])
|
24
|
-
@paths = T.let([
|
25
|
-
{http_method: :post, operation: :accept, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/cancellation_request/accept.json"},
|
26
|
-
{http_method: :post, operation: :post, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/cancellation_request.json"},
|
27
|
-
{http_method: :post, operation: :reject, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/cancellation_request/reject.json"}
|
28
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
29
|
-
|
30
|
-
sig { returns(T.nilable(Integer)) }
|
31
|
-
attr_reader :fulfillment_order_id
|
32
|
-
|
33
|
-
class << self
|
34
|
-
end
|
35
|
-
|
36
|
-
sig do
|
37
|
-
params(
|
38
|
-
message: T.untyped,
|
39
|
-
body: T.untyped,
|
40
|
-
kwargs: T.untyped
|
41
|
-
).returns(T.untyped)
|
42
|
-
end
|
43
|
-
def accept(
|
44
|
-
message: nil,
|
45
|
-
body: nil,
|
46
|
-
**kwargs
|
47
|
-
)
|
48
|
-
self.class.request(
|
49
|
-
http_method: :post,
|
50
|
-
operation: :accept,
|
51
|
-
session: @session,
|
52
|
-
ids: {fulfillment_order_id: @fulfillment_order_id},
|
53
|
-
params: {message: message}.merge(kwargs).compact,
|
54
|
-
body: body,
|
55
|
-
entity: self,
|
56
|
-
)
|
57
|
-
end
|
58
|
-
|
59
|
-
sig do
|
60
|
-
params(
|
61
|
-
message: T.untyped,
|
62
|
-
body: T.untyped,
|
63
|
-
kwargs: T.untyped
|
64
|
-
).returns(T.untyped)
|
65
|
-
end
|
66
|
-
def reject(
|
67
|
-
message: nil,
|
68
|
-
body: nil,
|
69
|
-
**kwargs
|
70
|
-
)
|
71
|
-
self.class.request(
|
72
|
-
http_method: :post,
|
73
|
-
operation: :reject,
|
74
|
-
session: @session,
|
75
|
-
ids: {fulfillment_order_id: @fulfillment_order_id},
|
76
|
-
params: {message: message}.merge(kwargs).compact,
|
77
|
-
body: body,
|
78
|
-
entity: self,
|
79
|
-
)
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
83
|
-
end
|
@@ -1,116 +0,0 @@
|
|
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 CarrierService < 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
|
-
@active = T.let(nil, T.nilable(T::Boolean))
|
20
|
-
@admin_graphql_api_id = T.let(nil, T.nilable(String))
|
21
|
-
@callback_url = T.let(nil, T.nilable(String))
|
22
|
-
@carrier_service_type = T.let(nil, T.nilable(String))
|
23
|
-
@format = T.let(nil, T.nilable(String))
|
24
|
-
@id = T.let(nil, T.nilable(Integer))
|
25
|
-
@name = T.let(nil, T.nilable(String))
|
26
|
-
@service_discovery = T.let(nil, T.nilable(T::Boolean))
|
27
|
-
end
|
28
|
-
|
29
|
-
@has_one = T.let({}, T::Hash[Symbol, Class])
|
30
|
-
@has_many = T.let({}, T::Hash[Symbol, Class])
|
31
|
-
@paths = T.let([
|
32
|
-
{http_method: :delete, operation: :delete, ids: [:id], path: "carrier_services/<id>.json"},
|
33
|
-
{http_method: :get, operation: :get, ids: [], path: "carrier_services.json"},
|
34
|
-
{http_method: :get, operation: :get, ids: [:id], path: "carrier_services/<id>.json"},
|
35
|
-
{http_method: :post, operation: :post, ids: [], path: "carrier_services.json"},
|
36
|
-
{http_method: :put, operation: :put, ids: [:id], path: "carrier_services/<id>.json"}
|
37
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
38
|
-
|
39
|
-
sig { returns(T.nilable(T::Boolean)) }
|
40
|
-
attr_reader :active
|
41
|
-
sig { returns(T.nilable(String)) }
|
42
|
-
attr_reader :admin_graphql_api_id
|
43
|
-
sig { returns(T.nilable(String)) }
|
44
|
-
attr_reader :callback_url
|
45
|
-
sig { returns(T.nilable(String)) }
|
46
|
-
attr_reader :carrier_service_type
|
47
|
-
sig { returns(T.nilable(String)) }
|
48
|
-
attr_reader :format
|
49
|
-
sig { returns(T.nilable(Integer)) }
|
50
|
-
attr_reader :id
|
51
|
-
sig { returns(T.nilable(String)) }
|
52
|
-
attr_reader :name
|
53
|
-
sig { returns(T.nilable(T::Boolean)) }
|
54
|
-
attr_reader :service_discovery
|
55
|
-
|
56
|
-
class << self
|
57
|
-
sig do
|
58
|
-
params(
|
59
|
-
id: T.any(Integer, String),
|
60
|
-
session: Auth::Session
|
61
|
-
).returns(T.nilable(CarrierService))
|
62
|
-
end
|
63
|
-
def find(
|
64
|
-
id:,
|
65
|
-
session: ShopifyAPI::Context.active_session
|
66
|
-
)
|
67
|
-
result = base_find(
|
68
|
-
session: session,
|
69
|
-
ids: {id: id},
|
70
|
-
params: {},
|
71
|
-
)
|
72
|
-
T.cast(result[0], T.nilable(CarrierService))
|
73
|
-
end
|
74
|
-
|
75
|
-
sig do
|
76
|
-
params(
|
77
|
-
id: T.any(Integer, String),
|
78
|
-
session: Auth::Session
|
79
|
-
).returns(T.untyped)
|
80
|
-
end
|
81
|
-
def delete(
|
82
|
-
id:,
|
83
|
-
session: ShopifyAPI::Context.active_session
|
84
|
-
)
|
85
|
-
request(
|
86
|
-
http_method: :delete,
|
87
|
-
operation: :delete,
|
88
|
-
session: session,
|
89
|
-
ids: {id: id},
|
90
|
-
params: {},
|
91
|
-
)
|
92
|
-
end
|
93
|
-
|
94
|
-
sig do
|
95
|
-
params(
|
96
|
-
session: Auth::Session,
|
97
|
-
kwargs: T.untyped
|
98
|
-
).returns(T::Array[CarrierService])
|
99
|
-
end
|
100
|
-
def all(
|
101
|
-
session: ShopifyAPI::Context.active_session,
|
102
|
-
**kwargs
|
103
|
-
)
|
104
|
-
response = base_find(
|
105
|
-
session: session,
|
106
|
-
ids: {},
|
107
|
-
params: {}.merge(kwargs).compact,
|
108
|
-
)
|
109
|
-
|
110
|
-
T.cast(response, T::Array[CarrierService])
|
111
|
-
end
|
112
|
-
|
113
|
-
end
|
114
|
-
|
115
|
-
end
|
116
|
-
end
|
@@ -1,209 +0,0 @@
|
|
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 Checkout < 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
|
-
@billing_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
20
|
-
@line_items = T.let(nil, T.nilable(T::Array[T.untyped]))
|
21
|
-
@applied_discount = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
22
|
-
@buyer_accepts_marketing = T.let(nil, T.nilable(T::Boolean))
|
23
|
-
@created_at = T.let(nil, T.nilable(String))
|
24
|
-
@currency = T.let(nil, T.nilable(String))
|
25
|
-
@customer_id = T.let(nil, T.nilable(Integer))
|
26
|
-
@discount_code = T.let(nil, T.nilable(DiscountCode))
|
27
|
-
@email = T.let(nil, T.nilable(String))
|
28
|
-
@gift_cards = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
-
@order = T.let(nil, T.nilable(Order))
|
30
|
-
@payment_due = T.let(nil, T.nilable(String))
|
31
|
-
@payment_url = T.let(nil, T.nilable(String))
|
32
|
-
@phone = T.let(nil, T.nilable(String))
|
33
|
-
@presentment_currency = T.let(nil, T.nilable(String))
|
34
|
-
@requires_shipping = T.let(nil, T.nilable(T::Boolean))
|
35
|
-
@reservation_time = T.let(nil, T.nilable(String))
|
36
|
-
@reservation_time_left = T.let(nil, T.nilable(Integer))
|
37
|
-
@shipping_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
38
|
-
@shipping_line = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
39
|
-
@shipping_rate = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
40
|
-
@source_identifier = T.let(nil, T.nilable(String))
|
41
|
-
@source_name = T.let(nil, T.nilable(String))
|
42
|
-
@source_url = T.let(nil, T.nilable(String))
|
43
|
-
@subtotal_price = T.let(nil, T.nilable(String))
|
44
|
-
@tax_lines = T.let(nil, T.nilable(T::Array[T.untyped]))
|
45
|
-
@taxes_included = T.let(nil, T.nilable(T::Boolean))
|
46
|
-
@token = T.let(nil, T.nilable(String))
|
47
|
-
@total_price = T.let(nil, T.nilable(String))
|
48
|
-
@total_tax = T.let(nil, T.nilable(String))
|
49
|
-
@updated_at = T.let(nil, T.nilable(String))
|
50
|
-
@user_id = T.let(nil, T.nilable(Integer))
|
51
|
-
@web_url = T.let(nil, T.nilable(String))
|
52
|
-
end
|
53
|
-
|
54
|
-
@has_one = T.let({
|
55
|
-
discount_code: DiscountCode,
|
56
|
-
order: Order
|
57
|
-
}, T::Hash[Symbol, Class])
|
58
|
-
@has_many = T.let({
|
59
|
-
gift_cards: GiftCard
|
60
|
-
}, T::Hash[Symbol, Class])
|
61
|
-
@paths = T.let([
|
62
|
-
{http_method: :get, operation: :get, ids: [:token], path: "checkouts/<token>.json"},
|
63
|
-
{http_method: :get, operation: :shipping_rates, ids: [:token], path: "checkouts/<token>/shipping_rates.json"},
|
64
|
-
{http_method: :post, operation: :complete, ids: [:token], path: "checkouts/<token>/complete.json"},
|
65
|
-
{http_method: :post, operation: :post, ids: [], path: "checkouts.json"},
|
66
|
-
{http_method: :put, operation: :put, ids: [:token], path: "checkouts/<token>.json"}
|
67
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
68
|
-
|
69
|
-
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
70
|
-
attr_reader :billing_address
|
71
|
-
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
72
|
-
attr_reader :line_items
|
73
|
-
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
74
|
-
attr_reader :applied_discount
|
75
|
-
sig { returns(T.nilable(T::Boolean)) }
|
76
|
-
attr_reader :buyer_accepts_marketing
|
77
|
-
sig { returns(T.nilable(String)) }
|
78
|
-
attr_reader :created_at
|
79
|
-
sig { returns(T.nilable(String)) }
|
80
|
-
attr_reader :currency
|
81
|
-
sig { returns(T.nilable(Integer)) }
|
82
|
-
attr_reader :customer_id
|
83
|
-
sig { returns(T.nilable(DiscountCode)) }
|
84
|
-
attr_reader :discount_code
|
85
|
-
sig { returns(T.nilable(String)) }
|
86
|
-
attr_reader :email
|
87
|
-
sig { returns(T.nilable(T::Array[GiftCard])) }
|
88
|
-
attr_reader :gift_cards
|
89
|
-
sig { returns(T.nilable(Order)) }
|
90
|
-
attr_reader :order
|
91
|
-
sig { returns(T.nilable(String)) }
|
92
|
-
attr_reader :payment_due
|
93
|
-
sig { returns(T.nilable(String)) }
|
94
|
-
attr_reader :payment_url
|
95
|
-
sig { returns(T.nilable(String)) }
|
96
|
-
attr_reader :phone
|
97
|
-
sig { returns(T.nilable(String)) }
|
98
|
-
attr_reader :presentment_currency
|
99
|
-
sig { returns(T.nilable(T::Boolean)) }
|
100
|
-
attr_reader :requires_shipping
|
101
|
-
sig { returns(T.nilable(String)) }
|
102
|
-
attr_reader :reservation_time
|
103
|
-
sig { returns(T.nilable(Integer)) }
|
104
|
-
attr_reader :reservation_time_left
|
105
|
-
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
106
|
-
attr_reader :shipping_address
|
107
|
-
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
108
|
-
attr_reader :shipping_line
|
109
|
-
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
110
|
-
attr_reader :shipping_rate
|
111
|
-
sig { returns(T.nilable(String)) }
|
112
|
-
attr_reader :source_identifier
|
113
|
-
sig { returns(T.nilable(String)) }
|
114
|
-
attr_reader :source_name
|
115
|
-
sig { returns(T.nilable(String)) }
|
116
|
-
attr_reader :source_url
|
117
|
-
sig { returns(T.nilable(String)) }
|
118
|
-
attr_reader :subtotal_price
|
119
|
-
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
120
|
-
attr_reader :tax_lines
|
121
|
-
sig { returns(T.nilable(T::Boolean)) }
|
122
|
-
attr_reader :taxes_included
|
123
|
-
sig { returns(T.nilable(String)) }
|
124
|
-
attr_reader :token
|
125
|
-
sig { returns(T.nilable(String)) }
|
126
|
-
attr_reader :total_price
|
127
|
-
sig { returns(T.nilable(String)) }
|
128
|
-
attr_reader :total_tax
|
129
|
-
sig { returns(T.nilable(String)) }
|
130
|
-
attr_reader :updated_at
|
131
|
-
sig { returns(T.nilable(Integer)) }
|
132
|
-
attr_reader :user_id
|
133
|
-
sig { returns(T.nilable(String)) }
|
134
|
-
attr_reader :web_url
|
135
|
-
|
136
|
-
class << self
|
137
|
-
sig do
|
138
|
-
returns(String)
|
139
|
-
end
|
140
|
-
def primary_key()
|
141
|
-
"token"
|
142
|
-
end
|
143
|
-
|
144
|
-
sig do
|
145
|
-
params(
|
146
|
-
token: T.any(Integer, String),
|
147
|
-
session: Auth::Session
|
148
|
-
).returns(T.nilable(Checkout))
|
149
|
-
end
|
150
|
-
def find(
|
151
|
-
token:,
|
152
|
-
session: ShopifyAPI::Context.active_session
|
153
|
-
)
|
154
|
-
result = base_find(
|
155
|
-
session: session,
|
156
|
-
ids: {token: token},
|
157
|
-
params: {},
|
158
|
-
)
|
159
|
-
T.cast(result[0], T.nilable(Checkout))
|
160
|
-
end
|
161
|
-
|
162
|
-
sig do
|
163
|
-
params(
|
164
|
-
token: T.any(Integer, String),
|
165
|
-
session: Auth::Session,
|
166
|
-
kwargs: T.untyped
|
167
|
-
).returns(T.untyped)
|
168
|
-
end
|
169
|
-
def shipping_rates(
|
170
|
-
token:,
|
171
|
-
session: ShopifyAPI::Context.active_session,
|
172
|
-
**kwargs
|
173
|
-
)
|
174
|
-
request(
|
175
|
-
http_method: :get,
|
176
|
-
operation: :shipping_rates,
|
177
|
-
session: session,
|
178
|
-
ids: {token: token},
|
179
|
-
params: {}.merge(kwargs).compact,
|
180
|
-
body: {},
|
181
|
-
entity: nil,
|
182
|
-
)
|
183
|
-
end
|
184
|
-
|
185
|
-
end
|
186
|
-
|
187
|
-
sig do
|
188
|
-
params(
|
189
|
-
body: T.untyped,
|
190
|
-
kwargs: T.untyped
|
191
|
-
).returns(T.untyped)
|
192
|
-
end
|
193
|
-
def complete(
|
194
|
-
body: nil,
|
195
|
-
**kwargs
|
196
|
-
)
|
197
|
-
self.class.request(
|
198
|
-
http_method: :post,
|
199
|
-
operation: :complete,
|
200
|
-
session: @session,
|
201
|
-
ids: {token: @token},
|
202
|
-
params: {}.merge(kwargs).compact,
|
203
|
-
body: body,
|
204
|
-
entity: self,
|
205
|
-
)
|
206
|
-
end
|
207
|
-
|
208
|
-
end
|
209
|
-
end
|
@@ -1,142 +0,0 @@
|
|
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 Collect < 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
|
-
@collection_id = T.let(nil, T.nilable(Integer))
|
20
|
-
@created_at = T.let(nil, T.nilable(String))
|
21
|
-
@id = T.let(nil, T.nilable(Integer))
|
22
|
-
@position = T.let(nil, T.nilable(Integer))
|
23
|
-
@product_id = T.let(nil, T.nilable(Integer))
|
24
|
-
@sort_value = T.let(nil, T.nilable(String))
|
25
|
-
@updated_at = T.let(nil, T.nilable(String))
|
26
|
-
end
|
27
|
-
|
28
|
-
@has_one = T.let({}, T::Hash[Symbol, Class])
|
29
|
-
@has_many = T.let({}, T::Hash[Symbol, Class])
|
30
|
-
@paths = T.let([
|
31
|
-
{http_method: :delete, operation: :delete, ids: [:id], path: "collects/<id>.json"},
|
32
|
-
{http_method: :get, operation: :count, ids: [], path: "collects/count.json"},
|
33
|
-
{http_method: :get, operation: :get, ids: [], path: "collects.json"},
|
34
|
-
{http_method: :get, operation: :get, ids: [:id], path: "collects/<id>.json"},
|
35
|
-
{http_method: :post, operation: :post, ids: [], path: "collects.json"}
|
36
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
37
|
-
|
38
|
-
sig { returns(T.nilable(Integer)) }
|
39
|
-
attr_reader :collection_id
|
40
|
-
sig { returns(T.nilable(String)) }
|
41
|
-
attr_reader :created_at
|
42
|
-
sig { returns(T.nilable(Integer)) }
|
43
|
-
attr_reader :id
|
44
|
-
sig { returns(T.nilable(Integer)) }
|
45
|
-
attr_reader :position
|
46
|
-
sig { returns(T.nilable(Integer)) }
|
47
|
-
attr_reader :product_id
|
48
|
-
sig { returns(T.nilable(String)) }
|
49
|
-
attr_reader :sort_value
|
50
|
-
sig { returns(T.nilable(String)) }
|
51
|
-
attr_reader :updated_at
|
52
|
-
|
53
|
-
class << self
|
54
|
-
sig do
|
55
|
-
params(
|
56
|
-
id: T.any(Integer, String),
|
57
|
-
fields: T.untyped,
|
58
|
-
session: Auth::Session
|
59
|
-
).returns(T.nilable(Collect))
|
60
|
-
end
|
61
|
-
def find(
|
62
|
-
id:,
|
63
|
-
fields: nil,
|
64
|
-
session: ShopifyAPI::Context.active_session
|
65
|
-
)
|
66
|
-
result = base_find(
|
67
|
-
session: session,
|
68
|
-
ids: {id: id},
|
69
|
-
params: {fields: fields},
|
70
|
-
)
|
71
|
-
T.cast(result[0], T.nilable(Collect))
|
72
|
-
end
|
73
|
-
|
74
|
-
sig do
|
75
|
-
params(
|
76
|
-
id: T.any(Integer, String),
|
77
|
-
session: Auth::Session
|
78
|
-
).returns(T.untyped)
|
79
|
-
end
|
80
|
-
def delete(
|
81
|
-
id:,
|
82
|
-
session: ShopifyAPI::Context.active_session
|
83
|
-
)
|
84
|
-
request(
|
85
|
-
http_method: :delete,
|
86
|
-
operation: :delete,
|
87
|
-
session: session,
|
88
|
-
ids: {id: id},
|
89
|
-
params: {},
|
90
|
-
)
|
91
|
-
end
|
92
|
-
|
93
|
-
sig do
|
94
|
-
params(
|
95
|
-
limit: T.untyped,
|
96
|
-
since_id: T.untyped,
|
97
|
-
fields: T.untyped,
|
98
|
-
session: Auth::Session,
|
99
|
-
kwargs: T.untyped
|
100
|
-
).returns(T::Array[Collect])
|
101
|
-
end
|
102
|
-
def all(
|
103
|
-
limit: nil,
|
104
|
-
since_id: nil,
|
105
|
-
fields: nil,
|
106
|
-
session: ShopifyAPI::Context.active_session,
|
107
|
-
**kwargs
|
108
|
-
)
|
109
|
-
response = base_find(
|
110
|
-
session: session,
|
111
|
-
ids: {},
|
112
|
-
params: {limit: limit, since_id: since_id, fields: fields}.merge(kwargs).compact,
|
113
|
-
)
|
114
|
-
|
115
|
-
T.cast(response, T::Array[Collect])
|
116
|
-
end
|
117
|
-
|
118
|
-
sig do
|
119
|
-
params(
|
120
|
-
session: Auth::Session,
|
121
|
-
kwargs: T.untyped
|
122
|
-
).returns(T.untyped)
|
123
|
-
end
|
124
|
-
def count(
|
125
|
-
session: ShopifyAPI::Context.active_session,
|
126
|
-
**kwargs
|
127
|
-
)
|
128
|
-
request(
|
129
|
-
http_method: :get,
|
130
|
-
operation: :count,
|
131
|
-
session: session,
|
132
|
-
ids: {},
|
133
|
-
params: {}.merge(kwargs).compact,
|
134
|
-
body: {},
|
135
|
-
entity: nil,
|
136
|
-
)
|
137
|
-
end
|
138
|
-
|
139
|
-
end
|
140
|
-
|
141
|
-
end
|
142
|
-
end
|
@@ -1,110 +0,0 @@
|
|
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 Collection < 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
|
-
@title = T.let(nil, T.nilable(String))
|
20
|
-
@body_html = T.let(nil, T.nilable(String))
|
21
|
-
@handle = T.let(nil, T.nilable(String))
|
22
|
-
@id = T.let(nil, T.nilable(Integer))
|
23
|
-
@image = T.let(nil, T.nilable(Image))
|
24
|
-
@published_at = T.let(nil, T.nilable(String))
|
25
|
-
@published_scope = T.let(nil, T.nilable(String))
|
26
|
-
@sort_order = T.let(nil, T.nilable(String))
|
27
|
-
@template_suffix = T.let(nil, T.nilable(String))
|
28
|
-
@updated_at = T.let(nil, T.nilable(String))
|
29
|
-
end
|
30
|
-
|
31
|
-
@has_one = T.let({
|
32
|
-
image: Image
|
33
|
-
}, T::Hash[Symbol, Class])
|
34
|
-
@has_many = T.let({}, T::Hash[Symbol, Class])
|
35
|
-
@paths = T.let([
|
36
|
-
{http_method: :get, operation: :get, ids: [:id], path: "collections/<id>.json"},
|
37
|
-
{http_method: :get, operation: :products, ids: [:id], path: "collections/<id>/products.json"}
|
38
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
39
|
-
|
40
|
-
sig { returns(T.nilable(String)) }
|
41
|
-
attr_reader :title
|
42
|
-
sig { returns(T.nilable(String)) }
|
43
|
-
attr_reader :body_html
|
44
|
-
sig { returns(T.nilable(String)) }
|
45
|
-
attr_reader :handle
|
46
|
-
sig { returns(T.nilable(Integer)) }
|
47
|
-
attr_reader :id
|
48
|
-
sig { returns(T.nilable(Image)) }
|
49
|
-
attr_reader :image
|
50
|
-
sig { returns(T.nilable(String)) }
|
51
|
-
attr_reader :published_at
|
52
|
-
sig { returns(T.nilable(String)) }
|
53
|
-
attr_reader :published_scope
|
54
|
-
sig { returns(T.nilable(String)) }
|
55
|
-
attr_reader :sort_order
|
56
|
-
sig { returns(T.nilable(String)) }
|
57
|
-
attr_reader :template_suffix
|
58
|
-
sig { returns(T.nilable(String)) }
|
59
|
-
attr_reader :updated_at
|
60
|
-
|
61
|
-
class << self
|
62
|
-
sig do
|
63
|
-
params(
|
64
|
-
id: T.any(Integer, String),
|
65
|
-
fields: T.untyped,
|
66
|
-
session: Auth::Session
|
67
|
-
).returns(T.nilable(Collection))
|
68
|
-
end
|
69
|
-
def find(
|
70
|
-
id:,
|
71
|
-
fields: nil,
|
72
|
-
session: ShopifyAPI::Context.active_session
|
73
|
-
)
|
74
|
-
result = base_find(
|
75
|
-
session: session,
|
76
|
-
ids: {id: id},
|
77
|
-
params: {fields: fields},
|
78
|
-
)
|
79
|
-
T.cast(result[0], T.nilable(Collection))
|
80
|
-
end
|
81
|
-
|
82
|
-
sig do
|
83
|
-
params(
|
84
|
-
id: T.any(Integer, String),
|
85
|
-
limit: T.untyped,
|
86
|
-
session: Auth::Session,
|
87
|
-
kwargs: T.untyped
|
88
|
-
).returns(T.untyped)
|
89
|
-
end
|
90
|
-
def products(
|
91
|
-
id:,
|
92
|
-
limit: nil,
|
93
|
-
session: ShopifyAPI::Context.active_session,
|
94
|
-
**kwargs
|
95
|
-
)
|
96
|
-
request(
|
97
|
-
http_method: :get,
|
98
|
-
operation: :products,
|
99
|
-
session: session,
|
100
|
-
ids: {id: id},
|
101
|
-
params: {limit: limit}.merge(kwargs).compact,
|
102
|
-
body: {},
|
103
|
-
entity: nil,
|
104
|
-
)
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
108
|
-
|
109
|
-
end
|
110
|
-
end
|