wesley-key-sdk 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +47 -34
- data/bin/console +4 -4
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/api_helper.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/apis/base_api.rb +3 -3
- data/lib/swagger_petstore_open_api30/apis/pet_api.rb +287 -0
- data/lib/swagger_petstore_open_api30/apis/store_api.rb +131 -0
- data/lib/swagger_petstore_open_api30/apis/user_api.rb +233 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/client.rb +34 -15
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/configuration.rb +30 -20
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/exceptions/api_exception.rb +2 -2
- data/lib/swagger_petstore_open_api30/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/api_response.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/auth/api_key.rb +15 -15
- data/lib/swagger_petstore_open_api30/http/auth/petstore_auth.rb +112 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_call_back.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_method_enum.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_request.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_response.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/proxy_settings.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/logging/configuration/api_logging_configuration.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/logging/sdk_logger.rb +2 -2
- data/lib/swagger_petstore_open_api30/models/api_response.rb +118 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/models/base_model.rb +2 -2
- data/lib/{webhooks_and_callbacks_api/models/package.rb → swagger_petstore_open_api30/models/category.rb} +39 -29
- data/lib/swagger_petstore_open_api30/models/oauth_provider_error.rb +62 -0
- data/lib/swagger_petstore_open_api30/models/oauth_scope_petstore_auth.rb +36 -0
- data/lib/swagger_petstore_open_api30/models/oauth_token.rb +125 -0
- data/lib/swagger_petstore_open_api30/models/order.rb +167 -0
- data/lib/swagger_petstore_open_api30/models/order_status.rb +40 -0
- data/lib/swagger_petstore_open_api30/models/pet.rb +168 -0
- data/lib/swagger_petstore_open_api30/models/pet_status.rb +40 -0
- data/lib/{webhooks_and_callbacks_api/models/delivery_details.rb → swagger_petstore_open_api30/models/tag.rb} +36 -35
- data/lib/swagger_petstore_open_api30/models/user.rb +182 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/utilities/date_time_helper.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/utilities/file_wrapper.rb +2 -2
- data/lib/swagger_petstore_open_api30/utilities/xml_utilities.rb +12 -0
- data/lib/swagger_petstore_open_api30.rb +62 -0
- metadata +37 -78
- data/lib/webhooks_and_callbacks_api/apis/orders_api.rb +0 -34
- data/lib/webhooks_and_callbacks_api/events/callbacks/callbacks_a_handler.rb +0 -66
- data/lib/webhooks_and_callbacks_api/events/callbacks/callbacks_b_handler.rb +0 -78
- data/lib/webhooks_and_callbacks_api/events/signature_verification_failure.rb +0 -33
- data/lib/webhooks_and_callbacks_api/events/signature_verification_result.rb +0 -14
- data/lib/webhooks_and_callbacks_api/events/unknown_event.rb +0 -32
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_a_handler.rb +0 -67
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_b_handler.rb +0 -86
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_c_handler.rb +0 -79
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_handler.rb +0 -67
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_no_verification_handler.rb +0 -39
- data/lib/webhooks_and_callbacks_api/exceptions/error_exception.rb +0 -57
- data/lib/webhooks_and_callbacks_api/http/auth/bearer_auth.rb +0 -53
- data/lib/webhooks_and_callbacks_api/models/address.rb +0 -114
- data/lib/webhooks_and_callbacks_api/models/audit_log_event.rb +0 -115
- data/lib/webhooks_and_callbacks_api/models/create_order_request.rb +0 -131
- data/lib/webhooks_and_callbacks_api/models/email_notification_callback.rb +0 -97
- data/lib/webhooks_and_callbacks_api/models/event.rb +0 -52
- data/lib/webhooks_and_callbacks_api/models/event_type.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/event_type1.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/event_type2.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/event_type3.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/fulfillment_callback.rb +0 -411
- data/lib/webhooks_and_callbacks_api/models/fulfillment_status.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/fulfillment_statuss.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/inventory_stock_decrease_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/inventory_stock_depleted_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/inventory_stock_increase_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/notification_callback.rb +0 -119
- data/lib/webhooks_and_callbacks_api/models/oauth_scope_oauth_acg.rb +0 -44
- data/lib/webhooks_and_callbacks_api/models/order.rb +0 -161
- data/lib/webhooks_and_callbacks_api/models/order_created_event.rb +0 -314
- data/lib/webhooks_and_callbacks_api/models/order_item.rb +0 -102
- data/lib/webhooks_and_callbacks_api/models/order_updated_event.rb +0 -100
- data/lib/webhooks_and_callbacks_api/models/payment_callback.rb +0 -167
- data/lib/webhooks_and_callbacks_api/models/payment_completed_event.rb +0 -98
- data/lib/webhooks_and_callbacks_api/models/payment_status.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/payment_status_created_event.rb +0 -89
- data/lib/webhooks_and_callbacks_api/models/payment_status_updated_event.rb +0 -89
- data/lib/webhooks_and_callbacks_api/models/primitive_collection_event.rb +0 -98
- data/lib/webhooks_and_callbacks_api/models/root_level_primitive_one_of_event_request.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/root_level_primitive_one_of_event_request1.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/sms_notification_callback.rb +0 -95
- data/lib/webhooks_and_callbacks_api/models/status.rb +0 -44
- data/lib/webhooks_and_callbacks_api/models/status1.rb +0 -36
- data/lib/webhooks_and_callbacks_api/models/status2.rb +0 -36
- data/lib/webhooks_and_callbacks_api/models/system_alert_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/system_maintenance_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/system_performance_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/user_action_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/user_preference_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/user_status_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/webhook.rb +0 -142
- data/lib/webhooks_and_callbacks_api/models/webhook_registration.rb +0 -103
- data/lib/webhooks_and_callbacks_api/models/webhook_update.rb +0 -105
- data/lib/webhooks_and_callbacks_api/utilities/union_type_lookup.rb +0 -172
- data/lib/webhooks_and_callbacks_api.rb +0 -122
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
# webhooks_and_callbacks_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
require 'date'
|
|
7
|
-
module WebhooksAndCallbacksApi
|
|
8
|
-
# FulfillmentCallback Model.
|
|
9
|
-
class FulfillmentCallback < BaseModel
|
|
10
|
-
SKIP = Object.new
|
|
11
|
-
private_constant :SKIP
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for this method
|
|
14
|
-
# @return [String]
|
|
15
|
-
attr_accessor :order_id
|
|
16
|
-
|
|
17
|
-
# TODO: Write general description for this method
|
|
18
|
-
# @return [FulfillmentStatus]
|
|
19
|
-
attr_accessor :fulfillment_status
|
|
20
|
-
|
|
21
|
-
# TODO: Write general description for this method
|
|
22
|
-
# @return [String]
|
|
23
|
-
attr_accessor :tracking_number
|
|
24
|
-
|
|
25
|
-
# TODO: Write general description for this method
|
|
26
|
-
# @return [String]
|
|
27
|
-
attr_accessor :carrier
|
|
28
|
-
|
|
29
|
-
# List of scopes that apply to the OAuth token
|
|
30
|
-
# @return [Array[OauthScopeOauthACG]]
|
|
31
|
-
attr_accessor :scopes
|
|
32
|
-
|
|
33
|
-
# List of scopes that apply to the OAuth token
|
|
34
|
-
# @return [Date]
|
|
35
|
-
attr_accessor :estimated_delivery
|
|
36
|
-
|
|
37
|
-
# List of scopes that apply to the OAuth token
|
|
38
|
-
# @return [DateTime]
|
|
39
|
-
attr_accessor :timestamp
|
|
40
|
-
|
|
41
|
-
# Binary file upload
|
|
42
|
-
# @return [Binary]
|
|
43
|
-
attr_accessor :document
|
|
44
|
-
|
|
45
|
-
# Binary file upload
|
|
46
|
-
# @return [Float]
|
|
47
|
-
attr_accessor :total_weight
|
|
48
|
-
|
|
49
|
-
# Binary file upload
|
|
50
|
-
# @return [Float]
|
|
51
|
-
attr_accessor :price
|
|
52
|
-
|
|
53
|
-
# Binary file upload
|
|
54
|
-
# @return [Integer]
|
|
55
|
-
attr_accessor :quantity
|
|
56
|
-
|
|
57
|
-
# Binary file upload
|
|
58
|
-
# @return [Integer]
|
|
59
|
-
attr_accessor :long_id
|
|
60
|
-
|
|
61
|
-
# Binary file upload
|
|
62
|
-
# @return [TrueClass | FalseClass]
|
|
63
|
-
attr_accessor :fragile
|
|
64
|
-
|
|
65
|
-
# Explicitly nullable field
|
|
66
|
-
# @return [String]
|
|
67
|
-
attr_accessor :notes
|
|
68
|
-
|
|
69
|
-
# Explicitly nullable field
|
|
70
|
-
# @return [Array[String]]
|
|
71
|
-
attr_accessor :items
|
|
72
|
-
|
|
73
|
-
# Explicitly nullable field
|
|
74
|
-
# @return [Array[Package]]
|
|
75
|
-
attr_accessor :packages
|
|
76
|
-
|
|
77
|
-
# Explicitly nullable field
|
|
78
|
-
# @return [Address]
|
|
79
|
-
attr_accessor :address
|
|
80
|
-
|
|
81
|
-
# Explicitly nullable field
|
|
82
|
-
# @return [Object]
|
|
83
|
-
attr_accessor :metadata
|
|
84
|
-
|
|
85
|
-
# Explicitly nullable field
|
|
86
|
-
# @return [Hash[String, String]]
|
|
87
|
-
attr_accessor :attributes
|
|
88
|
-
|
|
89
|
-
# Explicitly nullable field
|
|
90
|
-
# @return [Object]
|
|
91
|
-
attr_accessor :delivery_details
|
|
92
|
-
|
|
93
|
-
# Explicitly nullable field
|
|
94
|
-
# @return [String]
|
|
95
|
-
attr_accessor :order_idd
|
|
96
|
-
|
|
97
|
-
# Explicitly nullable field
|
|
98
|
-
# @return [FulfillmentStatuss]
|
|
99
|
-
attr_accessor :fulfillment_statuss
|
|
100
|
-
|
|
101
|
-
# Explicitly nullable field
|
|
102
|
-
# @return [String]
|
|
103
|
-
attr_accessor :tracking_numberr
|
|
104
|
-
|
|
105
|
-
# Explicitly nullable field
|
|
106
|
-
# @return [String]
|
|
107
|
-
attr_accessor :carrierr
|
|
108
|
-
|
|
109
|
-
# List of scopes that apply to the OAuth token
|
|
110
|
-
# @return [Array[OauthScopeOauthACG]]
|
|
111
|
-
attr_accessor :scopess
|
|
112
|
-
|
|
113
|
-
# List of scopes that apply to the OAuth token
|
|
114
|
-
# @return [Date]
|
|
115
|
-
attr_accessor :estimated_deliveryy
|
|
116
|
-
|
|
117
|
-
# List of scopes that apply to the OAuth token
|
|
118
|
-
# @return [DateTime]
|
|
119
|
-
attr_accessor :timestampp
|
|
120
|
-
|
|
121
|
-
# Binary file upload
|
|
122
|
-
# @return [Binary]
|
|
123
|
-
attr_accessor :documentt
|
|
124
|
-
|
|
125
|
-
# A mapping from model property names to API property names.
|
|
126
|
-
def self.names
|
|
127
|
-
@_hash = {} if @_hash.nil?
|
|
128
|
-
@_hash['order_id'] = 'orderId'
|
|
129
|
-
@_hash['fulfillment_status'] = 'fulfillmentStatus'
|
|
130
|
-
@_hash['tracking_number'] = 'trackingNumber'
|
|
131
|
-
@_hash['carrier'] = 'carrier'
|
|
132
|
-
@_hash['scopes'] = 'scopes'
|
|
133
|
-
@_hash['estimated_delivery'] = 'estimatedDelivery'
|
|
134
|
-
@_hash['timestamp'] = 'timestamp'
|
|
135
|
-
@_hash['document'] = 'document'
|
|
136
|
-
@_hash['total_weight'] = 'totalWeight'
|
|
137
|
-
@_hash['price'] = 'price'
|
|
138
|
-
@_hash['quantity'] = 'quantity'
|
|
139
|
-
@_hash['long_id'] = 'longId'
|
|
140
|
-
@_hash['fragile'] = 'fragile'
|
|
141
|
-
@_hash['notes'] = 'notes'
|
|
142
|
-
@_hash['items'] = 'items'
|
|
143
|
-
@_hash['packages'] = 'packages'
|
|
144
|
-
@_hash['address'] = 'address'
|
|
145
|
-
@_hash['metadata'] = 'metadata'
|
|
146
|
-
@_hash['attributes'] = 'attributes'
|
|
147
|
-
@_hash['delivery_details'] = 'deliveryDetails'
|
|
148
|
-
@_hash['order_idd'] = 'orderIdd'
|
|
149
|
-
@_hash['fulfillment_statuss'] = 'fulfillmentStatuss'
|
|
150
|
-
@_hash['tracking_numberr'] = 'trackingNumberr'
|
|
151
|
-
@_hash['carrierr'] = 'carrierr'
|
|
152
|
-
@_hash['scopess'] = 'scopess'
|
|
153
|
-
@_hash['estimated_deliveryy'] = 'estimatedDeliveryy'
|
|
154
|
-
@_hash['timestampp'] = 'timestampp'
|
|
155
|
-
@_hash['documentt'] = 'documentt'
|
|
156
|
-
@_hash
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
# An array for optional fields
|
|
160
|
-
def self.optionals
|
|
161
|
-
%w[
|
|
162
|
-
tracking_number
|
|
163
|
-
carrier
|
|
164
|
-
scopes
|
|
165
|
-
estimated_delivery
|
|
166
|
-
timestamp
|
|
167
|
-
document
|
|
168
|
-
total_weight
|
|
169
|
-
price
|
|
170
|
-
quantity
|
|
171
|
-
long_id
|
|
172
|
-
fragile
|
|
173
|
-
notes
|
|
174
|
-
items
|
|
175
|
-
packages
|
|
176
|
-
address
|
|
177
|
-
metadata
|
|
178
|
-
attributes
|
|
179
|
-
delivery_details
|
|
180
|
-
order_idd
|
|
181
|
-
fulfillment_statuss
|
|
182
|
-
tracking_numberr
|
|
183
|
-
carrierr
|
|
184
|
-
scopess
|
|
185
|
-
estimated_deliveryy
|
|
186
|
-
timestampp
|
|
187
|
-
documentt
|
|
188
|
-
]
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
# An array for nullable fields
|
|
192
|
-
def self.nullables
|
|
193
|
-
%w[
|
|
194
|
-
order_id
|
|
195
|
-
tracking_number
|
|
196
|
-
scopes
|
|
197
|
-
notes
|
|
198
|
-
order_idd
|
|
199
|
-
tracking_numberr
|
|
200
|
-
scopess
|
|
201
|
-
]
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
def initialize(order_id:, fulfillment_status:, tracking_number: SKIP,
|
|
205
|
-
carrier: SKIP, scopes: SKIP, estimated_delivery: SKIP,
|
|
206
|
-
timestamp: SKIP, document: SKIP, total_weight: SKIP,
|
|
207
|
-
price: SKIP, quantity: SKIP, long_id: SKIP, fragile: SKIP,
|
|
208
|
-
notes: SKIP, items: SKIP, packages: SKIP, address: SKIP,
|
|
209
|
-
metadata: SKIP, attributes: SKIP, delivery_details: SKIP,
|
|
210
|
-
order_idd: SKIP, fulfillment_statuss: SKIP,
|
|
211
|
-
tracking_numberr: SKIP, carrierr: SKIP, scopess: SKIP,
|
|
212
|
-
estimated_deliveryy: SKIP, timestampp: SKIP, documentt: SKIP,
|
|
213
|
-
additional_properties: nil)
|
|
214
|
-
# Add additional model properties to the instance
|
|
215
|
-
additional_properties = {} if additional_properties.nil?
|
|
216
|
-
|
|
217
|
-
@order_id = order_id
|
|
218
|
-
@fulfillment_status = fulfillment_status
|
|
219
|
-
@tracking_number = tracking_number unless tracking_number == SKIP
|
|
220
|
-
@carrier = carrier unless carrier == SKIP
|
|
221
|
-
@scopes = scopes unless scopes == SKIP
|
|
222
|
-
@estimated_delivery = estimated_delivery unless estimated_delivery == SKIP
|
|
223
|
-
@timestamp = timestamp unless timestamp == SKIP
|
|
224
|
-
@document = document unless document == SKIP
|
|
225
|
-
@total_weight = total_weight unless total_weight == SKIP
|
|
226
|
-
@price = price unless price == SKIP
|
|
227
|
-
@quantity = quantity unless quantity == SKIP
|
|
228
|
-
@long_id = long_id unless long_id == SKIP
|
|
229
|
-
@fragile = fragile unless fragile == SKIP
|
|
230
|
-
@notes = notes unless notes == SKIP
|
|
231
|
-
@items = items unless items == SKIP
|
|
232
|
-
@packages = packages unless packages == SKIP
|
|
233
|
-
@address = address unless address == SKIP
|
|
234
|
-
@metadata = metadata unless metadata == SKIP
|
|
235
|
-
@attributes = attributes unless attributes == SKIP
|
|
236
|
-
@delivery_details = delivery_details unless delivery_details == SKIP
|
|
237
|
-
@order_idd = order_idd unless order_idd == SKIP
|
|
238
|
-
@fulfillment_statuss = fulfillment_statuss unless fulfillment_statuss == SKIP
|
|
239
|
-
@tracking_numberr = tracking_numberr unless tracking_numberr == SKIP
|
|
240
|
-
@carrierr = carrierr unless carrierr == SKIP
|
|
241
|
-
@scopess = scopess unless scopess == SKIP
|
|
242
|
-
@estimated_deliveryy = estimated_deliveryy unless estimated_deliveryy == SKIP
|
|
243
|
-
@timestampp = timestampp unless timestampp == SKIP
|
|
244
|
-
@documentt = documentt unless documentt == SKIP
|
|
245
|
-
@additional_properties = additional_properties
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
# Creates an instance of the object from a hash.
|
|
249
|
-
def self.from_hash(hash)
|
|
250
|
-
return nil unless hash
|
|
251
|
-
|
|
252
|
-
# Extract variables from the hash.
|
|
253
|
-
order_id = hash.key?('orderId') ? hash['orderId'] : nil
|
|
254
|
-
fulfillment_status =
|
|
255
|
-
hash.key?('fulfillmentStatus') ? hash['fulfillmentStatus'] : nil
|
|
256
|
-
tracking_number =
|
|
257
|
-
hash.key?('trackingNumber') ? hash['trackingNumber'] : SKIP
|
|
258
|
-
carrier = hash.key?('carrier') ? hash['carrier'] : SKIP
|
|
259
|
-
scopes = hash.key?('scopes') ? hash['scopes'] : SKIP
|
|
260
|
-
estimated_delivery =
|
|
261
|
-
hash.key?('estimatedDelivery') ? hash['estimatedDelivery'] : SKIP
|
|
262
|
-
timestamp = if hash.key?('timestamp')
|
|
263
|
-
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
264
|
-
else
|
|
265
|
-
SKIP
|
|
266
|
-
end
|
|
267
|
-
document = hash.key?('document') ? hash['document'] : SKIP
|
|
268
|
-
total_weight = hash.key?('totalWeight') ? hash['totalWeight'] : SKIP
|
|
269
|
-
price = hash.key?('price') ? hash['price'] : SKIP
|
|
270
|
-
quantity = hash.key?('quantity') ? hash['quantity'] : SKIP
|
|
271
|
-
long_id = hash.key?('longId') ? hash['longId'] : SKIP
|
|
272
|
-
fragile = hash.key?('fragile') ? hash['fragile'] : SKIP
|
|
273
|
-
notes = hash.key?('notes') ? hash['notes'] : SKIP
|
|
274
|
-
items = hash.key?('items') ? hash['items'] : SKIP
|
|
275
|
-
# Parameter is an array, so we need to iterate through it
|
|
276
|
-
packages = nil
|
|
277
|
-
unless hash['packages'].nil?
|
|
278
|
-
packages = []
|
|
279
|
-
hash['packages'].each do |structure|
|
|
280
|
-
packages << (Package.from_hash(structure) if structure)
|
|
281
|
-
end
|
|
282
|
-
end
|
|
283
|
-
|
|
284
|
-
packages = SKIP unless hash.key?('packages')
|
|
285
|
-
address = Address.from_hash(hash['address']) if hash['address']
|
|
286
|
-
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
287
|
-
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
288
|
-
delivery_details = hash.key?('deliveryDetails') ? APIHelper.deserialize_union_type(
|
|
289
|
-
UnionTypeLookUp.get(:FulfillmentCallbackDeliveryDetails), hash['deliveryDetails']
|
|
290
|
-
) : SKIP
|
|
291
|
-
order_idd = hash.key?('orderIdd') ? hash['orderIdd'] : SKIP
|
|
292
|
-
fulfillment_statuss =
|
|
293
|
-
hash.key?('fulfillmentStatuss') ? hash['fulfillmentStatuss'] : SKIP
|
|
294
|
-
tracking_numberr =
|
|
295
|
-
hash.key?('trackingNumberr') ? hash['trackingNumberr'] : SKIP
|
|
296
|
-
carrierr = hash.key?('carrierr') ? hash['carrierr'] : SKIP
|
|
297
|
-
scopess = hash.key?('scopess') ? hash['scopess'] : SKIP
|
|
298
|
-
estimated_deliveryy =
|
|
299
|
-
hash.key?('estimatedDeliveryy') ? hash['estimatedDeliveryy'] : SKIP
|
|
300
|
-
timestampp = if hash.key?('timestampp')
|
|
301
|
-
(DateTimeHelper.from_rfc3339(hash['timestampp']) if hash['timestampp'])
|
|
302
|
-
else
|
|
303
|
-
SKIP
|
|
304
|
-
end
|
|
305
|
-
documentt = hash.key?('documentt') ? hash['documentt'] : SKIP
|
|
306
|
-
|
|
307
|
-
# Create a new hash for additional properties, removing known properties.
|
|
308
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
309
|
-
|
|
310
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
311
|
-
new_hash, proc { |value| value }
|
|
312
|
-
)
|
|
313
|
-
|
|
314
|
-
# Create object from extracted values.
|
|
315
|
-
FulfillmentCallback.new(order_id: order_id,
|
|
316
|
-
fulfillment_status: fulfillment_status,
|
|
317
|
-
tracking_number: tracking_number,
|
|
318
|
-
carrier: carrier,
|
|
319
|
-
scopes: scopes,
|
|
320
|
-
estimated_delivery: estimated_delivery,
|
|
321
|
-
timestamp: timestamp,
|
|
322
|
-
document: document,
|
|
323
|
-
total_weight: total_weight,
|
|
324
|
-
price: price,
|
|
325
|
-
quantity: quantity,
|
|
326
|
-
long_id: long_id,
|
|
327
|
-
fragile: fragile,
|
|
328
|
-
notes: notes,
|
|
329
|
-
items: items,
|
|
330
|
-
packages: packages,
|
|
331
|
-
address: address,
|
|
332
|
-
metadata: metadata,
|
|
333
|
-
attributes: attributes,
|
|
334
|
-
delivery_details: delivery_details,
|
|
335
|
-
order_idd: order_idd,
|
|
336
|
-
fulfillment_statuss: fulfillment_statuss,
|
|
337
|
-
tracking_numberr: tracking_numberr,
|
|
338
|
-
carrierr: carrierr,
|
|
339
|
-
scopess: scopess,
|
|
340
|
-
estimated_deliveryy: estimated_deliveryy,
|
|
341
|
-
timestampp: timestampp,
|
|
342
|
-
documentt: documentt,
|
|
343
|
-
additional_properties: additional_properties)
|
|
344
|
-
end
|
|
345
|
-
|
|
346
|
-
def to_custom_timestamp
|
|
347
|
-
DateTimeHelper.to_rfc3339(timestamp)
|
|
348
|
-
end
|
|
349
|
-
|
|
350
|
-
def to_custom_timestampp
|
|
351
|
-
DateTimeHelper.to_rfc3339(timestampp)
|
|
352
|
-
end
|
|
353
|
-
|
|
354
|
-
# Validates an instance of the object from a given value.
|
|
355
|
-
# @param [FulfillmentCallback | Hash] The value against the validation is performed.
|
|
356
|
-
def self.validate(value)
|
|
357
|
-
if value.instance_of? self
|
|
358
|
-
return (
|
|
359
|
-
APIHelper.valid_type?(value.order_id,
|
|
360
|
-
->(val) { val.instance_of? String }) and
|
|
361
|
-
APIHelper.valid_type?(value.fulfillment_status,
|
|
362
|
-
->(val) { FulfillmentStatus.validate(val) })
|
|
363
|
-
)
|
|
364
|
-
end
|
|
365
|
-
|
|
366
|
-
return false unless value.instance_of? Hash
|
|
367
|
-
|
|
368
|
-
(
|
|
369
|
-
APIHelper.valid_type?(value['orderId'],
|
|
370
|
-
->(val) { val.instance_of? String }) and
|
|
371
|
-
APIHelper.valid_type?(value['fulfillmentStatus'],
|
|
372
|
-
->(val) { FulfillmentStatus.validate(val) })
|
|
373
|
-
)
|
|
374
|
-
end
|
|
375
|
-
|
|
376
|
-
# Provides a human-readable string representation of the object.
|
|
377
|
-
def to_s
|
|
378
|
-
class_name = self.class.name.split('::').last
|
|
379
|
-
"<#{class_name} order_id: #{@order_id}, fulfillment_status: #{@fulfillment_status},"\
|
|
380
|
-
" tracking_number: #{@tracking_number}, carrier: #{@carrier}, scopes: #{@scopes},"\
|
|
381
|
-
" estimated_delivery: #{@estimated_delivery}, timestamp: #{@timestamp}, document:"\
|
|
382
|
-
" #{@document}, total_weight: #{@total_weight}, price: #{@price}, quantity: #{@quantity},"\
|
|
383
|
-
" long_id: #{@long_id}, fragile: #{@fragile}, notes: #{@notes}, items: #{@items}, packages:"\
|
|
384
|
-
" #{@packages}, address: #{@address}, metadata: #{@metadata}, attributes: #{@attributes},"\
|
|
385
|
-
" delivery_details: #{@delivery_details}, order_idd: #{@order_idd}, fulfillment_statuss:"\
|
|
386
|
-
" #{@fulfillment_statuss}, tracking_numberr: #{@tracking_numberr}, carrierr: #{@carrierr},"\
|
|
387
|
-
" scopess: #{@scopess}, estimated_deliveryy: #{@estimated_deliveryy}, timestampp:"\
|
|
388
|
-
" #{@timestampp}, documentt: #{@documentt}, additional_properties:"\
|
|
389
|
-
" #{@additional_properties}>"
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
393
|
-
def inspect
|
|
394
|
-
class_name = self.class.name.split('::').last
|
|
395
|
-
"<#{class_name} order_id: #{@order_id.inspect}, fulfillment_status:"\
|
|
396
|
-
" #{@fulfillment_status.inspect}, tracking_number: #{@tracking_number.inspect}, carrier:"\
|
|
397
|
-
" #{@carrier.inspect}, scopes: #{@scopes.inspect}, estimated_delivery:"\
|
|
398
|
-
" #{@estimated_delivery.inspect}, timestamp: #{@timestamp.inspect}, document:"\
|
|
399
|
-
" #{@document.inspect}, total_weight: #{@total_weight.inspect}, price: #{@price.inspect},"\
|
|
400
|
-
" quantity: #{@quantity.inspect}, long_id: #{@long_id.inspect}, fragile:"\
|
|
401
|
-
" #{@fragile.inspect}, notes: #{@notes.inspect}, items: #{@items.inspect}, packages:"\
|
|
402
|
-
" #{@packages.inspect}, address: #{@address.inspect}, metadata: #{@metadata.inspect},"\
|
|
403
|
-
" attributes: #{@attributes.inspect}, delivery_details: #{@delivery_details.inspect},"\
|
|
404
|
-
" order_idd: #{@order_idd.inspect}, fulfillment_statuss: #{@fulfillment_statuss.inspect},"\
|
|
405
|
-
" tracking_numberr: #{@tracking_numberr.inspect}, carrierr: #{@carrierr.inspect}, scopess:"\
|
|
406
|
-
" #{@scopess.inspect}, estimated_deliveryy: #{@estimated_deliveryy.inspect}, timestampp:"\
|
|
407
|
-
" #{@timestampp.inspect}, documentt: #{@documentt.inspect}, additional_properties:"\
|
|
408
|
-
" #{@additional_properties}>"
|
|
409
|
-
end
|
|
410
|
-
end
|
|
411
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# webhooks_and_callbacks_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module WebhooksAndCallbacksApi
|
|
7
|
-
# FulfillmentStatus.
|
|
8
|
-
class FulfillmentStatus
|
|
9
|
-
FULFILLMENT_STATUS = [
|
|
10
|
-
# TODO: Write general description for FULFILLED
|
|
11
|
-
FULFILLED = 'fulfilled'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for FAILED
|
|
14
|
-
FAILED = 'failed'.freeze,
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for PARTIAL
|
|
17
|
-
PARTIAL = 'partial'.freeze
|
|
18
|
-
].freeze
|
|
19
|
-
|
|
20
|
-
def self.validate(value)
|
|
21
|
-
return false if value.nil?
|
|
22
|
-
|
|
23
|
-
FULFILLMENT_STATUS.include?(value)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.from_value(value, default_value = FULFILLED)
|
|
27
|
-
return default_value if value.nil?
|
|
28
|
-
|
|
29
|
-
str = value.to_s.strip
|
|
30
|
-
|
|
31
|
-
case str.downcase
|
|
32
|
-
when 'fulfilled' then FULFILLED
|
|
33
|
-
when 'failed' then FAILED
|
|
34
|
-
when 'partial' then PARTIAL
|
|
35
|
-
else
|
|
36
|
-
default_value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# webhooks_and_callbacks_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module WebhooksAndCallbacksApi
|
|
7
|
-
# FulfillmentStatuss.
|
|
8
|
-
class FulfillmentStatuss
|
|
9
|
-
FULFILLMENT_STATUSS = [
|
|
10
|
-
# TODO: Write general description for FULFILLED
|
|
11
|
-
FULFILLED = 'fulfilled'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for FAILED
|
|
14
|
-
FAILED = 'failed'.freeze,
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for PARTIAL
|
|
17
|
-
PARTIAL = 'partial'.freeze
|
|
18
|
-
].freeze
|
|
19
|
-
|
|
20
|
-
def self.validate(value)
|
|
21
|
-
return false if value.nil?
|
|
22
|
-
|
|
23
|
-
FULFILLMENT_STATUSS.include?(value)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.from_value(value, default_value = FULFILLED)
|
|
27
|
-
return default_value if value.nil?
|
|
28
|
-
|
|
29
|
-
str = value.to_s.strip
|
|
30
|
-
|
|
31
|
-
case str.downcase
|
|
32
|
-
when 'fulfilled' then FULFILLED
|
|
33
|
-
when 'failed' then FAILED
|
|
34
|
-
when 'partial' then PARTIAL
|
|
35
|
-
else
|
|
36
|
-
default_value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# webhooks_and_callbacks_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module WebhooksAndCallbacksApi
|
|
7
|
-
# InventoryStockDecreaseEvent Model.
|
|
8
|
-
class InventoryStockDecreaseEvent < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# TODO: Write general description for this method
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_reader :inventory_stock_decrease_event_type
|
|
15
|
-
|
|
16
|
-
# A mapping from model property names to API property names.
|
|
17
|
-
def self.names
|
|
18
|
-
@_hash = {} if @_hash.nil?
|
|
19
|
-
@_hash['inventory_stock_decrease_event_type'] =
|
|
20
|
-
'inventoryStockDecreaseEventType'
|
|
21
|
-
@_hash
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# An array for optional fields
|
|
25
|
-
def self.optionals
|
|
26
|
-
[]
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# An array for nullable fields
|
|
30
|
-
def self.nullables
|
|
31
|
-
[]
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def initialize(additional_properties: nil)
|
|
35
|
-
# Add additional model properties to the instance
|
|
36
|
-
additional_properties = {} if additional_properties.nil?
|
|
37
|
-
|
|
38
|
-
@inventory_stock_decrease_event_type = 'stock.decrease'
|
|
39
|
-
@additional_properties = additional_properties
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Creates an instance of the object from a hash.
|
|
43
|
-
def self.from_hash(hash)
|
|
44
|
-
return nil unless hash
|
|
45
|
-
|
|
46
|
-
# Extract variables from the hash.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Create a new hash for additional properties, removing known properties.
|
|
50
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
51
|
-
|
|
52
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
53
|
-
new_hash, proc { |value| value }
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
# Create object from extracted values.
|
|
57
|
-
InventoryStockDecreaseEvent.new(additional_properties: additional_properties)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Validates an instance of the object from a given value.
|
|
61
|
-
# @param [InventoryStockDecreaseEvent | Hash] The value against the validation is performed.
|
|
62
|
-
def self.validate(value)
|
|
63
|
-
if value.instance_of? self
|
|
64
|
-
return APIHelper.valid_type?(value.inventory_stock_decrease_event_type,
|
|
65
|
-
->(val) { val.instance_of? String })
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
return false unless value.instance_of? Hash
|
|
69
|
-
|
|
70
|
-
APIHelper.valid_type?(value['inventoryStockDecreaseEventType'],
|
|
71
|
-
->(val) { val.instance_of? String })
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# Provides a human-readable string representation of the object.
|
|
75
|
-
def to_s
|
|
76
|
-
class_name = self.class.name.split('::').last
|
|
77
|
-
"<#{class_name} inventory_stock_decrease_event_type:"\
|
|
78
|
-
" #{@inventory_stock_decrease_event_type}, additional_properties:"\
|
|
79
|
-
" #{@additional_properties}>"
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
83
|
-
def inspect
|
|
84
|
-
class_name = self.class.name.split('::').last
|
|
85
|
-
"<#{class_name} inventory_stock_decrease_event_type:"\
|
|
86
|
-
" #{@inventory_stock_decrease_event_type.inspect}, additional_properties:"\
|
|
87
|
-
" #{@additional_properties}>"
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# webhooks_and_callbacks_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module WebhooksAndCallbacksApi
|
|
7
|
-
# InventoryStockDepletedEvent Model.
|
|
8
|
-
class InventoryStockDepletedEvent < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# TODO: Write general description for this method
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_reader :inventory_stock_depleted_event_type
|
|
15
|
-
|
|
16
|
-
# A mapping from model property names to API property names.
|
|
17
|
-
def self.names
|
|
18
|
-
@_hash = {} if @_hash.nil?
|
|
19
|
-
@_hash['inventory_stock_depleted_event_type'] =
|
|
20
|
-
'inventoryStockDepletedEventType'
|
|
21
|
-
@_hash
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# An array for optional fields
|
|
25
|
-
def self.optionals
|
|
26
|
-
[]
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# An array for nullable fields
|
|
30
|
-
def self.nullables
|
|
31
|
-
[]
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def initialize(additional_properties: nil)
|
|
35
|
-
# Add additional model properties to the instance
|
|
36
|
-
additional_properties = {} if additional_properties.nil?
|
|
37
|
-
|
|
38
|
-
@inventory_stock_depleted_event_type = 'stock.depleted'
|
|
39
|
-
@additional_properties = additional_properties
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Creates an instance of the object from a hash.
|
|
43
|
-
def self.from_hash(hash)
|
|
44
|
-
return nil unless hash
|
|
45
|
-
|
|
46
|
-
# Extract variables from the hash.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Create a new hash for additional properties, removing known properties.
|
|
50
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
51
|
-
|
|
52
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
53
|
-
new_hash, proc { |value| value }
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
# Create object from extracted values.
|
|
57
|
-
InventoryStockDepletedEvent.new(additional_properties: additional_properties)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Validates an instance of the object from a given value.
|
|
61
|
-
# @param [InventoryStockDepletedEvent | Hash] The value against the validation is performed.
|
|
62
|
-
def self.validate(value)
|
|
63
|
-
if value.instance_of? self
|
|
64
|
-
return APIHelper.valid_type?(value.inventory_stock_depleted_event_type,
|
|
65
|
-
->(val) { val.instance_of? String })
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
return false unless value.instance_of? Hash
|
|
69
|
-
|
|
70
|
-
APIHelper.valid_type?(value['inventoryStockDepletedEventType'],
|
|
71
|
-
->(val) { val.instance_of? String })
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# Provides a human-readable string representation of the object.
|
|
75
|
-
def to_s
|
|
76
|
-
class_name = self.class.name.split('::').last
|
|
77
|
-
"<#{class_name} inventory_stock_depleted_event_type:"\
|
|
78
|
-
" #{@inventory_stock_depleted_event_type}, additional_properties:"\
|
|
79
|
-
" #{@additional_properties}>"
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
83
|
-
def inspect
|
|
84
|
-
class_name = self.class.name.split('::').last
|
|
85
|
-
"<#{class_name} inventory_stock_depleted_event_type:"\
|
|
86
|
-
" #{@inventory_stock_depleted_event_type.inspect}, additional_properties:"\
|
|
87
|
-
" #{@additional_properties}>"
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|