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