shopify_api 14.0.0 → 14.1.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 +23 -17
- data/.github/workflows/build.yml +2 -0
- data/.rubocop.yml +0 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +13 -1
- data/Gemfile.lock +24 -22
- data/dev.yml +1 -1
- data/docs/usage/custom_apps.md +3 -3
- data/docs/usage/graphql_storefront.md +13 -6
- data/docs/usage/rest.md +1 -1
- data/docs/usage/webhooks.md +2 -2
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/auth/session.rb +3 -3
- data/lib/shopify_api/clients/graphql/storefront.rb +26 -4
- data/lib/shopify_api/logger.rb +1 -1
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2022_04/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_04/variant.rb +6 -6
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2022_07/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/variant.rb +6 -6
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2022_10/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_10/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_01/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_01/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_04/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_04/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_04/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_07/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_07/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_10/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_10/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2024_01/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2024_01/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_01/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2024_04/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2024_04/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2024_04/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2024_04/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2024_04/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2024_04/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2024_04/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_04/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_04/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2024_04/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2024_04/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_04/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2024_04/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_04/collect.rb +146 -0
- data/lib/shopify_api/rest/resources/2024_04/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_04/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_04/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2024_04/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2024_04/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_04/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2024_04/customer.rb +333 -0
- data/lib/shopify_api/rest/resources/2024_04/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/2024_04/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_04/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2024_04/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2024_04/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2024_04/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2024_04/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2024_04/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_event.rb +167 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_order.rb +326 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2024_04/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_04/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_04/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2024_04/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2024_04/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2024_04/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2024_04/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2024_04/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_04/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2024_04/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_04/order.rb +489 -0
- data/lib/shopify_api/rest/resources/2024_04/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2024_04/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2024_04/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2024_04/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2024_04/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_04/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_04/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2024_04/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_04/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_04/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2024_04/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_04/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2024_04/recurring_application_charge.rb +176 -0
- data/lib/shopify_api/rest/resources/2024_04/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2024_04/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2024_04/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/2024_04/script_tag.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_04/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_04/shop.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_04/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2024_04/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2024_04/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2024_04/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2024_04/transaction.rb +188 -0
- data/lib/shopify_api/rest/resources/2024_04/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2024_04/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2024_04/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2024_04/webhook.rb +172 -0
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/registry.rb +6 -6
- data/lib/shopify_api.rb +1 -0
- data/shopify_api.gemspec +0 -8
- metadata +77 -101
@@ -0,0 +1,198 @@
|
|
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 Page < 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
|
+
@admin_graphql_api_id = T.let(nil, T.nilable(String))
|
22
|
+
@author = T.let(nil, T.nilable(String))
|
23
|
+
@body_html = T.let(nil, T.nilable(String))
|
24
|
+
@created_at = T.let(nil, T.nilable(String))
|
25
|
+
@handle = T.let(nil, T.nilable(String))
|
26
|
+
@id = T.let(nil, T.nilable(Integer))
|
27
|
+
@metafield = T.let(nil, T.nilable(Metafield))
|
28
|
+
@published_at = T.let(nil, T.nilable(String))
|
29
|
+
@shop_id = T.let(nil, T.nilable(Integer))
|
30
|
+
@template_suffix = T.let(nil, T.nilable(String))
|
31
|
+
@title = T.let(nil, T.nilable(String))
|
32
|
+
@updated_at = T.let(nil, T.nilable(String))
|
33
|
+
|
34
|
+
super(session: session, from_hash: from_hash)
|
35
|
+
end
|
36
|
+
|
37
|
+
@has_one = T.let({
|
38
|
+
metafield: Metafield
|
39
|
+
}, T::Hash[Symbol, Class])
|
40
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
41
|
+
@paths = T.let([
|
42
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "pages/<id>.json"},
|
43
|
+
{http_method: :get, operation: :count, ids: [], path: "pages/count.json"},
|
44
|
+
{http_method: :get, operation: :get, ids: [], path: "pages.json"},
|
45
|
+
{http_method: :get, operation: :get, ids: [:id], path: "pages/<id>.json"},
|
46
|
+
{http_method: :post, operation: :post, ids: [], path: "pages.json"},
|
47
|
+
{http_method: :put, operation: :put, ids: [:id], path: "pages/<id>.json"}
|
48
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
49
|
+
|
50
|
+
sig { returns(T.nilable(String)) }
|
51
|
+
attr_reader :admin_graphql_api_id
|
52
|
+
sig { returns(T.nilable(String)) }
|
53
|
+
attr_reader :author
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :body_html
|
56
|
+
sig { returns(T.nilable(String)) }
|
57
|
+
attr_reader :created_at
|
58
|
+
sig { returns(T.nilable(String)) }
|
59
|
+
attr_reader :handle
|
60
|
+
sig { returns(T.nilable(Integer)) }
|
61
|
+
attr_reader :id
|
62
|
+
sig { returns(T.nilable(Metafield)) }
|
63
|
+
attr_reader :metafield
|
64
|
+
sig { returns(T.nilable(String)) }
|
65
|
+
attr_reader :published_at
|
66
|
+
sig { returns(T.nilable(Integer)) }
|
67
|
+
attr_reader :shop_id
|
68
|
+
sig { returns(T.nilable(String)) }
|
69
|
+
attr_reader :template_suffix
|
70
|
+
sig { returns(T.nilable(String)) }
|
71
|
+
attr_reader :title
|
72
|
+
sig { returns(T.nilable(String)) }
|
73
|
+
attr_reader :updated_at
|
74
|
+
|
75
|
+
class << self
|
76
|
+
sig do
|
77
|
+
params(
|
78
|
+
id: T.any(Integer, String),
|
79
|
+
fields: T.untyped,
|
80
|
+
session: Auth::Session
|
81
|
+
).returns(T.nilable(Page))
|
82
|
+
end
|
83
|
+
def find(
|
84
|
+
id:,
|
85
|
+
fields: nil,
|
86
|
+
session: ShopifyAPI::Context.active_session
|
87
|
+
)
|
88
|
+
result = base_find(
|
89
|
+
session: session,
|
90
|
+
ids: {id: id},
|
91
|
+
params: {fields: fields},
|
92
|
+
)
|
93
|
+
T.cast(result[0], T.nilable(Page))
|
94
|
+
end
|
95
|
+
|
96
|
+
sig do
|
97
|
+
params(
|
98
|
+
id: T.any(Integer, String),
|
99
|
+
session: Auth::Session
|
100
|
+
).returns(T.untyped)
|
101
|
+
end
|
102
|
+
def delete(
|
103
|
+
id:,
|
104
|
+
session: ShopifyAPI::Context.active_session
|
105
|
+
)
|
106
|
+
request(
|
107
|
+
http_method: :delete,
|
108
|
+
operation: :delete,
|
109
|
+
session: session,
|
110
|
+
ids: {id: id},
|
111
|
+
params: {},
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
115
|
+
sig do
|
116
|
+
params(
|
117
|
+
limit: T.untyped,
|
118
|
+
since_id: T.untyped,
|
119
|
+
title: T.untyped,
|
120
|
+
handle: T.untyped,
|
121
|
+
created_at_min: T.untyped,
|
122
|
+
created_at_max: T.untyped,
|
123
|
+
updated_at_min: T.untyped,
|
124
|
+
updated_at_max: T.untyped,
|
125
|
+
published_at_min: T.untyped,
|
126
|
+
published_at_max: T.untyped,
|
127
|
+
fields: T.untyped,
|
128
|
+
published_status: T.untyped,
|
129
|
+
session: Auth::Session,
|
130
|
+
kwargs: T.untyped
|
131
|
+
).returns(T::Array[Page])
|
132
|
+
end
|
133
|
+
def all(
|
134
|
+
limit: nil,
|
135
|
+
since_id: nil,
|
136
|
+
title: nil,
|
137
|
+
handle: nil,
|
138
|
+
created_at_min: nil,
|
139
|
+
created_at_max: nil,
|
140
|
+
updated_at_min: nil,
|
141
|
+
updated_at_max: nil,
|
142
|
+
published_at_min: nil,
|
143
|
+
published_at_max: nil,
|
144
|
+
fields: nil,
|
145
|
+
published_status: nil,
|
146
|
+
session: ShopifyAPI::Context.active_session,
|
147
|
+
**kwargs
|
148
|
+
)
|
149
|
+
response = base_find(
|
150
|
+
session: session,
|
151
|
+
ids: {},
|
152
|
+
params: {limit: limit, since_id: since_id, title: title, handle: handle, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, fields: fields, published_status: published_status}.merge(kwargs).compact,
|
153
|
+
)
|
154
|
+
|
155
|
+
T.cast(response, T::Array[Page])
|
156
|
+
end
|
157
|
+
|
158
|
+
sig do
|
159
|
+
params(
|
160
|
+
title: T.untyped,
|
161
|
+
created_at_min: T.untyped,
|
162
|
+
created_at_max: T.untyped,
|
163
|
+
updated_at_min: T.untyped,
|
164
|
+
updated_at_max: T.untyped,
|
165
|
+
published_at_min: T.untyped,
|
166
|
+
published_at_max: T.untyped,
|
167
|
+
published_status: T.untyped,
|
168
|
+
session: Auth::Session,
|
169
|
+
kwargs: T.untyped
|
170
|
+
).returns(T.untyped)
|
171
|
+
end
|
172
|
+
def count(
|
173
|
+
title: nil,
|
174
|
+
created_at_min: nil,
|
175
|
+
created_at_max: nil,
|
176
|
+
updated_at_min: nil,
|
177
|
+
updated_at_max: nil,
|
178
|
+
published_at_min: nil,
|
179
|
+
published_at_max: nil,
|
180
|
+
published_status: nil,
|
181
|
+
session: ShopifyAPI::Context.active_session,
|
182
|
+
**kwargs
|
183
|
+
)
|
184
|
+
request(
|
185
|
+
http_method: :get,
|
186
|
+
operation: :count,
|
187
|
+
session: session,
|
188
|
+
ids: {},
|
189
|
+
params: {title: title, created_at_min: created_at_min, created_at_max: created_at_max, 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,
|
190
|
+
body: {},
|
191
|
+
entity: nil,
|
192
|
+
)
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
198
|
+
end
|
@@ -0,0 +1,144 @@
|
|
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 Payment < 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
|
+
@checkout = T.let(nil, T.nilable(Checkout))
|
22
|
+
@credit_card = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
23
|
+
@id = T.let(nil, T.nilable(Integer))
|
24
|
+
@next_action = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
25
|
+
@payment_processing_error_message = T.let(nil, T.nilable(String))
|
26
|
+
@transaction = T.let(nil, T.nilable(Transaction))
|
27
|
+
@unique_token = T.let(nil, T.nilable(String))
|
28
|
+
|
29
|
+
super(session: session, from_hash: from_hash)
|
30
|
+
end
|
31
|
+
|
32
|
+
@has_one = T.let({
|
33
|
+
transaction: Transaction,
|
34
|
+
checkout: Checkout
|
35
|
+
}, T::Hash[Symbol, Class])
|
36
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
37
|
+
@paths = T.let([
|
38
|
+
{http_method: :get, operation: :count, ids: [:checkout_id], path: "checkouts/<checkout_id>/payments/count.json"},
|
39
|
+
{http_method: :get, operation: :get, ids: [:checkout_id], path: "checkouts/<checkout_id>/payments.json"},
|
40
|
+
{http_method: :get, operation: :get, ids: [:checkout_id, :id], path: "checkouts/<checkout_id>/payments/<id>.json"},
|
41
|
+
{http_method: :post, operation: :post, ids: [:checkout_id], path: "checkouts/<checkout_id>/payments.json"}
|
42
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
43
|
+
|
44
|
+
sig { returns(T.nilable(Checkout)) }
|
45
|
+
attr_reader :checkout
|
46
|
+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
47
|
+
attr_reader :credit_card
|
48
|
+
sig { returns(T.nilable(Integer)) }
|
49
|
+
attr_reader :id
|
50
|
+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
51
|
+
attr_reader :next_action
|
52
|
+
sig { returns(T.nilable(String)) }
|
53
|
+
attr_reader :payment_processing_error_message
|
54
|
+
sig { returns(T.nilable(Transaction)) }
|
55
|
+
attr_reader :transaction
|
56
|
+
sig { returns(T.nilable(String)) }
|
57
|
+
attr_reader :unique_token
|
58
|
+
|
59
|
+
class << self
|
60
|
+
sig do
|
61
|
+
params(
|
62
|
+
id: T.any(Integer, String),
|
63
|
+
checkout_id: T.nilable(T.any(Integer, String)),
|
64
|
+
session: Auth::Session
|
65
|
+
).returns(T.nilable(Payment))
|
66
|
+
end
|
67
|
+
def find(
|
68
|
+
id:,
|
69
|
+
checkout_id: nil,
|
70
|
+
session: ShopifyAPI::Context.active_session
|
71
|
+
)
|
72
|
+
result = base_find(
|
73
|
+
session: session,
|
74
|
+
ids: {id: id, checkout_id: checkout_id},
|
75
|
+
params: {},
|
76
|
+
)
|
77
|
+
T.cast(result[0], T.nilable(Payment))
|
78
|
+
end
|
79
|
+
|
80
|
+
sig do
|
81
|
+
params(
|
82
|
+
checkout_id: T.nilable(T.any(Integer, String)),
|
83
|
+
session: Auth::Session,
|
84
|
+
kwargs: T.untyped
|
85
|
+
).returns(T::Array[Payment])
|
86
|
+
end
|
87
|
+
def all(
|
88
|
+
checkout_id: nil,
|
89
|
+
session: ShopifyAPI::Context.active_session,
|
90
|
+
**kwargs
|
91
|
+
)
|
92
|
+
response = base_find(
|
93
|
+
session: session,
|
94
|
+
ids: {checkout_id: checkout_id},
|
95
|
+
params: {}.merge(kwargs).compact,
|
96
|
+
)
|
97
|
+
|
98
|
+
T.cast(response, T::Array[Payment])
|
99
|
+
end
|
100
|
+
|
101
|
+
sig do
|
102
|
+
params(
|
103
|
+
checkout_id: T.nilable(T.any(Integer, String)),
|
104
|
+
session: Auth::Session,
|
105
|
+
kwargs: T.untyped
|
106
|
+
).returns(T.untyped)
|
107
|
+
end
|
108
|
+
def count(
|
109
|
+
checkout_id: nil,
|
110
|
+
session: ShopifyAPI::Context.active_session,
|
111
|
+
**kwargs
|
112
|
+
)
|
113
|
+
request(
|
114
|
+
http_method: :get,
|
115
|
+
operation: :count,
|
116
|
+
session: session,
|
117
|
+
ids: {checkout_id: checkout_id},
|
118
|
+
params: {}.merge(kwargs).compact,
|
119
|
+
body: {},
|
120
|
+
entity: nil,
|
121
|
+
)
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
sig do
|
127
|
+
returns(T.untyped)
|
128
|
+
end
|
129
|
+
def checkout_id()
|
130
|
+
@checkout&.token
|
131
|
+
end
|
132
|
+
|
133
|
+
sig do
|
134
|
+
params(
|
135
|
+
val: T.untyped
|
136
|
+
).void
|
137
|
+
end
|
138
|
+
def checkout_id=(val)
|
139
|
+
@checkout = @checkout || Checkout.new(session: @session)
|
140
|
+
T.unsafe(@checkout).token = val
|
141
|
+
end
|
142
|
+
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,147 @@
|
|
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 PaymentGateway < 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
|
+
@attachment = T.let(nil, T.nilable(String))
|
22
|
+
@created_at = T.let(nil, T.nilable(String))
|
23
|
+
@credential1 = T.let(nil, T.nilable(String))
|
24
|
+
@credential2 = T.let(nil, T.nilable(String))
|
25
|
+
@credential3 = T.let(nil, T.nilable(String))
|
26
|
+
@credential4 = T.let(nil, T.nilable(String))
|
27
|
+
@disabled = T.let(nil, T.nilable(T::Boolean))
|
28
|
+
@enabled_card_brands = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
+
@id = T.let(nil, T.nilable(Integer))
|
30
|
+
@name = T.let(nil, T.nilable(String))
|
31
|
+
@processing_method = T.let(nil, T.nilable(String))
|
32
|
+
@provider_id = T.let(nil, T.nilable(Integer))
|
33
|
+
@sandbox = T.let(nil, T.nilable(T::Boolean))
|
34
|
+
@service_name = T.let(nil, T.nilable(String))
|
35
|
+
@supports_network_tokenization = T.let(nil, T.nilable(T::Boolean))
|
36
|
+
@type = T.let(nil, T.nilable(String))
|
37
|
+
@updated_at = T.let(nil, T.nilable(String))
|
38
|
+
|
39
|
+
super(session: session, from_hash: from_hash)
|
40
|
+
end
|
41
|
+
|
42
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
43
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
44
|
+
@paths = T.let([
|
45
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "payment_gateways/<id>.json"},
|
46
|
+
{http_method: :get, operation: :get, ids: [], path: "payment_gateways.json"},
|
47
|
+
{http_method: :get, operation: :get, ids: [:id], path: "payment_gateways/<id>.json"},
|
48
|
+
{http_method: :post, operation: :post, ids: [], path: "payment_gateways.json"},
|
49
|
+
{http_method: :put, operation: :put, ids: [:id], path: "payment_gateways/<id>.json"}
|
50
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
51
|
+
|
52
|
+
sig { returns(T.nilable(String)) }
|
53
|
+
attr_reader :attachment
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :created_at
|
56
|
+
sig { returns(T.nilable(String)) }
|
57
|
+
attr_reader :credential1
|
58
|
+
sig { returns(T.nilable(String)) }
|
59
|
+
attr_reader :credential2
|
60
|
+
sig { returns(T.nilable(String)) }
|
61
|
+
attr_reader :credential3
|
62
|
+
sig { returns(T.nilable(String)) }
|
63
|
+
attr_reader :credential4
|
64
|
+
sig { returns(T.nilable(T::Boolean)) }
|
65
|
+
attr_reader :disabled
|
66
|
+
sig { returns(T.nilable(T::Array[String])) }
|
67
|
+
attr_reader :enabled_card_brands
|
68
|
+
sig { returns(T.nilable(Integer)) }
|
69
|
+
attr_reader :id
|
70
|
+
sig { returns(T.nilable(String)) }
|
71
|
+
attr_reader :name
|
72
|
+
sig { returns(T.nilable(String)) }
|
73
|
+
attr_reader :processing_method
|
74
|
+
sig { returns(T.nilable(Integer)) }
|
75
|
+
attr_reader :provider_id
|
76
|
+
sig { returns(T.nilable(T::Boolean)) }
|
77
|
+
attr_reader :sandbox
|
78
|
+
sig { returns(T.nilable(String)) }
|
79
|
+
attr_reader :service_name
|
80
|
+
sig { returns(T.nilable(T::Boolean)) }
|
81
|
+
attr_reader :supports_network_tokenization
|
82
|
+
sig { returns(T.nilable(String)) }
|
83
|
+
attr_reader :type
|
84
|
+
sig { returns(T.nilable(String)) }
|
85
|
+
attr_reader :updated_at
|
86
|
+
|
87
|
+
class << self
|
88
|
+
sig do
|
89
|
+
params(
|
90
|
+
id: T.any(Integer, String),
|
91
|
+
session: Auth::Session
|
92
|
+
).returns(T.nilable(PaymentGateway))
|
93
|
+
end
|
94
|
+
def find(
|
95
|
+
id:,
|
96
|
+
session: ShopifyAPI::Context.active_session
|
97
|
+
)
|
98
|
+
result = base_find(
|
99
|
+
session: session,
|
100
|
+
ids: {id: id},
|
101
|
+
params: {},
|
102
|
+
)
|
103
|
+
T.cast(result[0], T.nilable(PaymentGateway))
|
104
|
+
end
|
105
|
+
|
106
|
+
sig do
|
107
|
+
params(
|
108
|
+
id: T.any(Integer, String),
|
109
|
+
session: Auth::Session
|
110
|
+
).returns(T.untyped)
|
111
|
+
end
|
112
|
+
def delete(
|
113
|
+
id:,
|
114
|
+
session: ShopifyAPI::Context.active_session
|
115
|
+
)
|
116
|
+
request(
|
117
|
+
http_method: :delete,
|
118
|
+
operation: :delete,
|
119
|
+
session: session,
|
120
|
+
ids: {id: id},
|
121
|
+
params: {},
|
122
|
+
)
|
123
|
+
end
|
124
|
+
|
125
|
+
sig do
|
126
|
+
params(
|
127
|
+
session: Auth::Session,
|
128
|
+
kwargs: T.untyped
|
129
|
+
).returns(T::Array[PaymentGateway])
|
130
|
+
end
|
131
|
+
def all(
|
132
|
+
session: ShopifyAPI::Context.active_session,
|
133
|
+
**kwargs
|
134
|
+
)
|
135
|
+
response = base_find(
|
136
|
+
session: session,
|
137
|
+
ids: {},
|
138
|
+
params: {}.merge(kwargs).compact,
|
139
|
+
)
|
140
|
+
|
141
|
+
T.cast(response, T::Array[PaymentGateway])
|
142
|
+
end
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
end
|
@@ -0,0 +1,114 @@
|
|
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 PaymentTransaction < 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
|
+
@adjustment_order_transactions = T.let(nil, T.nilable(T::Array[T.untyped]))
|
22
|
+
@amount = T.let(nil, T.nilable(String))
|
23
|
+
@currency = T.let(nil, T.nilable(Currency))
|
24
|
+
@fee = T.let(nil, T.nilable(String))
|
25
|
+
@id = T.let(nil, T.nilable(Integer))
|
26
|
+
@net = T.let(nil, T.nilable(String))
|
27
|
+
@payout_id = T.let(nil, T.nilable(Integer))
|
28
|
+
@payout_status = T.let(nil, T.nilable(String))
|
29
|
+
@processed_at = T.let(nil, T.nilable(String))
|
30
|
+
@source_id = T.let(nil, T.nilable(Integer))
|
31
|
+
@source_order_id = T.let(nil, T.nilable(Integer))
|
32
|
+
@source_order_transaction_id = T.let(nil, T.nilable(String))
|
33
|
+
@source_type = T.let(nil, T.nilable(String))
|
34
|
+
@test = T.let(nil, T.nilable(T::Boolean))
|
35
|
+
@type = T.let(nil, T.nilable(String))
|
36
|
+
|
37
|
+
super(session: session, from_hash: from_hash)
|
38
|
+
end
|
39
|
+
|
40
|
+
@has_one = T.let({
|
41
|
+
currency: Currency
|
42
|
+
}, T::Hash[Symbol, Class])
|
43
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
44
|
+
@paths = T.let([
|
45
|
+
{http_method: :get, operation: :transactions, ids: [], path: "shopify_payments/balance/transactions.json"}
|
46
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
47
|
+
|
48
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
49
|
+
attr_reader :adjustment_order_transactions
|
50
|
+
sig { returns(T.nilable(String)) }
|
51
|
+
attr_reader :amount
|
52
|
+
sig { returns(T.nilable(Currency)) }
|
53
|
+
attr_reader :currency
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :fee
|
56
|
+
sig { returns(T.nilable(Integer)) }
|
57
|
+
attr_reader :id
|
58
|
+
sig { returns(T.nilable(String)) }
|
59
|
+
attr_reader :net
|
60
|
+
sig { returns(T.nilable(Integer)) }
|
61
|
+
attr_reader :payout_id
|
62
|
+
sig { returns(T.nilable(String)) }
|
63
|
+
attr_reader :payout_status
|
64
|
+
sig { returns(T.nilable(String)) }
|
65
|
+
attr_reader :processed_at
|
66
|
+
sig { returns(T.nilable(Integer)) }
|
67
|
+
attr_reader :source_id
|
68
|
+
sig { returns(T.nilable(Integer)) }
|
69
|
+
attr_reader :source_order_id
|
70
|
+
sig { returns(T.nilable(String)) }
|
71
|
+
attr_reader :source_order_transaction_id
|
72
|
+
sig { returns(T.nilable(String)) }
|
73
|
+
attr_reader :source_type
|
74
|
+
sig { returns(T.nilable(T::Boolean)) }
|
75
|
+
attr_reader :test
|
76
|
+
sig { returns(T.nilable(String)) }
|
77
|
+
attr_reader :type
|
78
|
+
|
79
|
+
class << self
|
80
|
+
sig do
|
81
|
+
params(
|
82
|
+
since_id: T.untyped,
|
83
|
+
last_id: T.untyped,
|
84
|
+
test: T.untyped,
|
85
|
+
payout_id: T.untyped,
|
86
|
+
payout_status: T.untyped,
|
87
|
+
session: Auth::Session,
|
88
|
+
kwargs: T.untyped
|
89
|
+
).returns(T.untyped)
|
90
|
+
end
|
91
|
+
def transactions(
|
92
|
+
since_id: nil,
|
93
|
+
last_id: nil,
|
94
|
+
test: nil,
|
95
|
+
payout_id: nil,
|
96
|
+
payout_status: nil,
|
97
|
+
session: ShopifyAPI::Context.active_session,
|
98
|
+
**kwargs
|
99
|
+
)
|
100
|
+
request(
|
101
|
+
http_method: :get,
|
102
|
+
operation: :transactions,
|
103
|
+
session: session,
|
104
|
+
ids: {},
|
105
|
+
params: {since_id: since_id, last_id: last_id, test: test, payout_id: payout_id, payout_status: payout_status}.merge(kwargs).compact,
|
106
|
+
body: {},
|
107
|
+
entity: nil,
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,101 @@
|
|
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 Payout < 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
|
+
@amount = T.let(nil, T.nilable(String))
|
22
|
+
@currency = T.let(nil, T.nilable(String))
|
23
|
+
@date = T.let(nil, T.nilable(String))
|
24
|
+
@id = T.let(nil, T.nilable(Integer))
|
25
|
+
@status = T.let(nil, T.nilable(String))
|
26
|
+
|
27
|
+
super(session: session, from_hash: from_hash)
|
28
|
+
end
|
29
|
+
|
30
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
31
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
32
|
+
@paths = T.let([
|
33
|
+
{http_method: :get, operation: :get, ids: [], path: "shopify_payments/payouts.json"},
|
34
|
+
{http_method: :get, operation: :get, ids: [:id], path: "shopify_payments/payouts/<id>.json"}
|
35
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
36
|
+
|
37
|
+
sig { returns(T.nilable(String)) }
|
38
|
+
attr_reader :amount
|
39
|
+
sig { returns(T.nilable(String)) }
|
40
|
+
attr_reader :currency
|
41
|
+
sig { returns(T.nilable(String)) }
|
42
|
+
attr_reader :date
|
43
|
+
sig { returns(T.nilable(Integer)) }
|
44
|
+
attr_reader :id
|
45
|
+
sig { returns(T.nilable(String)) }
|
46
|
+
attr_reader :status
|
47
|
+
|
48
|
+
class << self
|
49
|
+
sig do
|
50
|
+
params(
|
51
|
+
id: T.any(Integer, String),
|
52
|
+
session: Auth::Session
|
53
|
+
).returns(T.nilable(Payout))
|
54
|
+
end
|
55
|
+
def find(
|
56
|
+
id:,
|
57
|
+
session: ShopifyAPI::Context.active_session
|
58
|
+
)
|
59
|
+
result = base_find(
|
60
|
+
session: session,
|
61
|
+
ids: {id: id},
|
62
|
+
params: {},
|
63
|
+
)
|
64
|
+
T.cast(result[0], T.nilable(Payout))
|
65
|
+
end
|
66
|
+
|
67
|
+
sig do
|
68
|
+
params(
|
69
|
+
since_id: T.untyped,
|
70
|
+
last_id: T.untyped,
|
71
|
+
date_min: T.untyped,
|
72
|
+
date_max: T.untyped,
|
73
|
+
date: T.untyped,
|
74
|
+
status: T.untyped,
|
75
|
+
session: Auth::Session,
|
76
|
+
kwargs: T.untyped
|
77
|
+
).returns(T::Array[Payout])
|
78
|
+
end
|
79
|
+
def all(
|
80
|
+
since_id: nil,
|
81
|
+
last_id: nil,
|
82
|
+
date_min: nil,
|
83
|
+
date_max: nil,
|
84
|
+
date: nil,
|
85
|
+
status: nil,
|
86
|
+
session: ShopifyAPI::Context.active_session,
|
87
|
+
**kwargs
|
88
|
+
)
|
89
|
+
response = base_find(
|
90
|
+
session: session,
|
91
|
+
ids: {},
|
92
|
+
params: {since_id: since_id, last_id: last_id, date_min: date_min, date_max: date_max, date: date, status: status}.merge(kwargs).compact,
|
93
|
+
)
|
94
|
+
|
95
|
+
T.cast(response, T::Array[Payout])
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
end
|