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,155 +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 ScriptTag < 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
|
-
@event = T.let(nil, T.nilable(String))
|
20
|
-
@src = T.let(nil, T.nilable(String))
|
21
|
-
@cache = T.let(nil, T.nilable(T::Boolean))
|
22
|
-
@created_at = T.let(nil, T.nilable(String))
|
23
|
-
@display_scope = T.let(nil, T.nilable(String))
|
24
|
-
@id = T.let(nil, T.nilable(Integer))
|
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: "script_tags/<id>.json"},
|
32
|
-
{http_method: :get, operation: :count, ids: [], path: "script_tags/count.json"},
|
33
|
-
{http_method: :get, operation: :get, ids: [], path: "script_tags.json"},
|
34
|
-
{http_method: :get, operation: :get, ids: [:id], path: "script_tags/<id>.json"},
|
35
|
-
{http_method: :post, operation: :post, ids: [], path: "script_tags.json"},
|
36
|
-
{http_method: :put, operation: :put, ids: [:id], path: "script_tags/<id>.json"}
|
37
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
38
|
-
|
39
|
-
sig { returns(T.nilable(String)) }
|
40
|
-
attr_reader :event
|
41
|
-
sig { returns(T.nilable(String)) }
|
42
|
-
attr_reader :src
|
43
|
-
sig { returns(T.nilable(T::Boolean)) }
|
44
|
-
attr_reader :cache
|
45
|
-
sig { returns(T.nilable(String)) }
|
46
|
-
attr_reader :created_at
|
47
|
-
sig { returns(T.nilable(String)) }
|
48
|
-
attr_reader :display_scope
|
49
|
-
sig { returns(T.nilable(Integer)) }
|
50
|
-
attr_reader :id
|
51
|
-
sig { returns(T.nilable(String)) }
|
52
|
-
attr_reader :updated_at
|
53
|
-
|
54
|
-
class << self
|
55
|
-
sig do
|
56
|
-
params(
|
57
|
-
id: T.any(Integer, String),
|
58
|
-
fields: T.untyped,
|
59
|
-
session: Auth::Session
|
60
|
-
).returns(T.nilable(ScriptTag))
|
61
|
-
end
|
62
|
-
def find(
|
63
|
-
id:,
|
64
|
-
fields: nil,
|
65
|
-
session: ShopifyAPI::Context.active_session
|
66
|
-
)
|
67
|
-
result = base_find(
|
68
|
-
session: session,
|
69
|
-
ids: {id: id},
|
70
|
-
params: {fields: fields},
|
71
|
-
)
|
72
|
-
T.cast(result[0], T.nilable(ScriptTag))
|
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
|
-
limit: T.untyped,
|
97
|
-
since_id: T.untyped,
|
98
|
-
created_at_min: T.untyped,
|
99
|
-
created_at_max: T.untyped,
|
100
|
-
updated_at_min: T.untyped,
|
101
|
-
updated_at_max: T.untyped,
|
102
|
-
src: T.untyped,
|
103
|
-
fields: T.untyped,
|
104
|
-
session: Auth::Session,
|
105
|
-
kwargs: T.untyped
|
106
|
-
).returns(T::Array[ScriptTag])
|
107
|
-
end
|
108
|
-
def all(
|
109
|
-
limit: nil,
|
110
|
-
since_id: nil,
|
111
|
-
created_at_min: nil,
|
112
|
-
created_at_max: nil,
|
113
|
-
updated_at_min: nil,
|
114
|
-
updated_at_max: nil,
|
115
|
-
src: nil,
|
116
|
-
fields: nil,
|
117
|
-
session: ShopifyAPI::Context.active_session,
|
118
|
-
**kwargs
|
119
|
-
)
|
120
|
-
response = base_find(
|
121
|
-
session: session,
|
122
|
-
ids: {},
|
123
|
-
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, src: src, fields: fields}.merge(kwargs).compact,
|
124
|
-
)
|
125
|
-
|
126
|
-
T.cast(response, T::Array[ScriptTag])
|
127
|
-
end
|
128
|
-
|
129
|
-
sig do
|
130
|
-
params(
|
131
|
-
src: T.untyped,
|
132
|
-
session: Auth::Session,
|
133
|
-
kwargs: T.untyped
|
134
|
-
).returns(T.untyped)
|
135
|
-
end
|
136
|
-
def count(
|
137
|
-
src: nil,
|
138
|
-
session: ShopifyAPI::Context.active_session,
|
139
|
-
**kwargs
|
140
|
-
)
|
141
|
-
request(
|
142
|
-
http_method: :get,
|
143
|
-
operation: :count,
|
144
|
-
session: session,
|
145
|
-
ids: {},
|
146
|
-
params: {src: src}.merge(kwargs).compact,
|
147
|
-
body: {},
|
148
|
-
entity: nil,
|
149
|
-
)
|
150
|
-
end
|
151
|
-
|
152
|
-
end
|
153
|
-
|
154
|
-
end
|
155
|
-
end
|
@@ -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 ShippingZone < 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
|
-
@carrier_shipping_rate_providers = T.let(nil, T.untyped)
|
20
|
-
@countries = T.let(nil, T.nilable(T::Array[T.untyped]))
|
21
|
-
@id = T.let(nil, T.nilable(Integer))
|
22
|
-
@location_group_id = T.let(nil, T.nilable(Integer))
|
23
|
-
@name = T.let(nil, T.nilable(String))
|
24
|
-
@price_based_shipping_rates = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
25
|
-
@profile_id = T.let(nil, T.nilable(Integer))
|
26
|
-
@provinces = T.let(nil, T.nilable(T::Array[T.untyped]))
|
27
|
-
@weight_based_shipping_rates = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
28
|
-
end
|
29
|
-
|
30
|
-
@has_one = T.let({}, T::Hash[Symbol, Class])
|
31
|
-
@has_many = T.let({
|
32
|
-
countries: Country,
|
33
|
-
provinces: Province
|
34
|
-
}, T::Hash[Symbol, Class])
|
35
|
-
@paths = T.let([
|
36
|
-
{http_method: :get, operation: :get, ids: [], path: "shipping_zones.json"}
|
37
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
38
|
-
|
39
|
-
sig { returns(T.untyped) }
|
40
|
-
attr_reader :carrier_shipping_rate_providers
|
41
|
-
sig { returns(T.nilable(T::Array[Country])) }
|
42
|
-
attr_reader :countries
|
43
|
-
sig { returns(T.nilable(Integer)) }
|
44
|
-
attr_reader :id
|
45
|
-
sig { returns(T.nilable(Integer)) }
|
46
|
-
attr_reader :location_group_id
|
47
|
-
sig { returns(T.nilable(String)) }
|
48
|
-
attr_reader :name
|
49
|
-
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
50
|
-
attr_reader :price_based_shipping_rates
|
51
|
-
sig { returns(T.nilable(Integer)) }
|
52
|
-
attr_reader :profile_id
|
53
|
-
sig { returns(T.nilable(T::Array[Province])) }
|
54
|
-
attr_reader :provinces
|
55
|
-
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
56
|
-
attr_reader :weight_based_shipping_rates
|
57
|
-
|
58
|
-
class << self
|
59
|
-
sig do
|
60
|
-
params(
|
61
|
-
fields: T.untyped,
|
62
|
-
session: Auth::Session,
|
63
|
-
kwargs: T.untyped
|
64
|
-
).returns(T::Array[ShippingZone])
|
65
|
-
end
|
66
|
-
def all(
|
67
|
-
fields: nil,
|
68
|
-
session: ShopifyAPI::Context.active_session,
|
69
|
-
**kwargs
|
70
|
-
)
|
71
|
-
response = base_find(
|
72
|
-
session: session,
|
73
|
-
ids: {},
|
74
|
-
params: {fields: fields}.merge(kwargs).compact,
|
75
|
-
)
|
76
|
-
|
77
|
-
T.cast(response, T::Array[ShippingZone])
|
78
|
-
end
|
79
|
-
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
83
|
-
end
|
@@ -1,218 +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 Shop < 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
|
-
@address1 = T.let(nil, T.nilable(String))
|
20
|
-
@address2 = T.let(nil, T.nilable(String))
|
21
|
-
@checkout_api_supported = T.let(nil, T.nilable(T::Boolean))
|
22
|
-
@city = T.let(nil, T.nilable(String))
|
23
|
-
@cookie_consent_level = T.let(nil, T.nilable(String))
|
24
|
-
@country = T.let(nil, T.nilable(String))
|
25
|
-
@country_code = T.let(nil, T.nilable(String))
|
26
|
-
@country_name = T.let(nil, T.nilable(String))
|
27
|
-
@county_taxes = T.let(nil, T.nilable(String))
|
28
|
-
@created_at = T.let(nil, T.nilable(String))
|
29
|
-
@currency = T.let(nil, T.nilable(String))
|
30
|
-
@customer_email = T.let(nil, T.nilable(String))
|
31
|
-
@domain = T.let(nil, T.nilable(String))
|
32
|
-
@eligible_for_card_reader_giveaway = T.let(nil, T.nilable(T::Boolean))
|
33
|
-
@eligible_for_payments = T.let(nil, T.nilable(T::Boolean))
|
34
|
-
@email = T.let(nil, T.nilable(String))
|
35
|
-
@enabled_presentment_currencies = T.let(nil, T.nilable(T::Array[T.untyped]))
|
36
|
-
@finances = T.let(nil, T.nilable(T::Boolean))
|
37
|
-
@force_ssl = T.let(nil, T.nilable(T::Boolean))
|
38
|
-
@google_apps_domain = T.let(nil, T.nilable(String))
|
39
|
-
@google_apps_login_enabled = T.let(nil, T.nilable(String))
|
40
|
-
@has_discounts = T.let(nil, T.nilable(T::Boolean))
|
41
|
-
@has_gift_cards = T.let(nil, T.nilable(T::Boolean))
|
42
|
-
@has_storefront = T.let(nil, T.nilable(T::Boolean))
|
43
|
-
@iana_timezone = T.let(nil, T.nilable(String))
|
44
|
-
@id = T.let(nil, T.nilable(Integer))
|
45
|
-
@latitude = T.let(nil, T.nilable(Float))
|
46
|
-
@longitude = T.let(nil, T.nilable(Float))
|
47
|
-
@money_format = T.let(nil, T.nilable(String))
|
48
|
-
@money_in_emails_format = T.let(nil, T.nilable(String))
|
49
|
-
@money_with_currency_format = T.let(nil, T.nilable(String))
|
50
|
-
@money_with_currency_in_emails_format = T.let(nil, T.nilable(String))
|
51
|
-
@multi_location_enabled = T.let(nil, T.nilable(T::Boolean))
|
52
|
-
@myshopify_domain = T.let(nil, T.nilable(String))
|
53
|
-
@name = T.let(nil, T.nilable(String))
|
54
|
-
@password_enabled = T.let(nil, T.nilable(T::Boolean))
|
55
|
-
@phone = T.let(nil, T.nilable(String))
|
56
|
-
@plan_display_name = T.let(nil, T.nilable(String))
|
57
|
-
@plan_name = T.let(nil, T.nilable(String))
|
58
|
-
@pre_launch_enabled = T.let(nil, T.nilable(T::Boolean))
|
59
|
-
@primary_locale = T.let(nil, T.nilable(String))
|
60
|
-
@primary_location_id = T.let(nil, T.nilable(Integer))
|
61
|
-
@province = T.let(nil, T.nilable(String))
|
62
|
-
@province_code = T.let(nil, T.nilable(String))
|
63
|
-
@requires_extra_payments_agreement = T.let(nil, T.nilable(T::Boolean))
|
64
|
-
@setup_required = T.let(nil, T.nilable(T::Boolean))
|
65
|
-
@shop_owner = T.let(nil, T.nilable(String))
|
66
|
-
@source = T.let(nil, T.nilable(String))
|
67
|
-
@tax_shipping = T.let(nil, T.nilable(String))
|
68
|
-
@taxes_included = T.let(nil, T.nilable(String))
|
69
|
-
@timezone = T.let(nil, T.nilable(String))
|
70
|
-
@transactional_sms_disabled = T.let(nil, T.nilable(T::Boolean))
|
71
|
-
@updated_at = T.let(nil, T.nilable(String))
|
72
|
-
@weight_unit = T.let(nil, T.nilable(String))
|
73
|
-
@zip = T.let(nil, T.nilable(String))
|
74
|
-
end
|
75
|
-
|
76
|
-
@has_one = T.let({}, T::Hash[Symbol, Class])
|
77
|
-
@has_many = T.let({}, T::Hash[Symbol, Class])
|
78
|
-
@paths = T.let([
|
79
|
-
{http_method: :get, operation: :get, ids: [], path: "shop.json"}
|
80
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
81
|
-
|
82
|
-
sig { returns(T.nilable(String)) }
|
83
|
-
attr_reader :address1
|
84
|
-
sig { returns(T.nilable(String)) }
|
85
|
-
attr_reader :address2
|
86
|
-
sig { returns(T.nilable(T::Boolean)) }
|
87
|
-
attr_reader :checkout_api_supported
|
88
|
-
sig { returns(T.nilable(String)) }
|
89
|
-
attr_reader :city
|
90
|
-
sig { returns(T.nilable(String)) }
|
91
|
-
attr_reader :cookie_consent_level
|
92
|
-
sig { returns(T.nilable(String)) }
|
93
|
-
attr_reader :country
|
94
|
-
sig { returns(T.nilable(String)) }
|
95
|
-
attr_reader :country_code
|
96
|
-
sig { returns(T.nilable(String)) }
|
97
|
-
attr_reader :country_name
|
98
|
-
sig { returns(T.nilable(String)) }
|
99
|
-
attr_reader :county_taxes
|
100
|
-
sig { returns(T.nilable(String)) }
|
101
|
-
attr_reader :created_at
|
102
|
-
sig { returns(T.nilable(String)) }
|
103
|
-
attr_reader :currency
|
104
|
-
sig { returns(T.nilable(String)) }
|
105
|
-
attr_reader :customer_email
|
106
|
-
sig { returns(T.nilable(String)) }
|
107
|
-
attr_reader :domain
|
108
|
-
sig { returns(T.nilable(T::Boolean)) }
|
109
|
-
attr_reader :eligible_for_card_reader_giveaway
|
110
|
-
sig { returns(T.nilable(T::Boolean)) }
|
111
|
-
attr_reader :eligible_for_payments
|
112
|
-
sig { returns(T.nilable(String)) }
|
113
|
-
attr_reader :email
|
114
|
-
sig { returns(T.nilable(T::Array[String])) }
|
115
|
-
attr_reader :enabled_presentment_currencies
|
116
|
-
sig { returns(T.nilable(T::Boolean)) }
|
117
|
-
attr_reader :finances
|
118
|
-
sig { returns(T.nilable(T::Boolean)) }
|
119
|
-
attr_reader :force_ssl
|
120
|
-
sig { returns(T.nilable(String)) }
|
121
|
-
attr_reader :google_apps_domain
|
122
|
-
sig { returns(T.nilable(String)) }
|
123
|
-
attr_reader :google_apps_login_enabled
|
124
|
-
sig { returns(T.nilable(T::Boolean)) }
|
125
|
-
attr_reader :has_discounts
|
126
|
-
sig { returns(T.nilable(T::Boolean)) }
|
127
|
-
attr_reader :has_gift_cards
|
128
|
-
sig { returns(T.nilable(T::Boolean)) }
|
129
|
-
attr_reader :has_storefront
|
130
|
-
sig { returns(T.nilable(String)) }
|
131
|
-
attr_reader :iana_timezone
|
132
|
-
sig { returns(T.nilable(Integer)) }
|
133
|
-
attr_reader :id
|
134
|
-
sig { returns(T.nilable(Float)) }
|
135
|
-
attr_reader :latitude
|
136
|
-
sig { returns(T.nilable(Float)) }
|
137
|
-
attr_reader :longitude
|
138
|
-
sig { returns(T.nilable(String)) }
|
139
|
-
attr_reader :money_format
|
140
|
-
sig { returns(T.nilable(String)) }
|
141
|
-
attr_reader :money_in_emails_format
|
142
|
-
sig { returns(T.nilable(String)) }
|
143
|
-
attr_reader :money_with_currency_format
|
144
|
-
sig { returns(T.nilable(String)) }
|
145
|
-
attr_reader :money_with_currency_in_emails_format
|
146
|
-
sig { returns(T.nilable(T::Boolean)) }
|
147
|
-
attr_reader :multi_location_enabled
|
148
|
-
sig { returns(T.nilable(String)) }
|
149
|
-
attr_reader :myshopify_domain
|
150
|
-
sig { returns(T.nilable(String)) }
|
151
|
-
attr_reader :name
|
152
|
-
sig { returns(T.nilable(T::Boolean)) }
|
153
|
-
attr_reader :password_enabled
|
154
|
-
sig { returns(T.nilable(String)) }
|
155
|
-
attr_reader :phone
|
156
|
-
sig { returns(T.nilable(String)) }
|
157
|
-
attr_reader :plan_display_name
|
158
|
-
sig { returns(T.nilable(String)) }
|
159
|
-
attr_reader :plan_name
|
160
|
-
sig { returns(T.nilable(T::Boolean)) }
|
161
|
-
attr_reader :pre_launch_enabled
|
162
|
-
sig { returns(T.nilable(String)) }
|
163
|
-
attr_reader :primary_locale
|
164
|
-
sig { returns(T.nilable(Integer)) }
|
165
|
-
attr_reader :primary_location_id
|
166
|
-
sig { returns(T.nilable(String)) }
|
167
|
-
attr_reader :province
|
168
|
-
sig { returns(T.nilable(String)) }
|
169
|
-
attr_reader :province_code
|
170
|
-
sig { returns(T.nilable(T::Boolean)) }
|
171
|
-
attr_reader :requires_extra_payments_agreement
|
172
|
-
sig { returns(T.nilable(T::Boolean)) }
|
173
|
-
attr_reader :setup_required
|
174
|
-
sig { returns(T.nilable(String)) }
|
175
|
-
attr_reader :shop_owner
|
176
|
-
sig { returns(T.nilable(String)) }
|
177
|
-
attr_reader :source
|
178
|
-
sig { returns(T.nilable(String)) }
|
179
|
-
attr_reader :tax_shipping
|
180
|
-
sig { returns(T.nilable(String)) }
|
181
|
-
attr_reader :taxes_included
|
182
|
-
sig { returns(T.nilable(String)) }
|
183
|
-
attr_reader :timezone
|
184
|
-
sig { returns(T.nilable(T::Boolean)) }
|
185
|
-
attr_reader :transactional_sms_disabled
|
186
|
-
sig { returns(T.nilable(String)) }
|
187
|
-
attr_reader :updated_at
|
188
|
-
sig { returns(T.nilable(String)) }
|
189
|
-
attr_reader :weight_unit
|
190
|
-
sig { returns(T.nilable(String)) }
|
191
|
-
attr_reader :zip
|
192
|
-
|
193
|
-
class << self
|
194
|
-
sig do
|
195
|
-
params(
|
196
|
-
fields: T.untyped,
|
197
|
-
session: Auth::Session,
|
198
|
-
kwargs: T.untyped
|
199
|
-
).returns(T::Array[Shop])
|
200
|
-
end
|
201
|
-
def all(
|
202
|
-
fields: nil,
|
203
|
-
session: ShopifyAPI::Context.active_session,
|
204
|
-
**kwargs
|
205
|
-
)
|
206
|
-
response = base_find(
|
207
|
-
session: session,
|
208
|
-
ids: {},
|
209
|
-
params: {fields: fields}.merge(kwargs).compact,
|
210
|
-
)
|
211
|
-
|
212
|
-
T.cast(response, T::Array[Shop])
|
213
|
-
end
|
214
|
-
|
215
|
-
end
|
216
|
-
|
217
|
-
end
|
218
|
-
end
|
@@ -1,216 +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 SmartCollection < 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
|
-
@rules = T.let(nil, T.nilable(T.any(T::Hash[T.untyped, T.untyped], T::Array[T.untyped])))
|
20
|
-
@title = T.let(nil, T.nilable(String))
|
21
|
-
@body_html = T.let(nil, T.nilable(String))
|
22
|
-
@disjunctive = T.let(nil, T.nilable(T::Boolean))
|
23
|
-
@handle = T.let(nil, T.nilable(String))
|
24
|
-
@id = T.let(nil, T.nilable(Integer))
|
25
|
-
@image = T.let(nil, T.nilable(T.any(String, T::Hash[T.untyped, T.untyped])))
|
26
|
-
@published_at = T.let(nil, T.nilable(String))
|
27
|
-
@published_scope = T.let(nil, T.nilable(String))
|
28
|
-
@sort_order = T.let(nil, T.nilable(String))
|
29
|
-
@template_suffix = T.let(nil, T.nilable(String))
|
30
|
-
@updated_at = T.let(nil, T.nilable(String))
|
31
|
-
end
|
32
|
-
|
33
|
-
@has_one = T.let({}, T::Hash[Symbol, Class])
|
34
|
-
@has_many = T.let({}, T::Hash[Symbol, Class])
|
35
|
-
@paths = T.let([
|
36
|
-
{http_method: :delete, operation: :delete, ids: [:id], path: "smart_collections/<id>.json"},
|
37
|
-
{http_method: :get, operation: :count, ids: [], path: "smart_collections/count.json"},
|
38
|
-
{http_method: :get, operation: :get, ids: [], path: "smart_collections.json"},
|
39
|
-
{http_method: :get, operation: :get, ids: [:id], path: "smart_collections/<id>.json"},
|
40
|
-
{http_method: :post, operation: :post, ids: [], path: "smart_collections.json"},
|
41
|
-
{http_method: :put, operation: :order, ids: [:id], path: "smart_collections/<id>/order.json"},
|
42
|
-
{http_method: :put, operation: :put, ids: [:id], path: "smart_collections/<id>.json"}
|
43
|
-
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
44
|
-
|
45
|
-
sig { returns(T.nilable(T.any(T::Hash[T.untyped, T.untyped], T::Array[T::Hash[T.untyped, T.untyped]]))) }
|
46
|
-
attr_reader :rules
|
47
|
-
sig { returns(T.nilable(String)) }
|
48
|
-
attr_reader :title
|
49
|
-
sig { returns(T.nilable(String)) }
|
50
|
-
attr_reader :body_html
|
51
|
-
sig { returns(T.nilable(T::Boolean)) }
|
52
|
-
attr_reader :disjunctive
|
53
|
-
sig { returns(T.nilable(String)) }
|
54
|
-
attr_reader :handle
|
55
|
-
sig { returns(T.nilable(Integer)) }
|
56
|
-
attr_reader :id
|
57
|
-
sig { returns(T.nilable(T.any(String, T::Hash[T.untyped, T.untyped]))) }
|
58
|
-
attr_reader :image
|
59
|
-
sig { returns(T.nilable(String)) }
|
60
|
-
attr_reader :published_at
|
61
|
-
sig { returns(T.nilable(String)) }
|
62
|
-
attr_reader :published_scope
|
63
|
-
sig { returns(T.nilable(String)) }
|
64
|
-
attr_reader :sort_order
|
65
|
-
sig { returns(T.nilable(String)) }
|
66
|
-
attr_reader :template_suffix
|
67
|
-
sig { returns(T.nilable(String)) }
|
68
|
-
attr_reader :updated_at
|
69
|
-
|
70
|
-
class << self
|
71
|
-
sig do
|
72
|
-
params(
|
73
|
-
id: T.any(Integer, String),
|
74
|
-
fields: T.untyped,
|
75
|
-
session: Auth::Session
|
76
|
-
).returns(T.nilable(SmartCollection))
|
77
|
-
end
|
78
|
-
def find(
|
79
|
-
id:,
|
80
|
-
fields: nil,
|
81
|
-
session: ShopifyAPI::Context.active_session
|
82
|
-
)
|
83
|
-
result = base_find(
|
84
|
-
session: session,
|
85
|
-
ids: {id: id},
|
86
|
-
params: {fields: fields},
|
87
|
-
)
|
88
|
-
T.cast(result[0], T.nilable(SmartCollection))
|
89
|
-
end
|
90
|
-
|
91
|
-
sig do
|
92
|
-
params(
|
93
|
-
id: T.any(Integer, String),
|
94
|
-
session: Auth::Session
|
95
|
-
).returns(T.untyped)
|
96
|
-
end
|
97
|
-
def delete(
|
98
|
-
id:,
|
99
|
-
session: ShopifyAPI::Context.active_session
|
100
|
-
)
|
101
|
-
request(
|
102
|
-
http_method: :delete,
|
103
|
-
operation: :delete,
|
104
|
-
session: session,
|
105
|
-
ids: {id: id},
|
106
|
-
params: {},
|
107
|
-
)
|
108
|
-
end
|
109
|
-
|
110
|
-
sig do
|
111
|
-
params(
|
112
|
-
limit: T.untyped,
|
113
|
-
ids: T.untyped,
|
114
|
-
since_id: T.untyped,
|
115
|
-
title: T.untyped,
|
116
|
-
product_id: T.untyped,
|
117
|
-
handle: T.untyped,
|
118
|
-
updated_at_min: T.untyped,
|
119
|
-
updated_at_max: T.untyped,
|
120
|
-
published_at_min: T.untyped,
|
121
|
-
published_at_max: T.untyped,
|
122
|
-
published_status: T.untyped,
|
123
|
-
fields: T.untyped,
|
124
|
-
session: Auth::Session,
|
125
|
-
kwargs: T.untyped
|
126
|
-
).returns(T::Array[SmartCollection])
|
127
|
-
end
|
128
|
-
def all(
|
129
|
-
limit: nil,
|
130
|
-
ids: nil,
|
131
|
-
since_id: nil,
|
132
|
-
title: nil,
|
133
|
-
product_id: nil,
|
134
|
-
handle: nil,
|
135
|
-
updated_at_min: nil,
|
136
|
-
updated_at_max: nil,
|
137
|
-
published_at_min: nil,
|
138
|
-
published_at_max: nil,
|
139
|
-
published_status: nil,
|
140
|
-
fields: nil,
|
141
|
-
session: ShopifyAPI::Context.active_session,
|
142
|
-
**kwargs
|
143
|
-
)
|
144
|
-
response = base_find(
|
145
|
-
session: session,
|
146
|
-
ids: {},
|
147
|
-
params: {limit: limit, ids: ids, since_id: since_id, title: title, product_id: product_id, handle: handle, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status, fields: fields}.merge(kwargs).compact,
|
148
|
-
)
|
149
|
-
|
150
|
-
T.cast(response, T::Array[SmartCollection])
|
151
|
-
end
|
152
|
-
|
153
|
-
sig do
|
154
|
-
params(
|
155
|
-
title: T.untyped,
|
156
|
-
product_id: T.untyped,
|
157
|
-
updated_at_min: T.untyped,
|
158
|
-
updated_at_max: T.untyped,
|
159
|
-
published_at_min: T.untyped,
|
160
|
-
published_at_max: T.untyped,
|
161
|
-
published_status: T.untyped,
|
162
|
-
session: Auth::Session,
|
163
|
-
kwargs: T.untyped
|
164
|
-
).returns(T.untyped)
|
165
|
-
end
|
166
|
-
def count(
|
167
|
-
title: nil,
|
168
|
-
product_id: nil,
|
169
|
-
updated_at_min: nil,
|
170
|
-
updated_at_max: nil,
|
171
|
-
published_at_min: nil,
|
172
|
-
published_at_max: nil,
|
173
|
-
published_status: nil,
|
174
|
-
session: ShopifyAPI::Context.active_session,
|
175
|
-
**kwargs
|
176
|
-
)
|
177
|
-
request(
|
178
|
-
http_method: :get,
|
179
|
-
operation: :count,
|
180
|
-
session: session,
|
181
|
-
ids: {},
|
182
|
-
params: {title: title, product_id: product_id, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status}.merge(kwargs).compact,
|
183
|
-
body: {},
|
184
|
-
entity: nil,
|
185
|
-
)
|
186
|
-
end
|
187
|
-
|
188
|
-
end
|
189
|
-
|
190
|
-
sig do
|
191
|
-
params(
|
192
|
-
products: T.untyped,
|
193
|
-
sort_order: T.untyped,
|
194
|
-
body: T.untyped,
|
195
|
-
kwargs: T.untyped
|
196
|
-
).returns(T.untyped)
|
197
|
-
end
|
198
|
-
def order(
|
199
|
-
products: nil,
|
200
|
-
sort_order: nil,
|
201
|
-
body: nil,
|
202
|
-
**kwargs
|
203
|
-
)
|
204
|
-
self.class.request(
|
205
|
-
http_method: :put,
|
206
|
-
operation: :order,
|
207
|
-
session: @session,
|
208
|
-
ids: {id: @id},
|
209
|
-
params: {products: products, sort_order: sort_order}.merge(kwargs).compact,
|
210
|
-
body: body,
|
211
|
-
entity: self,
|
212
|
-
)
|
213
|
-
end
|
214
|
-
|
215
|
-
end
|
216
|
-
end
|