plainrouter-sdk 0.1.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 +7 -0
- data/LICENSE +202 -0
- data/README.md +59 -0
- data/lib/plainrouter/client.rb +44 -0
- data/lib/plainrouter/openapi/api/event_api.rb +213 -0
- data/lib/plainrouter/openapi/api/operations_api.rb +542 -0
- data/lib/plainrouter/openapi/api/sandbox_api.rb +272 -0
- data/lib/plainrouter/openapi/api_client.rb +441 -0
- data/lib/plainrouter/openapi/api_error.rb +58 -0
- data/lib/plainrouter/openapi/api_model_base.rb +88 -0
- data/lib/plainrouter/openapi/configuration.rb +399 -0
- data/lib/plainrouter/openapi/models/create_event200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/create_event_request.rb +103 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +344 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +346 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +104 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +186 -0
- data/lib/plainrouter/openapi/models/create_sandbox_key201_response.rb +320 -0
- data/lib/plainrouter/openapi/models/create_sandbox_key201_response_use.rb +216 -0
- data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +268 -0
- data/lib/plainrouter/openapi/models/delete_user_data_request.rb +225 -0
- data/lib/plainrouter/openapi/models/delivery_status.rb +49 -0
- data/lib/plainrouter/openapi/models/destination.rb +354 -0
- data/lib/plainrouter/openapi/models/destination_credential_source.rb +40 -0
- data/lib/plainrouter/openapi/models/destination_status.rb +40 -0
- data/lib/plainrouter/openapi/models/destination_type.rb +39 -0
- data/lib/plainrouter/openapi/models/emq_snapshot.rb +344 -0
- data/lib/plainrouter/openapi/models/error_message.rb +164 -0
- data/lib/plainrouter/openapi/models/event.rb +782 -0
- data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +166 -0
- data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +342 -0
- data/lib/plainrouter/openapi/models/get_event200_response.rb +218 -0
- data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +440 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event.rb +624 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +103 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +414 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +178 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +596 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +596 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +192 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +476 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +216 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +190 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +103 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +372 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +216 -0
- data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +40 -0
- data/lib/plainrouter/openapi/models/list_events200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events.rb +382 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +202 -0
- data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +228 -0
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +252 -0
- data/lib/plainrouter/openapi/models/reconciliation_report.rb +464 -0
- data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +242 -0
- data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +199 -0
- data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +224 -0
- data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +224 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +338 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +189 -0
- data/lib/plainrouter/openapi/models/traffic_class.rb +40 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +320 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +194 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +166 -0
- data/lib/plainrouter/openapi/models/validation_error.rb +192 -0
- data/lib/plainrouter/openapi/version.rb +15 -0
- data/lib/plainrouter/openapi.rb +102 -0
- data/lib/plainrouter/version.rb +6 -0
- data/lib/plainrouter.rb +10 -0
- metadata +176 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PlainRouter Conversion API
|
|
3
|
+
|
|
4
|
+
#PlainRouter public Signals Conversion API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PlainRouter::OpenAPI
|
|
17
|
+
class ValidateSandboxEvent200Response < ApiModelBase
|
|
18
|
+
attr_accessor :sandbox
|
|
19
|
+
|
|
20
|
+
attr_accessor :accepted
|
|
21
|
+
|
|
22
|
+
attr_accessor :event_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :status
|
|
25
|
+
|
|
26
|
+
attr_accessor :persisted
|
|
27
|
+
|
|
28
|
+
attr_accessor :provider_delivery
|
|
29
|
+
|
|
30
|
+
attr_accessor :message
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'sandbox' => :'sandbox',
|
|
36
|
+
:'accepted' => :'accepted',
|
|
37
|
+
:'event_id' => :'event_id',
|
|
38
|
+
:'status' => :'status',
|
|
39
|
+
:'persisted' => :'persisted',
|
|
40
|
+
:'provider_delivery' => :'provider_delivery',
|
|
41
|
+
:'message' => :'message'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'sandbox' => :'Boolean',
|
|
59
|
+
:'accepted' => :'Boolean',
|
|
60
|
+
:'event_id' => :'String',
|
|
61
|
+
:'status' => :'String',
|
|
62
|
+
:'persisted' => :'Boolean',
|
|
63
|
+
:'provider_delivery' => :'Boolean',
|
|
64
|
+
:'message' => :'String'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
|
+
def initialize(attributes = {})
|
|
77
|
+
if (!attributes.is_a?(Hash))
|
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ValidateSandboxEvent200Response` initialize method"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ValidateSandboxEvent200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'sandbox')
|
|
91
|
+
self.sandbox = attributes[:'sandbox']
|
|
92
|
+
else
|
|
93
|
+
self.sandbox = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'accepted')
|
|
97
|
+
self.accepted = attributes[:'accepted']
|
|
98
|
+
else
|
|
99
|
+
self.accepted = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'event_id')
|
|
103
|
+
self.event_id = attributes[:'event_id']
|
|
104
|
+
else
|
|
105
|
+
self.event_id = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'status')
|
|
109
|
+
self.status = attributes[:'status']
|
|
110
|
+
else
|
|
111
|
+
self.status = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'persisted')
|
|
115
|
+
self.persisted = attributes[:'persisted']
|
|
116
|
+
else
|
|
117
|
+
self.persisted = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'provider_delivery')
|
|
121
|
+
self.provider_delivery = attributes[:'provider_delivery']
|
|
122
|
+
else
|
|
123
|
+
self.provider_delivery = nil
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'message')
|
|
127
|
+
self.message = attributes[:'message']
|
|
128
|
+
else
|
|
129
|
+
self.message = nil
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
134
|
+
# @return Array for valid properties with the reasons
|
|
135
|
+
def list_invalid_properties
|
|
136
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
137
|
+
invalid_properties = Array.new
|
|
138
|
+
if @sandbox.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "sandbox", sandbox cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @accepted.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "accepted", accepted cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if @event_id.nil?
|
|
147
|
+
invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if @status.nil?
|
|
151
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if @persisted.nil?
|
|
155
|
+
invalid_properties.push('invalid value for "persisted", persisted cannot be nil.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if @provider_delivery.nil?
|
|
159
|
+
invalid_properties.push('invalid value for "provider_delivery", provider_delivery cannot be nil.')
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if @message.nil?
|
|
163
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
invalid_properties
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Check to see if the all the properties in the model are valid
|
|
170
|
+
# @return true if the model is valid
|
|
171
|
+
def valid?
|
|
172
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
173
|
+
return false if @sandbox.nil?
|
|
174
|
+
return false if @accepted.nil?
|
|
175
|
+
return false if @event_id.nil?
|
|
176
|
+
return false if @status.nil?
|
|
177
|
+
return false if @persisted.nil?
|
|
178
|
+
return false if @provider_delivery.nil?
|
|
179
|
+
return false if @message.nil?
|
|
180
|
+
true
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] sandbox Value to be assigned
|
|
185
|
+
def sandbox=(sandbox)
|
|
186
|
+
if sandbox.nil?
|
|
187
|
+
fail ArgumentError, 'sandbox cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@sandbox = sandbox
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method with validation
|
|
194
|
+
# @param [Object] accepted Value to be assigned
|
|
195
|
+
def accepted=(accepted)
|
|
196
|
+
if accepted.nil?
|
|
197
|
+
fail ArgumentError, 'accepted cannot be nil'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
@accepted = accepted
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] event_id Value to be assigned
|
|
205
|
+
def event_id=(event_id)
|
|
206
|
+
if event_id.nil?
|
|
207
|
+
fail ArgumentError, 'event_id cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
@event_id = event_id
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Custom attribute writer method with validation
|
|
214
|
+
# @param [Object] status Value to be assigned
|
|
215
|
+
def status=(status)
|
|
216
|
+
if status.nil?
|
|
217
|
+
fail ArgumentError, 'status cannot be nil'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
@status = status
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Custom attribute writer method with validation
|
|
224
|
+
# @param [Object] persisted Value to be assigned
|
|
225
|
+
def persisted=(persisted)
|
|
226
|
+
if persisted.nil?
|
|
227
|
+
fail ArgumentError, 'persisted cannot be nil'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
@persisted = persisted
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Custom attribute writer method with validation
|
|
234
|
+
# @param [Object] provider_delivery Value to be assigned
|
|
235
|
+
def provider_delivery=(provider_delivery)
|
|
236
|
+
if provider_delivery.nil?
|
|
237
|
+
fail ArgumentError, 'provider_delivery cannot be nil'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
@provider_delivery = provider_delivery
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Custom attribute writer method with validation
|
|
244
|
+
# @param [Object] message Value to be assigned
|
|
245
|
+
def message=(message)
|
|
246
|
+
if message.nil?
|
|
247
|
+
fail ArgumentError, 'message cannot be nil'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
@message = message
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Checks equality by comparing each attribute.
|
|
254
|
+
# @param [Object] Object to be compared
|
|
255
|
+
def ==(o)
|
|
256
|
+
return true if self.equal?(o)
|
|
257
|
+
self.class == o.class &&
|
|
258
|
+
sandbox == o.sandbox &&
|
|
259
|
+
accepted == o.accepted &&
|
|
260
|
+
event_id == o.event_id &&
|
|
261
|
+
status == o.status &&
|
|
262
|
+
persisted == o.persisted &&
|
|
263
|
+
provider_delivery == o.provider_delivery &&
|
|
264
|
+
message == o.message
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# @see the `==` method
|
|
268
|
+
# @param [Object] Object to be compared
|
|
269
|
+
def eql?(o)
|
|
270
|
+
self == o
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Calculates hash code according to all attributes.
|
|
274
|
+
# @return [Integer] Hash code
|
|
275
|
+
def hash
|
|
276
|
+
[sandbox, accepted, event_id, status, persisted, provider_delivery, message].hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Builds the object from hash
|
|
280
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
281
|
+
# @return [Object] Returns the model itself
|
|
282
|
+
def self.build_from_hash(attributes)
|
|
283
|
+
return nil unless attributes.is_a?(Hash)
|
|
284
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
285
|
+
transformed_hash = {}
|
|
286
|
+
openapi_types.each_pair do |key, type|
|
|
287
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
288
|
+
transformed_hash["#{key}"] = nil
|
|
289
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
290
|
+
# check to ensure the input is an array given that the attribute
|
|
291
|
+
# is documented as an array but the input is not
|
|
292
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
293
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
294
|
+
end
|
|
295
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
296
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
new(transformed_hash)
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Returns the object in the form of hash
|
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
|
304
|
+
def to_hash
|
|
305
|
+
hash = {}
|
|
306
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
307
|
+
value = self.send(attr)
|
|
308
|
+
if value.nil?
|
|
309
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
310
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
hash[param] = _to_hash(value)
|
|
314
|
+
end
|
|
315
|
+
hash
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PlainRouter Conversion API
|
|
3
|
+
|
|
4
|
+
#PlainRouter public Signals Conversion API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PlainRouter::OpenAPI
|
|
17
|
+
class ValidateSandboxEventRequest < ApiModelBase
|
|
18
|
+
# Optional synthetic idempotency key; maximum 128 characters.
|
|
19
|
+
attr_accessor :event_id
|
|
20
|
+
|
|
21
|
+
# Synthetic event name; maximum 100 characters.
|
|
22
|
+
attr_accessor :event_name
|
|
23
|
+
|
|
24
|
+
# Synthetic action source.
|
|
25
|
+
attr_accessor :action_source
|
|
26
|
+
|
|
27
|
+
attr_accessor :value_data
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'event_id' => :'event_id',
|
|
33
|
+
:'event_name' => :'event_name',
|
|
34
|
+
:'action_source' => :'action_source',
|
|
35
|
+
:'value_data' => :'value_data'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'event_id' => :'String',
|
|
53
|
+
:'event_name' => :'String',
|
|
54
|
+
:'action_source' => :'String',
|
|
55
|
+
:'value_data' => :'ValidateSandboxEventRequestValueData'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ValidateSandboxEventRequest` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ValidateSandboxEventRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'event_id')
|
|
82
|
+
self.event_id = attributes[:'event_id']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'event_name')
|
|
86
|
+
self.event_name = attributes[:'event_name']
|
|
87
|
+
else
|
|
88
|
+
self.event_name = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'action_source')
|
|
92
|
+
self.action_source = attributes[:'action_source']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'value_data')
|
|
96
|
+
self.value_data = attributes[:'value_data']
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
101
|
+
# @return Array for valid properties with the reasons
|
|
102
|
+
def list_invalid_properties
|
|
103
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
104
|
+
invalid_properties = Array.new
|
|
105
|
+
if @event_name.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
invalid_properties
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Check to see if the all the properties in the model are valid
|
|
113
|
+
# @return true if the model is valid
|
|
114
|
+
def valid?
|
|
115
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
116
|
+
return false if @event_name.nil?
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] event_name Value to be assigned
|
|
122
|
+
def event_name=(event_name)
|
|
123
|
+
if event_name.nil?
|
|
124
|
+
fail ArgumentError, 'event_name cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@event_name = event_name
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
event_id == o.event_id &&
|
|
136
|
+
event_name == o.event_name &&
|
|
137
|
+
action_source == o.action_source &&
|
|
138
|
+
value_data == o.value_data
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @see the `==` method
|
|
142
|
+
# @param [Object] Object to be compared
|
|
143
|
+
def eql?(o)
|
|
144
|
+
self == o
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Calculates hash code according to all attributes.
|
|
148
|
+
# @return [Integer] Hash code
|
|
149
|
+
def hash
|
|
150
|
+
[event_id, event_name, action_source, value_data].hash
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Builds the object from hash
|
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
155
|
+
# @return [Object] Returns the model itself
|
|
156
|
+
def self.build_from_hash(attributes)
|
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
|
158
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
159
|
+
transformed_hash = {}
|
|
160
|
+
openapi_types.each_pair do |key, type|
|
|
161
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
162
|
+
transformed_hash["#{key}"] = nil
|
|
163
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
164
|
+
# check to ensure the input is an array given that the attribute
|
|
165
|
+
# is documented as an array but the input is not
|
|
166
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
167
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
168
|
+
end
|
|
169
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
new(transformed_hash)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Returns the object in the form of hash
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_hash
|
|
179
|
+
hash = {}
|
|
180
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
181
|
+
value = self.send(attr)
|
|
182
|
+
if value.nil?
|
|
183
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
184
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
hash[param] = _to_hash(value)
|
|
188
|
+
end
|
|
189
|
+
hash
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
end
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PlainRouter Conversion API
|
|
3
|
+
|
|
4
|
+
#PlainRouter public Signals Conversion API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PlainRouter::OpenAPI
|
|
17
|
+
# Optional synthetic commerce data.
|
|
18
|
+
class ValidateSandboxEventRequestValueData < ApiModelBase
|
|
19
|
+
attr_accessor :value
|
|
20
|
+
|
|
21
|
+
attr_accessor :currency
|
|
22
|
+
|
|
23
|
+
attr_accessor :order_id
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'value' => :'value',
|
|
29
|
+
:'currency' => :'currency',
|
|
30
|
+
:'order_id' => :'order_id'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'value' => :'String',
|
|
48
|
+
:'currency' => :'String',
|
|
49
|
+
:'order_id' => :'String'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ValidateSandboxEventRequestValueData` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ValidateSandboxEventRequestValueData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'value')
|
|
76
|
+
self.value = attributes[:'value']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'currency')
|
|
80
|
+
self.currency = attributes[:'currency']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'order_id')
|
|
84
|
+
self.order_id = attributes[:'order_id']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
invalid_properties
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check to see if the all the properties in the model are valid
|
|
97
|
+
# @return true if the model is valid
|
|
98
|
+
def valid?
|
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
value == o.value &&
|
|
109
|
+
currency == o.currency &&
|
|
110
|
+
order_id == o.order_id
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[value, currency, order_id].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the object in the form of hash
|
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
|
150
|
+
def to_hash
|
|
151
|
+
hash = {}
|
|
152
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
153
|
+
value = self.send(attr)
|
|
154
|
+
if value.nil?
|
|
155
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
156
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
hash[param] = _to_hash(value)
|
|
160
|
+
end
|
|
161
|
+
hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|