shopify_api 14.5.0 → 14.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/Gemfile.lock +20 -11
- data/docs/usage/oauth.md +14 -0
- data/docs/usage/webhooks.md +11 -0
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/context.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_10/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_01/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_07/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_10/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_01/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_07/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_07/webhook.rb +1 -0
- data/lib/shopify_api/rest/resources/2024_10/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2024_10/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2024_10/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2024_10/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2024_10/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2024_10/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2024_10/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_10/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_10/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2024_10/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2024_10/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_10/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2024_10/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_10/collect.rb +146 -0
- data/lib/shopify_api/rest/resources/2024_10/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_10/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_10/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2024_10/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2024_10/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_10/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2024_10/customer.rb +335 -0
- data/lib/shopify_api/rest/resources/2024_10/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/2024_10/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_10/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2024_10/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2024_10/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2024_10/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2024_10/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2024_10/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2024_10/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2024_10/fulfillment_event.rb +167 -0
- data/lib/shopify_api/rest/resources/2024_10/fulfillment_order.rb +326 -0
- data/lib/shopify_api/rest/resources/2024_10/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_10/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2024_10/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_10/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_10/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2024_10/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2024_10/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2024_10/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2024_10/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2024_10/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_10/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2024_10/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_10/order.rb +490 -0
- data/lib/shopify_api/rest/resources/2024_10/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2024_10/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2024_10/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2024_10/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2024_10/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_10/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_10/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2024_10/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_10/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_10/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2024_10/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_10/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2024_10/recurring_application_charge.rb +184 -0
- data/lib/shopify_api/rest/resources/2024_10/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2024_10/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2024_10/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/2024_10/script_tag.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_10/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_10/shop.rb +232 -0
- data/lib/shopify_api/rest/resources/2024_10/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2024_10/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2024_10/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2024_10/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2024_10/transaction.rb +189 -0
- data/lib/shopify_api/rest/resources/2024_10/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2024_10/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2024_10/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2024_10/webhook.rb +173 -0
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/registration.rb +17 -3
- data/lib/shopify_api/webhooks/registrations/event_bridge.rb +22 -3
- data/lib/shopify_api/webhooks/registrations/http.rb +22 -3
- data/lib/shopify_api/webhooks/registrations/pub_sub.rb +23 -4
- data/lib/shopify_api/webhooks/registry.rb +15 -5
- metadata +76 -3
@@ -0,0 +1,92 @@
|
|
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 AssignedFulfillmentOrder < 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
|
+
@assigned_location_id = T.let(nil, T.nilable(Integer))
|
22
|
+
@destination = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
23
|
+
@id = T.let(nil, T.nilable(Integer))
|
24
|
+
@line_items = T.let(nil, T.nilable(T::Array[T.untyped]))
|
25
|
+
@order_id = T.let(nil, T.nilable(Integer))
|
26
|
+
@request_status = T.let(nil, T.nilable(String))
|
27
|
+
@shop_id = T.let(nil, T.nilable(Integer))
|
28
|
+
@status = T.let(nil, T.nilable(String))
|
29
|
+
|
30
|
+
super(session: session, from_hash: from_hash)
|
31
|
+
end
|
32
|
+
|
33
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
34
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
35
|
+
@paths = T.let([
|
36
|
+
{http_method: :get, operation: :get, ids: [], path: "assigned_fulfillment_orders.json"}
|
37
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
38
|
+
|
39
|
+
sig { returns(T.nilable(Integer)) }
|
40
|
+
attr_reader :assigned_location_id
|
41
|
+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
42
|
+
attr_reader :destination
|
43
|
+
sig { returns(T.nilable(Integer)) }
|
44
|
+
attr_reader :id
|
45
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
46
|
+
attr_reader :line_items
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
48
|
+
attr_reader :order_id
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :request_status
|
51
|
+
sig { returns(T.nilable(Integer)) }
|
52
|
+
attr_reader :shop_id
|
53
|
+
sig { returns(T.nilable(String)) }
|
54
|
+
attr_reader :status
|
55
|
+
|
56
|
+
class << self
|
57
|
+
sig do
|
58
|
+
returns(T::Array[String])
|
59
|
+
end
|
60
|
+
def json_response_body_names()
|
61
|
+
[
|
62
|
+
"fulfillment_order"
|
63
|
+
]
|
64
|
+
end
|
65
|
+
|
66
|
+
sig do
|
67
|
+
params(
|
68
|
+
assignment_status: T.untyped,
|
69
|
+
location_ids: T.nilable(T.any(T::Array[T.untyped], Integer, String)),
|
70
|
+
session: Auth::Session,
|
71
|
+
kwargs: T.untyped
|
72
|
+
).returns(T::Array[AssignedFulfillmentOrder])
|
73
|
+
end
|
74
|
+
def all(
|
75
|
+
assignment_status: nil,
|
76
|
+
location_ids: nil,
|
77
|
+
session: ShopifyAPI::Context.active_session,
|
78
|
+
**kwargs
|
79
|
+
)
|
80
|
+
response = base_find(
|
81
|
+
session: session,
|
82
|
+
ids: {},
|
83
|
+
params: {assignment_status: assignment_status, location_ids: location_ids}.merge(kwargs).compact,
|
84
|
+
)
|
85
|
+
|
86
|
+
T.cast(response, T::Array[AssignedFulfillmentOrder])
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,58 @@
|
|
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 Balance < 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
|
+
@balance = T.let(nil, T.nilable(T::Array[T.untyped]))
|
22
|
+
|
23
|
+
super(session: session, from_hash: from_hash)
|
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/balance.json"}
|
30
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
31
|
+
|
32
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
33
|
+
attr_reader :balance
|
34
|
+
|
35
|
+
class << self
|
36
|
+
sig do
|
37
|
+
params(
|
38
|
+
session: Auth::Session,
|
39
|
+
kwargs: T.untyped
|
40
|
+
).returns(T::Array[Balance])
|
41
|
+
end
|
42
|
+
def all(
|
43
|
+
session: ShopifyAPI::Context.active_session,
|
44
|
+
**kwargs
|
45
|
+
)
|
46
|
+
response = base_find(
|
47
|
+
session: session,
|
48
|
+
ids: {},
|
49
|
+
params: {}.merge(kwargs).compact,
|
50
|
+
)
|
51
|
+
|
52
|
+
T.cast(response, T::Array[Balance])
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,166 @@
|
|
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 Blog < 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
|
+
@commentable = T.let(nil, T.nilable(String))
|
23
|
+
@created_at = T.let(nil, T.nilable(String))
|
24
|
+
@feedburner = T.let(nil, T.nilable(String))
|
25
|
+
@feedburner_location = T.let(nil, T.nilable(String))
|
26
|
+
@handle = T.let(nil, T.nilable(String))
|
27
|
+
@id = T.let(nil, T.nilable(Integer))
|
28
|
+
@metafields = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
+
@tags = T.let(nil, T.nilable(String))
|
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({}, T::Hash[Symbol, Class])
|
38
|
+
@has_many = T.let({
|
39
|
+
metafields: Metafield
|
40
|
+
}, T::Hash[Symbol, Class])
|
41
|
+
@paths = T.let([
|
42
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "blogs/<id>.json"},
|
43
|
+
{http_method: :get, operation: :count, ids: [], path: "blogs/count.json"},
|
44
|
+
{http_method: :get, operation: :get, ids: [], path: "blogs.json"},
|
45
|
+
{http_method: :get, operation: :get, ids: [:id], path: "blogs/<id>.json"},
|
46
|
+
{http_method: :post, operation: :post, ids: [], path: "blogs.json"},
|
47
|
+
{http_method: :put, operation: :put, ids: [:id], path: "blogs/<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 :commentable
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :created_at
|
56
|
+
sig { returns(T.nilable(String)) }
|
57
|
+
attr_reader :feedburner
|
58
|
+
sig { returns(T.nilable(String)) }
|
59
|
+
attr_reader :feedburner_location
|
60
|
+
sig { returns(T.nilable(String)) }
|
61
|
+
attr_reader :handle
|
62
|
+
sig { returns(T.nilable(Integer)) }
|
63
|
+
attr_reader :id
|
64
|
+
sig { returns(T.nilable(T::Array[Metafield])) }
|
65
|
+
attr_reader :metafields
|
66
|
+
sig { returns(T.nilable(String)) }
|
67
|
+
attr_reader :tags
|
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(Blog))
|
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(Blog))
|
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
|
+
handle: T.untyped,
|
120
|
+
fields: T.untyped,
|
121
|
+
session: Auth::Session,
|
122
|
+
kwargs: T.untyped
|
123
|
+
).returns(T::Array[Blog])
|
124
|
+
end
|
125
|
+
def all(
|
126
|
+
limit: nil,
|
127
|
+
since_id: nil,
|
128
|
+
handle: nil,
|
129
|
+
fields: nil,
|
130
|
+
session: ShopifyAPI::Context.active_session,
|
131
|
+
**kwargs
|
132
|
+
)
|
133
|
+
response = base_find(
|
134
|
+
session: session,
|
135
|
+
ids: {},
|
136
|
+
params: {limit: limit, since_id: since_id, handle: handle, fields: fields}.merge(kwargs).compact,
|
137
|
+
)
|
138
|
+
|
139
|
+
T.cast(response, T::Array[Blog])
|
140
|
+
end
|
141
|
+
|
142
|
+
sig do
|
143
|
+
params(
|
144
|
+
session: Auth::Session,
|
145
|
+
kwargs: T.untyped
|
146
|
+
).returns(T.untyped)
|
147
|
+
end
|
148
|
+
def count(
|
149
|
+
session: ShopifyAPI::Context.active_session,
|
150
|
+
**kwargs
|
151
|
+
)
|
152
|
+
request(
|
153
|
+
http_method: :get,
|
154
|
+
operation: :count,
|
155
|
+
session: session,
|
156
|
+
ids: {},
|
157
|
+
params: {}.merge(kwargs).compact,
|
158
|
+
body: {},
|
159
|
+
entity: nil,
|
160
|
+
)
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|
165
|
+
end
|
166
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
########################################################################################################################
|
5
|
+
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
|
6
|
+
########################################################################################################################
|
7
|
+
|
8
|
+
module ShopifyAPI
|
9
|
+
class CancellationRequest < 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
|
+
@fulfillment_order_id = T.let(nil, T.nilable(Integer))
|
22
|
+
|
23
|
+
super(session: session, from_hash: from_hash)
|
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: :post, operation: :accept, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/cancellation_request/accept.json"},
|
30
|
+
{http_method: :post, operation: :post, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/cancellation_request.json"},
|
31
|
+
{http_method: :post, operation: :reject, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/cancellation_request/reject.json"}
|
32
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
33
|
+
|
34
|
+
sig { returns(T.nilable(Integer)) }
|
35
|
+
attr_reader :fulfillment_order_id
|
36
|
+
|
37
|
+
class << self
|
38
|
+
end
|
39
|
+
|
40
|
+
sig do
|
41
|
+
params(
|
42
|
+
message: T.untyped,
|
43
|
+
body: T.untyped,
|
44
|
+
kwargs: T.untyped
|
45
|
+
).returns(T.untyped)
|
46
|
+
end
|
47
|
+
def accept(
|
48
|
+
message: nil,
|
49
|
+
body: nil,
|
50
|
+
**kwargs
|
51
|
+
)
|
52
|
+
self.class.request(
|
53
|
+
http_method: :post,
|
54
|
+
operation: :accept,
|
55
|
+
session: @session,
|
56
|
+
ids: {fulfillment_order_id: @fulfillment_order_id},
|
57
|
+
params: {message: message}.merge(kwargs).compact,
|
58
|
+
body: body,
|
59
|
+
entity: self,
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
sig do
|
64
|
+
params(
|
65
|
+
message: T.untyped,
|
66
|
+
body: T.untyped,
|
67
|
+
kwargs: T.untyped
|
68
|
+
).returns(T.untyped)
|
69
|
+
end
|
70
|
+
def reject(
|
71
|
+
message: nil,
|
72
|
+
body: nil,
|
73
|
+
**kwargs
|
74
|
+
)
|
75
|
+
self.class.request(
|
76
|
+
http_method: :post,
|
77
|
+
operation: :reject,
|
78
|
+
session: @session,
|
79
|
+
ids: {fulfillment_order_id: @fulfillment_order_id},
|
80
|
+
params: {message: message}.merge(kwargs).compact,
|
81
|
+
body: body,
|
82
|
+
entity: self,
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,120 @@
|
|
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 CarrierService < 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
|
+
@active = T.let(nil, T.nilable(T::Boolean))
|
22
|
+
@admin_graphql_api_id = T.let(nil, T.nilable(String))
|
23
|
+
@callback_url = T.let(nil, T.nilable(String))
|
24
|
+
@carrier_service_type = T.let(nil, T.nilable(String))
|
25
|
+
@format = T.let(nil, T.nilable(String))
|
26
|
+
@id = T.let(nil, T.nilable(Integer))
|
27
|
+
@name = T.let(nil, T.nilable(String))
|
28
|
+
@service_discovery = T.let(nil, T.nilable(T::Boolean))
|
29
|
+
|
30
|
+
super(session: session, from_hash: from_hash)
|
31
|
+
end
|
32
|
+
|
33
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
34
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
35
|
+
@paths = T.let([
|
36
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "carrier_services/<id>.json"},
|
37
|
+
{http_method: :get, operation: :get, ids: [], path: "carrier_services.json"},
|
38
|
+
{http_method: :get, operation: :get, ids: [:id], path: "carrier_services/<id>.json"},
|
39
|
+
{http_method: :post, operation: :post, ids: [], path: "carrier_services.json"},
|
40
|
+
{http_method: :put, operation: :put, ids: [:id], path: "carrier_services/<id>.json"}
|
41
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
42
|
+
|
43
|
+
sig { returns(T.nilable(T::Boolean)) }
|
44
|
+
attr_reader :active
|
45
|
+
sig { returns(T.nilable(String)) }
|
46
|
+
attr_reader :admin_graphql_api_id
|
47
|
+
sig { returns(T.nilable(String)) }
|
48
|
+
attr_reader :callback_url
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :carrier_service_type
|
51
|
+
sig { returns(T.nilable(String)) }
|
52
|
+
attr_reader :format
|
53
|
+
sig { returns(T.nilable(Integer)) }
|
54
|
+
attr_reader :id
|
55
|
+
sig { returns(T.nilable(String)) }
|
56
|
+
attr_reader :name
|
57
|
+
sig { returns(T.nilable(T::Boolean)) }
|
58
|
+
attr_reader :service_discovery
|
59
|
+
|
60
|
+
class << self
|
61
|
+
sig do
|
62
|
+
params(
|
63
|
+
id: T.any(Integer, String),
|
64
|
+
session: Auth::Session
|
65
|
+
).returns(T.nilable(CarrierService))
|
66
|
+
end
|
67
|
+
def find(
|
68
|
+
id:,
|
69
|
+
session: ShopifyAPI::Context.active_session
|
70
|
+
)
|
71
|
+
result = base_find(
|
72
|
+
session: session,
|
73
|
+
ids: {id: id},
|
74
|
+
params: {},
|
75
|
+
)
|
76
|
+
T.cast(result[0], T.nilable(CarrierService))
|
77
|
+
end
|
78
|
+
|
79
|
+
sig do
|
80
|
+
params(
|
81
|
+
id: T.any(Integer, String),
|
82
|
+
session: Auth::Session
|
83
|
+
).returns(T.untyped)
|
84
|
+
end
|
85
|
+
def delete(
|
86
|
+
id:,
|
87
|
+
session: ShopifyAPI::Context.active_session
|
88
|
+
)
|
89
|
+
request(
|
90
|
+
http_method: :delete,
|
91
|
+
operation: :delete,
|
92
|
+
session: session,
|
93
|
+
ids: {id: id},
|
94
|
+
params: {},
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
sig do
|
99
|
+
params(
|
100
|
+
session: Auth::Session,
|
101
|
+
kwargs: T.untyped
|
102
|
+
).returns(T::Array[CarrierService])
|
103
|
+
end
|
104
|
+
def all(
|
105
|
+
session: ShopifyAPI::Context.active_session,
|
106
|
+
**kwargs
|
107
|
+
)
|
108
|
+
response = base_find(
|
109
|
+
session: session,
|
110
|
+
ids: {},
|
111
|
+
params: {}.merge(kwargs).compact,
|
112
|
+
)
|
113
|
+
|
114
|
+
T.cast(response, T::Array[CarrierService])
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
end
|