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