shopify_api 12.3.0 → 12.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/BUG_REPORT.md +40 -0
- data/.github/ISSUE_TEMPLATE/ENHANCEMENT.md +9 -0
- data/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +9 -0
- data/.github/workflows/build.yml +0 -3
- data/.github/workflows/stale.yml +1 -0
- data/CHANGELOG.md +8 -1
- data/Gemfile.lock +9 -9
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/rest/base.rb +11 -4
- data/lib/shopify_api/rest/resources/2022_01/assigned_fulfillment_order.rb +7 -0
- data/lib/shopify_api/rest/resources/2022_01/customer.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_01/fulfillment.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb +3 -3
- data/lib/shopify_api/rest/resources/2022_04/assigned_fulfillment_order.rb +7 -0
- data/lib/shopify_api/rest/resources/2022_04/customer.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_04/fulfillment.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb +3 -3
- data/lib/shopify_api/rest/resources/2022_04/metafield.rb +5 -3
- data/lib/shopify_api/rest/resources/2022_07/assigned_fulfillment_order.rb +7 -0
- data/lib/shopify_api/rest/resources/2022_07/customer.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_07/fulfillment.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb +3 -3
- data/lib/shopify_api/rest/resources/2022_07/metafield.rb +5 -3
- data/lib/shopify_api/rest/resources/2022_10/assigned_fulfillment_order.rb +7 -0
- data/lib/shopify_api/rest/resources/2022_10/customer.rb +9 -1
- data/lib/shopify_api/rest/resources/2022_10/fulfillment.rb +5 -1
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_order.rb +3 -3
- data/lib/shopify_api/rest/resources/2022_10/metafield.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_01/abandoned_checkout.rb +190 -0
- data/lib/shopify_api/rest/resources/2023_01/access_scope.rb +58 -0
- data/lib/shopify_api/rest/resources/2023_01/apple_pay_certificate.rb +105 -0
- data/lib/shopify_api/rest/resources/2023_01/application_charge.rb +104 -0
- data/lib/shopify_api/rest/resources/2023_01/application_credit.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_01/article.rb +265 -0
- data/lib/shopify_api/rest/resources/2023_01/asset.rb +118 -0
- data/lib/shopify_api/rest/resources/2023_01/assigned_fulfillment_order.rb +86 -0
- data/lib/shopify_api/rest/resources/2023_01/balance.rb +50 -0
- data/lib/shopify_api/rest/resources/2023_01/blog.rb +162 -0
- data/lib/shopify_api/rest/resources/2023_01/cancellation_request.rb +83 -0
- data/lib/shopify_api/rest/resources/2023_01/carrier_service.rb +113 -0
- data/lib/shopify_api/rest/resources/2023_01/checkout.rb +209 -0
- data/lib/shopify_api/rest/resources/2023_01/collect.rb +142 -0
- data/lib/shopify_api/rest/resources/2023_01/collection.rb +110 -0
- data/lib/shopify_api/rest/resources/2023_01/collection_listing.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_01/comment.rb +283 -0
- data/lib/shopify_api/rest/resources/2023_01/country.rb +137 -0
- data/lib/shopify_api/rest/resources/2023_01/currency.rb +57 -0
- data/lib/shopify_api/rest/resources/2023_01/custom_collection.rb +187 -0
- data/lib/shopify_api/rest/resources/2023_01/customer.rb +329 -0
- data/lib/shopify_api/rest/resources/2023_01/customer_address.rb +201 -0
- data/lib/shopify_api/rest/resources/2023_01/customer_saved_search.rb +169 -0
- data/lib/shopify_api/rest/resources/2023_01/deprecated_api_call.rb +57 -0
- data/lib/shopify_api/rest/resources/2023_01/discount_code.rb +219 -0
- data/lib/shopify_api/rest/resources/2023_01/dispute.rb +111 -0
- data/lib/shopify_api/rest/resources/2023_01/draft_order.rb +275 -0
- data/lib/shopify_api/rest/resources/2023_01/event.rb +148 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment.rb +225 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_event.rb +166 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb +316 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_service.rb +130 -0
- data/lib/shopify_api/rest/resources/2023_01/gift_card.rb +215 -0
- data/lib/shopify_api/rest/resources/2023_01/gift_card_adjustment.rb +118 -0
- data/lib/shopify_api/rest/resources/2023_01/image.rb +157 -0
- data/lib/shopify_api/rest/resources/2023_01/inventory_item.rb +108 -0
- data/lib/shopify_api/rest/resources/2023_01/inventory_level.rb +179 -0
- data/lib/shopify_api/rest/resources/2023_01/location.rb +167 -0
- data/lib/shopify_api/rest/resources/2023_01/locations_for_move.rb +56 -0
- data/lib/shopify_api/rest/resources/2023_01/marketing_event.rb +209 -0
- data/lib/shopify_api/rest/resources/2023_01/metafield.rb +344 -0
- data/lib/shopify_api/rest/resources/2023_01/mobile_platform_application.rb +110 -0
- data/lib/shopify_api/rest/resources/2023_01/order.rb +479 -0
- data/lib/shopify_api/rest/resources/2023_01/order_risk.rb +135 -0
- data/lib/shopify_api/rest/resources/2023_01/page.rb +194 -0
- data/lib/shopify_api/rest/resources/2023_01/payment.rb +140 -0
- data/lib/shopify_api/rest/resources/2023_01/payment_gateway.rb +143 -0
- data/lib/shopify_api/rest/resources/2023_01/payment_transaction.rb +107 -0
- data/lib/shopify_api/rest/resources/2023_01/payout.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_01/policy.rb +69 -0
- data/lib/shopify_api/rest/resources/2023_01/price_rule.rb +223 -0
- data/lib/shopify_api/rest/resources/2023_01/product.rb +223 -0
- data/lib/shopify_api/rest/resources/2023_01/product_listing.rb +196 -0
- data/lib/shopify_api/rest/resources/2023_01/product_resource_feedback.rb +88 -0
- data/lib/shopify_api/rest/resources/2023_01/province.rb +132 -0
- data/lib/shopify_api/rest/resources/2023_01/recurring_application_charge.rb +167 -0
- data/lib/shopify_api/rest/resources/2023_01/redirect.rb +139 -0
- data/lib/shopify_api/rest/resources/2023_01/refund.rb +151 -0
- data/lib/shopify_api/rest/resources/2023_01/report.rb +121 -0
- data/lib/shopify_api/rest/resources/2023_01/resource_feedback.rb +73 -0
- data/lib/shopify_api/rest/resources/2023_01/script_tag.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_01/shipping_zone.rb +83 -0
- data/lib/shopify_api/rest/resources/2023_01/shop.rb +221 -0
- data/lib/shopify_api/rest/resources/2023_01/smart_collection.rb +216 -0
- data/lib/shopify_api/rest/resources/2023_01/storefront_access_token.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_01/tender_transaction.rb +93 -0
- data/lib/shopify_api/rest/resources/2023_01/theme.rb +120 -0
- data/lib/shopify_api/rest/resources/2023_01/transaction.rb +181 -0
- data/lib/shopify_api/rest/resources/2023_01/usage_charge.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_01/user.rb +138 -0
- data/lib/shopify_api/rest/resources/2023_01/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2023_01/webhook.rb +168 -0
- data/lib/shopify_api/version.rb +1 -1
- metadata +78 -3
- data/.github/ISSUE_TEMPLATE.md +0 -35
@@ -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,121 @@
|
|
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 Report < 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
|
+
@category = T.let(nil, T.nilable(String))
|
20
|
+
@id = T.let(nil, T.nilable(Integer))
|
21
|
+
@name = T.let(nil, T.nilable(String))
|
22
|
+
@shopify_ql = T.let(nil, T.nilable(String))
|
23
|
+
@updated_at = T.let(nil, T.nilable(String))
|
24
|
+
end
|
25
|
+
|
26
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
27
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
28
|
+
@paths = T.let([
|
29
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "reports/<id>.json"},
|
30
|
+
{http_method: :get, operation: :get, ids: [], path: "reports.json"},
|
31
|
+
{http_method: :get, operation: :get, ids: [:id], path: "reports/<id>.json"},
|
32
|
+
{http_method: :post, operation: :post, ids: [], path: "reports.json"},
|
33
|
+
{http_method: :put, operation: :put, ids: [:id], path: "reports/<id>.json"}
|
34
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
35
|
+
|
36
|
+
sig { returns(T.nilable(String)) }
|
37
|
+
attr_reader :category
|
38
|
+
sig { returns(T.nilable(Integer)) }
|
39
|
+
attr_reader :id
|
40
|
+
sig { returns(T.nilable(String)) }
|
41
|
+
attr_reader :name
|
42
|
+
sig { returns(T.nilable(String)) }
|
43
|
+
attr_reader :shopify_ql
|
44
|
+
sig { returns(T.nilable(String)) }
|
45
|
+
attr_reader :updated_at
|
46
|
+
|
47
|
+
class << self
|
48
|
+
sig do
|
49
|
+
params(
|
50
|
+
id: T.any(Integer, String),
|
51
|
+
fields: T.untyped,
|
52
|
+
session: Auth::Session
|
53
|
+
).returns(T.nilable(Report))
|
54
|
+
end
|
55
|
+
def find(
|
56
|
+
id:,
|
57
|
+
fields: nil,
|
58
|
+
session: ShopifyAPI::Context.active_session
|
59
|
+
)
|
60
|
+
result = base_find(
|
61
|
+
session: session,
|
62
|
+
ids: {id: id},
|
63
|
+
params: {fields: fields},
|
64
|
+
)
|
65
|
+
T.cast(result[0], T.nilable(Report))
|
66
|
+
end
|
67
|
+
|
68
|
+
sig do
|
69
|
+
params(
|
70
|
+
id: T.any(Integer, String),
|
71
|
+
session: Auth::Session
|
72
|
+
).returns(T.untyped)
|
73
|
+
end
|
74
|
+
def delete(
|
75
|
+
id:,
|
76
|
+
session: ShopifyAPI::Context.active_session
|
77
|
+
)
|
78
|
+
request(
|
79
|
+
http_method: :delete,
|
80
|
+
operation: :delete,
|
81
|
+
session: session,
|
82
|
+
ids: {id: id},
|
83
|
+
params: {},
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
sig do
|
88
|
+
params(
|
89
|
+
ids: T.untyped,
|
90
|
+
limit: T.untyped,
|
91
|
+
since_id: T.untyped,
|
92
|
+
updated_at_min: T.untyped,
|
93
|
+
updated_at_max: T.untyped,
|
94
|
+
fields: T.untyped,
|
95
|
+
session: Auth::Session,
|
96
|
+
kwargs: T.untyped
|
97
|
+
).returns(T::Array[Report])
|
98
|
+
end
|
99
|
+
def all(
|
100
|
+
ids: nil,
|
101
|
+
limit: nil,
|
102
|
+
since_id: nil,
|
103
|
+
updated_at_min: nil,
|
104
|
+
updated_at_max: nil,
|
105
|
+
fields: nil,
|
106
|
+
session: ShopifyAPI::Context.active_session,
|
107
|
+
**kwargs
|
108
|
+
)
|
109
|
+
response = base_find(
|
110
|
+
session: session,
|
111
|
+
ids: {},
|
112
|
+
params: {ids: ids, limit: limit, since_id: since_id, updated_at_min: updated_at_min, updated_at_max: updated_at_max, fields: fields}.merge(kwargs).compact,
|
113
|
+
)
|
114
|
+
|
115
|
+
T.cast(response, T::Array[Report])
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
121
|
+
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
|