shopify_api 14.3.0 → 14.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/BREAKING_CHANGES_FOR_V15.md +42 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +2 -2
- data/README.md +3 -0
- data/docs/usage/oauth.md +88 -16
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/clients/graphql/client.rb +3 -2
- data/lib/shopify_api/clients/graphql/storefront.rb +4 -2
- data/lib/shopify_api/rest/resources/2022_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_10/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_01/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_07/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_10/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_01/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_07/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2024_07/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2024_07/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2024_07/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2024_07/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2024_07/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2024_07/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_07/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_07/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2024_07/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2024_07/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_07/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2024_07/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_07/collect.rb +146 -0
- data/lib/shopify_api/rest/resources/2024_07/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_07/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_07/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2024_07/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2024_07/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_07/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2024_07/customer.rb +333 -0
- data/lib/shopify_api/rest/resources/2024_07/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/2024_07/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_07/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2024_07/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2024_07/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2024_07/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2024_07/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2024_07/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_event.rb +167 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_order.rb +326 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2024_07/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_07/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_07/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2024_07/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2024_07/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2024_07/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2024_07/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2024_07/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_07/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2024_07/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_07/order.rb +489 -0
- data/lib/shopify_api/rest/resources/2024_07/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2024_07/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2024_07/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2024_07/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2024_07/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_07/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_07/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2024_07/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_07/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_07/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2024_07/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_07/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2024_07/recurring_application_charge.rb +176 -0
- data/lib/shopify_api/rest/resources/2024_07/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2024_07/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2024_07/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/2024_07/script_tag.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_07/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_07/shop.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_07/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2024_07/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2024_07/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2024_07/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2024_07/transaction.rb +188 -0
- data/lib/shopify_api/rest/resources/2024_07/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2024_07/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2024_07/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2024_07/webhook.rb +172 -0
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/registry.rb +5 -4
- metadata +80 -6
@@ -0,0 +1,143 @@
|
|
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 Redirect < 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
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@id = T.let(nil, T.nilable(Integer))
|
22
|
+
@path = T.let(nil, T.nilable(String))
|
23
|
+
@target = T.let(nil, T.nilable(String))
|
24
|
+
|
25
|
+
super(session: session, from_hash: from_hash)
|
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: "redirects/<id>.json"},
|
32
|
+
{http_method: :get, operation: :count, ids: [], path: "redirects/count.json"},
|
33
|
+
{http_method: :get, operation: :get, ids: [], path: "redirects.json"},
|
34
|
+
{http_method: :get, operation: :get, ids: [:id], path: "redirects/<id>.json"},
|
35
|
+
{http_method: :post, operation: :post, ids: [], path: "redirects.json"},
|
36
|
+
{http_method: :put, operation: :put, ids: [:id], path: "redirects/<id>.json"}
|
37
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
38
|
+
|
39
|
+
sig { returns(T.nilable(Integer)) }
|
40
|
+
attr_reader :id
|
41
|
+
sig { returns(T.nilable(String)) }
|
42
|
+
attr_reader :path
|
43
|
+
sig { returns(T.nilable(String)) }
|
44
|
+
attr_reader :target
|
45
|
+
|
46
|
+
class << self
|
47
|
+
sig do
|
48
|
+
params(
|
49
|
+
id: T.any(Integer, String),
|
50
|
+
fields: T.untyped,
|
51
|
+
session: Auth::Session
|
52
|
+
).returns(T.nilable(Redirect))
|
53
|
+
end
|
54
|
+
def find(
|
55
|
+
id:,
|
56
|
+
fields: nil,
|
57
|
+
session: ShopifyAPI::Context.active_session
|
58
|
+
)
|
59
|
+
result = base_find(
|
60
|
+
session: session,
|
61
|
+
ids: {id: id},
|
62
|
+
params: {fields: fields},
|
63
|
+
)
|
64
|
+
T.cast(result[0], T.nilable(Redirect))
|
65
|
+
end
|
66
|
+
|
67
|
+
sig do
|
68
|
+
params(
|
69
|
+
id: T.any(Integer, String),
|
70
|
+
session: Auth::Session
|
71
|
+
).returns(T.untyped)
|
72
|
+
end
|
73
|
+
def delete(
|
74
|
+
id:,
|
75
|
+
session: ShopifyAPI::Context.active_session
|
76
|
+
)
|
77
|
+
request(
|
78
|
+
http_method: :delete,
|
79
|
+
operation: :delete,
|
80
|
+
session: session,
|
81
|
+
ids: {id: id},
|
82
|
+
params: {},
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
86
|
+
sig do
|
87
|
+
params(
|
88
|
+
limit: T.untyped,
|
89
|
+
since_id: T.untyped,
|
90
|
+
path: T.untyped,
|
91
|
+
target: T.untyped,
|
92
|
+
fields: T.untyped,
|
93
|
+
session: Auth::Session,
|
94
|
+
kwargs: T.untyped
|
95
|
+
).returns(T::Array[Redirect])
|
96
|
+
end
|
97
|
+
def all(
|
98
|
+
limit: nil,
|
99
|
+
since_id: nil,
|
100
|
+
path: nil,
|
101
|
+
target: nil,
|
102
|
+
fields: nil,
|
103
|
+
session: ShopifyAPI::Context.active_session,
|
104
|
+
**kwargs
|
105
|
+
)
|
106
|
+
response = base_find(
|
107
|
+
session: session,
|
108
|
+
ids: {},
|
109
|
+
params: {limit: limit, since_id: since_id, path: path, target: target, fields: fields}.merge(kwargs).compact,
|
110
|
+
)
|
111
|
+
|
112
|
+
T.cast(response, T::Array[Redirect])
|
113
|
+
end
|
114
|
+
|
115
|
+
sig do
|
116
|
+
params(
|
117
|
+
path: T.untyped,
|
118
|
+
target: T.untyped,
|
119
|
+
session: Auth::Session,
|
120
|
+
kwargs: T.untyped
|
121
|
+
).returns(T.untyped)
|
122
|
+
end
|
123
|
+
def count(
|
124
|
+
path: nil,
|
125
|
+
target: nil,
|
126
|
+
session: ShopifyAPI::Context.active_session,
|
127
|
+
**kwargs
|
128
|
+
)
|
129
|
+
request(
|
130
|
+
http_method: :get,
|
131
|
+
operation: :count,
|
132
|
+
session: session,
|
133
|
+
ids: {},
|
134
|
+
params: {path: path, target: target}.merge(kwargs).compact,
|
135
|
+
body: {},
|
136
|
+
entity: nil,
|
137
|
+
)
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,155 @@
|
|
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 Refund < 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
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@created_at = T.let(nil, T.nilable(String))
|
22
|
+
@duties = T.let(nil, T.nilable(T::Array[T.untyped]))
|
23
|
+
@id = T.let(nil, T.nilable(Integer))
|
24
|
+
@note = T.let(nil, T.nilable(String))
|
25
|
+
@order_adjustments = T.let(nil, T.nilable(T::Array[T.untyped]))
|
26
|
+
@order_id = T.let(nil, T.nilable(Integer))
|
27
|
+
@processed_at = T.let(nil, T.nilable(String))
|
28
|
+
@refund_duties = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
+
@refund_line_items = T.let(nil, T.nilable(T::Array[T.untyped]))
|
30
|
+
@restock = T.let(nil, T.nilable(T::Boolean))
|
31
|
+
@transactions = T.let(nil, T.nilable(T::Array[T.untyped]))
|
32
|
+
@user_id = T.let(nil, T.nilable(Integer))
|
33
|
+
|
34
|
+
super(session: session, from_hash: from_hash)
|
35
|
+
end
|
36
|
+
|
37
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
38
|
+
@has_many = T.let({
|
39
|
+
transactions: Transaction
|
40
|
+
}, T::Hash[Symbol, Class])
|
41
|
+
@paths = T.let([
|
42
|
+
{http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/refunds.json"},
|
43
|
+
{http_method: :get, operation: :get, ids: [:order_id, :id], path: "orders/<order_id>/refunds/<id>.json"},
|
44
|
+
{http_method: :post, operation: :calculate, ids: [:order_id], path: "orders/<order_id>/refunds/calculate.json"},
|
45
|
+
{http_method: :post, operation: :post, ids: [:order_id], path: "orders/<order_id>/refunds.json"}
|
46
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
47
|
+
|
48
|
+
sig { returns(T.nilable(String)) }
|
49
|
+
attr_reader :created_at
|
50
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
51
|
+
attr_reader :duties
|
52
|
+
sig { returns(T.nilable(Integer)) }
|
53
|
+
attr_reader :id
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :note
|
56
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
57
|
+
attr_reader :order_adjustments
|
58
|
+
sig { returns(T.nilable(Integer)) }
|
59
|
+
attr_reader :order_id
|
60
|
+
sig { returns(T.nilable(String)) }
|
61
|
+
attr_reader :processed_at
|
62
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
63
|
+
attr_reader :refund_duties
|
64
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
65
|
+
attr_reader :refund_line_items
|
66
|
+
sig { returns(T.nilable(T::Boolean)) }
|
67
|
+
attr_reader :restock
|
68
|
+
sig { returns(T.nilable(T::Array[Transaction])) }
|
69
|
+
attr_reader :transactions
|
70
|
+
sig { returns(T.nilable(Integer)) }
|
71
|
+
attr_reader :user_id
|
72
|
+
|
73
|
+
class << self
|
74
|
+
sig do
|
75
|
+
params(
|
76
|
+
id: T.any(Integer, String),
|
77
|
+
order_id: T.nilable(T.any(Integer, String)),
|
78
|
+
fields: T.untyped,
|
79
|
+
in_shop_currency: T.untyped,
|
80
|
+
session: Auth::Session
|
81
|
+
).returns(T.nilable(Refund))
|
82
|
+
end
|
83
|
+
def find(
|
84
|
+
id:,
|
85
|
+
order_id: nil,
|
86
|
+
fields: nil,
|
87
|
+
in_shop_currency: nil,
|
88
|
+
session: ShopifyAPI::Context.active_session
|
89
|
+
)
|
90
|
+
result = base_find(
|
91
|
+
session: session,
|
92
|
+
ids: {id: id, order_id: order_id},
|
93
|
+
params: {fields: fields, in_shop_currency: in_shop_currency},
|
94
|
+
)
|
95
|
+
T.cast(result[0], T.nilable(Refund))
|
96
|
+
end
|
97
|
+
|
98
|
+
sig do
|
99
|
+
params(
|
100
|
+
order_id: T.nilable(T.any(Integer, String)),
|
101
|
+
limit: T.untyped,
|
102
|
+
fields: T.untyped,
|
103
|
+
in_shop_currency: T.untyped,
|
104
|
+
session: Auth::Session,
|
105
|
+
kwargs: T.untyped
|
106
|
+
).returns(T::Array[Refund])
|
107
|
+
end
|
108
|
+
def all(
|
109
|
+
order_id: nil,
|
110
|
+
limit: nil,
|
111
|
+
fields: nil,
|
112
|
+
in_shop_currency: nil,
|
113
|
+
session: ShopifyAPI::Context.active_session,
|
114
|
+
**kwargs
|
115
|
+
)
|
116
|
+
response = base_find(
|
117
|
+
session: session,
|
118
|
+
ids: {order_id: order_id},
|
119
|
+
params: {limit: limit, fields: fields, in_shop_currency: in_shop_currency}.merge(kwargs).compact,
|
120
|
+
)
|
121
|
+
|
122
|
+
T.cast(response, T::Array[Refund])
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
sig do
|
128
|
+
params(
|
129
|
+
shipping: T.untyped,
|
130
|
+
refund_line_items: T.untyped,
|
131
|
+
currency: T.untyped,
|
132
|
+
body: T.untyped,
|
133
|
+
kwargs: T.untyped
|
134
|
+
).returns(T.untyped)
|
135
|
+
end
|
136
|
+
def calculate(
|
137
|
+
shipping: nil,
|
138
|
+
refund_line_items: nil,
|
139
|
+
currency: nil,
|
140
|
+
body: nil,
|
141
|
+
**kwargs
|
142
|
+
)
|
143
|
+
self.class.request(
|
144
|
+
http_method: :post,
|
145
|
+
operation: :calculate,
|
146
|
+
session: @session,
|
147
|
+
ids: {order_id: @order_id},
|
148
|
+
params: {shipping: shipping, refund_line_items: refund_line_items, currency: currency}.merge(kwargs).compact,
|
149
|
+
body: body,
|
150
|
+
entity: self,
|
151
|
+
)
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,77 @@
|
|
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 ResourceFeedback < 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
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@created_at = T.let(nil, T.nilable(String))
|
22
|
+
@feedback_generated_at = T.let(nil, T.nilable(String))
|
23
|
+
@messages = T.let(nil, T.nilable(T::Array[T.untyped]))
|
24
|
+
@resource_id = T.let(nil, T.nilable(Integer))
|
25
|
+
@resource_type = T.let(nil, T.nilable(String))
|
26
|
+
@state = T.let(nil, T.nilable(String))
|
27
|
+
@updated_at = T.let(nil, T.nilable(String))
|
28
|
+
|
29
|
+
super(session: session, from_hash: from_hash)
|
30
|
+
end
|
31
|
+
|
32
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
33
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
34
|
+
@paths = T.let([
|
35
|
+
{http_method: :get, operation: :get, ids: [], path: "resource_feedback.json"},
|
36
|
+
{http_method: :post, operation: :post, ids: [], path: "resource_feedback.json"}
|
37
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
38
|
+
|
39
|
+
sig { returns(T.nilable(String)) }
|
40
|
+
attr_reader :created_at
|
41
|
+
sig { returns(T.nilable(String)) }
|
42
|
+
attr_reader :feedback_generated_at
|
43
|
+
sig { returns(T.nilable(T::Array[String])) }
|
44
|
+
attr_reader :messages
|
45
|
+
sig { returns(T.nilable(Integer)) }
|
46
|
+
attr_reader :resource_id
|
47
|
+
sig { returns(T.nilable(String)) }
|
48
|
+
attr_reader :resource_type
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :state
|
51
|
+
sig { returns(T.nilable(String)) }
|
52
|
+
attr_reader :updated_at
|
53
|
+
|
54
|
+
class << self
|
55
|
+
sig do
|
56
|
+
params(
|
57
|
+
session: Auth::Session,
|
58
|
+
kwargs: T.untyped
|
59
|
+
).returns(T::Array[ResourceFeedback])
|
60
|
+
end
|
61
|
+
def all(
|
62
|
+
session: ShopifyAPI::Context.active_session,
|
63
|
+
**kwargs
|
64
|
+
)
|
65
|
+
response = base_find(
|
66
|
+
session: session,
|
67
|
+
ids: {},
|
68
|
+
params: {}.merge(kwargs).compact,
|
69
|
+
)
|
70
|
+
|
71
|
+
T.cast(response, T::Array[ResourceFeedback])
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,159 @@
|
|
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
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@event = T.let(nil, T.nilable(String))
|
22
|
+
@src = T.let(nil, T.nilable(String))
|
23
|
+
@cache = T.let(nil, T.nilable(T::Boolean))
|
24
|
+
@created_at = T.let(nil, T.nilable(String))
|
25
|
+
@display_scope = T.let(nil, T.nilable(String))
|
26
|
+
@id = T.let(nil, T.nilable(Integer))
|
27
|
+
@updated_at = T.let(nil, T.nilable(String))
|
28
|
+
|
29
|
+
super(session: session, from_hash: from_hash)
|
30
|
+
end
|
31
|
+
|
32
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
33
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
34
|
+
@paths = T.let([
|
35
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "script_tags/<id>.json"},
|
36
|
+
{http_method: :get, operation: :count, ids: [], path: "script_tags/count.json"},
|
37
|
+
{http_method: :get, operation: :get, ids: [], path: "script_tags.json"},
|
38
|
+
{http_method: :get, operation: :get, ids: [:id], path: "script_tags/<id>.json"},
|
39
|
+
{http_method: :post, operation: :post, ids: [], path: "script_tags.json"},
|
40
|
+
{http_method: :put, operation: :put, ids: [:id], path: "script_tags/<id>.json"}
|
41
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
42
|
+
|
43
|
+
sig { returns(T.nilable(String)) }
|
44
|
+
attr_reader :event
|
45
|
+
sig { returns(T.nilable(String)) }
|
46
|
+
attr_reader :src
|
47
|
+
sig { returns(T.nilable(T::Boolean)) }
|
48
|
+
attr_reader :cache
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :created_at
|
51
|
+
sig { returns(T.nilable(String)) }
|
52
|
+
attr_reader :display_scope
|
53
|
+
sig { returns(T.nilable(Integer)) }
|
54
|
+
attr_reader :id
|
55
|
+
sig { returns(T.nilable(String)) }
|
56
|
+
attr_reader :updated_at
|
57
|
+
|
58
|
+
class << self
|
59
|
+
sig do
|
60
|
+
params(
|
61
|
+
id: T.any(Integer, String),
|
62
|
+
fields: T.untyped,
|
63
|
+
session: Auth::Session
|
64
|
+
).returns(T.nilable(ScriptTag))
|
65
|
+
end
|
66
|
+
def find(
|
67
|
+
id:,
|
68
|
+
fields: nil,
|
69
|
+
session: ShopifyAPI::Context.active_session
|
70
|
+
)
|
71
|
+
result = base_find(
|
72
|
+
session: session,
|
73
|
+
ids: {id: id},
|
74
|
+
params: {fields: fields},
|
75
|
+
)
|
76
|
+
T.cast(result[0], T.nilable(ScriptTag))
|
77
|
+
end
|
78
|
+
|
79
|
+
sig do
|
80
|
+
params(
|
81
|
+
id: T.any(Integer, String),
|
82
|
+
session: Auth::Session
|
83
|
+
).returns(T.untyped)
|
84
|
+
end
|
85
|
+
def delete(
|
86
|
+
id:,
|
87
|
+
session: ShopifyAPI::Context.active_session
|
88
|
+
)
|
89
|
+
request(
|
90
|
+
http_method: :delete,
|
91
|
+
operation: :delete,
|
92
|
+
session: session,
|
93
|
+
ids: {id: id},
|
94
|
+
params: {},
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
sig do
|
99
|
+
params(
|
100
|
+
limit: T.untyped,
|
101
|
+
since_id: T.untyped,
|
102
|
+
created_at_min: T.untyped,
|
103
|
+
created_at_max: T.untyped,
|
104
|
+
updated_at_min: T.untyped,
|
105
|
+
updated_at_max: T.untyped,
|
106
|
+
src: T.untyped,
|
107
|
+
fields: T.untyped,
|
108
|
+
session: Auth::Session,
|
109
|
+
kwargs: T.untyped
|
110
|
+
).returns(T::Array[ScriptTag])
|
111
|
+
end
|
112
|
+
def all(
|
113
|
+
limit: nil,
|
114
|
+
since_id: nil,
|
115
|
+
created_at_min: nil,
|
116
|
+
created_at_max: nil,
|
117
|
+
updated_at_min: nil,
|
118
|
+
updated_at_max: nil,
|
119
|
+
src: nil,
|
120
|
+
fields: nil,
|
121
|
+
session: ShopifyAPI::Context.active_session,
|
122
|
+
**kwargs
|
123
|
+
)
|
124
|
+
response = base_find(
|
125
|
+
session: session,
|
126
|
+
ids: {},
|
127
|
+
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,
|
128
|
+
)
|
129
|
+
|
130
|
+
T.cast(response, T::Array[ScriptTag])
|
131
|
+
end
|
132
|
+
|
133
|
+
sig do
|
134
|
+
params(
|
135
|
+
src: T.untyped,
|
136
|
+
session: Auth::Session,
|
137
|
+
kwargs: T.untyped
|
138
|
+
).returns(T.untyped)
|
139
|
+
end
|
140
|
+
def count(
|
141
|
+
src: nil,
|
142
|
+
session: ShopifyAPI::Context.active_session,
|
143
|
+
**kwargs
|
144
|
+
)
|
145
|
+
request(
|
146
|
+
http_method: :get,
|
147
|
+
operation: :count,
|
148
|
+
session: session,
|
149
|
+
ids: {},
|
150
|
+
params: {src: src}.merge(kwargs).compact,
|
151
|
+
body: {},
|
152
|
+
entity: nil,
|
153
|
+
)
|
154
|
+
end
|
155
|
+
|
156
|
+
end
|
157
|
+
|
158
|
+
end
|
159
|
+
end
|
@@ -0,0 +1,87 @@
|
|
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
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@carrier_shipping_rate_providers = T.let(nil, T.untyped)
|
22
|
+
@countries = T.let(nil, T.nilable(T::Array[T.untyped]))
|
23
|
+
@id = T.let(nil, T.nilable(Integer))
|
24
|
+
@location_group_id = T.let(nil, T.nilable(String))
|
25
|
+
@name = T.let(nil, T.nilable(String))
|
26
|
+
@price_based_shipping_rates = T.let(nil, T.nilable(T::Array[T.untyped]))
|
27
|
+
@profile_id = T.let(nil, T.nilable(String))
|
28
|
+
@provinces = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
+
@weight_based_shipping_rates = T.let(nil, T.nilable(T::Array[T.untyped]))
|
30
|
+
|
31
|
+
super(session: session, from_hash: from_hash)
|
32
|
+
end
|
33
|
+
|
34
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
35
|
+
@has_many = T.let({
|
36
|
+
countries: Country,
|
37
|
+
provinces: Province
|
38
|
+
}, T::Hash[Symbol, Class])
|
39
|
+
@paths = T.let([
|
40
|
+
{http_method: :get, operation: :get, ids: [], path: "shipping_zones.json"}
|
41
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
42
|
+
|
43
|
+
sig { returns(T.untyped) }
|
44
|
+
attr_reader :carrier_shipping_rate_providers
|
45
|
+
sig { returns(T.nilable(T::Array[Country])) }
|
46
|
+
attr_reader :countries
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
48
|
+
attr_reader :id
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :location_group_id
|
51
|
+
sig { returns(T.nilable(String)) }
|
52
|
+
attr_reader :name
|
53
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
54
|
+
attr_reader :price_based_shipping_rates
|
55
|
+
sig { returns(T.nilable(String)) }
|
56
|
+
attr_reader :profile_id
|
57
|
+
sig { returns(T.nilable(T::Array[Province])) }
|
58
|
+
attr_reader :provinces
|
59
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
60
|
+
attr_reader :weight_based_shipping_rates
|
61
|
+
|
62
|
+
class << self
|
63
|
+
sig do
|
64
|
+
params(
|
65
|
+
fields: T.untyped,
|
66
|
+
session: Auth::Session,
|
67
|
+
kwargs: T.untyped
|
68
|
+
).returns(T::Array[ShippingZone])
|
69
|
+
end
|
70
|
+
def all(
|
71
|
+
fields: nil,
|
72
|
+
session: ShopifyAPI::Context.active_session,
|
73
|
+
**kwargs
|
74
|
+
)
|
75
|
+
response = base_find(
|
76
|
+
session: session,
|
77
|
+
ids: {},
|
78
|
+
params: {fields: fields}.merge(kwargs).compact,
|
79
|
+
)
|
80
|
+
|
81
|
+
T.cast(response, T::Array[ShippingZone])
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|