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,242 @@
|
|
|
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 GetSandbox200ResponseTry < ApiModelBase
|
|
18
|
+
attr_accessor :method
|
|
19
|
+
|
|
20
|
+
attr_accessor :url
|
|
21
|
+
|
|
22
|
+
attr_accessor :content_type
|
|
23
|
+
|
|
24
|
+
attr_accessor :body
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'method' => :'method',
|
|
30
|
+
:'url' => :'url',
|
|
31
|
+
:'content_type' => :'content_type',
|
|
32
|
+
:'body' => :'body'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'method' => :'String',
|
|
50
|
+
:'url' => :'String',
|
|
51
|
+
:'content_type' => :'String',
|
|
52
|
+
:'body' => :'GetSandbox200ResponseTryBody'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetSandbox200ResponseTry` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetSandbox200ResponseTry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'method')
|
|
79
|
+
self.method = attributes[:'method']
|
|
80
|
+
else
|
|
81
|
+
self.method = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'url')
|
|
85
|
+
self.url = attributes[:'url']
|
|
86
|
+
else
|
|
87
|
+
self.url = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'content_type')
|
|
91
|
+
self.content_type = attributes[:'content_type']
|
|
92
|
+
else
|
|
93
|
+
self.content_type = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'body')
|
|
97
|
+
self.body = attributes[:'body']
|
|
98
|
+
else
|
|
99
|
+
self.body = nil
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
104
|
+
# @return Array for valid properties with the reasons
|
|
105
|
+
def list_invalid_properties
|
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
if @method.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if @url.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @content_type.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @body.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
+
return false if @method.nil?
|
|
132
|
+
return false if @url.nil?
|
|
133
|
+
return false if @content_type.nil?
|
|
134
|
+
return false if @body.nil?
|
|
135
|
+
true
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] method Value to be assigned
|
|
140
|
+
def method=(method)
|
|
141
|
+
if method.nil?
|
|
142
|
+
fail ArgumentError, 'method cannot be nil'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@method = method
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] url Value to be assigned
|
|
150
|
+
def url=(url)
|
|
151
|
+
if url.nil?
|
|
152
|
+
fail ArgumentError, 'url cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@url = url
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] content_type Value to be assigned
|
|
160
|
+
def content_type=(content_type)
|
|
161
|
+
if content_type.nil?
|
|
162
|
+
fail ArgumentError, 'content_type cannot be nil'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@content_type = content_type
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] body Value to be assigned
|
|
170
|
+
def body=(body)
|
|
171
|
+
if body.nil?
|
|
172
|
+
fail ArgumentError, 'body cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
@body = body
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Checks equality by comparing each attribute.
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def ==(o)
|
|
181
|
+
return true if self.equal?(o)
|
|
182
|
+
self.class == o.class &&
|
|
183
|
+
method == o.method &&
|
|
184
|
+
url == o.url &&
|
|
185
|
+
content_type == o.content_type &&
|
|
186
|
+
body == o.body
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @see the `==` method
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def eql?(o)
|
|
192
|
+
self == o
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Calculates hash code according to all attributes.
|
|
196
|
+
# @return [Integer] Hash code
|
|
197
|
+
def hash
|
|
198
|
+
[method, url, content_type, body].hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Builds the object from hash
|
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
203
|
+
# @return [Object] Returns the model itself
|
|
204
|
+
def self.build_from_hash(attributes)
|
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
|
206
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
207
|
+
transformed_hash = {}
|
|
208
|
+
openapi_types.each_pair do |key, type|
|
|
209
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
210
|
+
transformed_hash["#{key}"] = nil
|
|
211
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
212
|
+
# check to ensure the input is an array given that the attribute
|
|
213
|
+
# is documented as an array but the input is not
|
|
214
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
215
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
216
|
+
end
|
|
217
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
218
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
new(transformed_hash)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
@@ -0,0 +1,242 @@
|
|
|
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 GetSandbox200ResponseTryBody < ApiModelBase
|
|
18
|
+
attr_accessor :event_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :event_name
|
|
21
|
+
|
|
22
|
+
attr_accessor :action_source
|
|
23
|
+
|
|
24
|
+
attr_accessor :value_data
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'event_id' => :'event_id',
|
|
30
|
+
:'event_name' => :'event_name',
|
|
31
|
+
:'action_source' => :'action_source',
|
|
32
|
+
:'value_data' => :'value_data'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'event_id' => :'String',
|
|
50
|
+
:'event_name' => :'String',
|
|
51
|
+
:'action_source' => :'String',
|
|
52
|
+
:'value_data' => :'GetSandbox200ResponseTryBodyValueData'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetSandbox200ResponseTryBody` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetSandbox200ResponseTryBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'event_id')
|
|
79
|
+
self.event_id = attributes[:'event_id']
|
|
80
|
+
else
|
|
81
|
+
self.event_id = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'event_name')
|
|
85
|
+
self.event_name = attributes[:'event_name']
|
|
86
|
+
else
|
|
87
|
+
self.event_name = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'action_source')
|
|
91
|
+
self.action_source = attributes[:'action_source']
|
|
92
|
+
else
|
|
93
|
+
self.action_source = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'value_data')
|
|
97
|
+
self.value_data = attributes[:'value_data']
|
|
98
|
+
else
|
|
99
|
+
self.value_data = nil
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
104
|
+
# @return Array for valid properties with the reasons
|
|
105
|
+
def list_invalid_properties
|
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
if @event_id.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if @event_name.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @action_source.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "action_source", action_source cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @value_data.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "value_data", value_data cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
+
return false if @event_id.nil?
|
|
132
|
+
return false if @event_name.nil?
|
|
133
|
+
return false if @action_source.nil?
|
|
134
|
+
return false if @value_data.nil?
|
|
135
|
+
true
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] event_id Value to be assigned
|
|
140
|
+
def event_id=(event_id)
|
|
141
|
+
if event_id.nil?
|
|
142
|
+
fail ArgumentError, 'event_id cannot be nil'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@event_id = event_id
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] event_name Value to be assigned
|
|
150
|
+
def event_name=(event_name)
|
|
151
|
+
if event_name.nil?
|
|
152
|
+
fail ArgumentError, 'event_name cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@event_name = event_name
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] action_source Value to be assigned
|
|
160
|
+
def action_source=(action_source)
|
|
161
|
+
if action_source.nil?
|
|
162
|
+
fail ArgumentError, 'action_source cannot be nil'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@action_source = action_source
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] value_data Value to be assigned
|
|
170
|
+
def value_data=(value_data)
|
|
171
|
+
if value_data.nil?
|
|
172
|
+
fail ArgumentError, 'value_data cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
@value_data = value_data
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Checks equality by comparing each attribute.
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def ==(o)
|
|
181
|
+
return true if self.equal?(o)
|
|
182
|
+
self.class == o.class &&
|
|
183
|
+
event_id == o.event_id &&
|
|
184
|
+
event_name == o.event_name &&
|
|
185
|
+
action_source == o.action_source &&
|
|
186
|
+
value_data == o.value_data
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @see the `==` method
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def eql?(o)
|
|
192
|
+
self == o
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Calculates hash code according to all attributes.
|
|
196
|
+
# @return [Integer] Hash code
|
|
197
|
+
def hash
|
|
198
|
+
[event_id, event_name, action_source, value_data].hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Builds the object from hash
|
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
203
|
+
# @return [Object] Returns the model itself
|
|
204
|
+
def self.build_from_hash(attributes)
|
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
|
206
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
207
|
+
transformed_hash = {}
|
|
208
|
+
openapi_types.each_pair do |key, type|
|
|
209
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
210
|
+
transformed_hash["#{key}"] = nil
|
|
211
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
212
|
+
# check to ensure the input is an array given that the attribute
|
|
213
|
+
# is documented as an array but the input is not
|
|
214
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
215
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
216
|
+
end
|
|
217
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
218
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
new(transformed_hash)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
@@ -0,0 +1,216 @@
|
|
|
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 GetSandbox200ResponseTryBodyValueData < ApiModelBase
|
|
18
|
+
attr_accessor :value
|
|
19
|
+
|
|
20
|
+
attr_accessor :currency
|
|
21
|
+
|
|
22
|
+
attr_accessor :order_id
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'value' => :'value',
|
|
28
|
+
:'currency' => :'currency',
|
|
29
|
+
:'order_id' => :'order_id'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'value' => :'String',
|
|
47
|
+
:'currency' => :'String',
|
|
48
|
+
:'order_id' => :'String'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetSandbox200ResponseTryBodyValueData` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetSandbox200ResponseTryBodyValueData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'value')
|
|
75
|
+
self.value = attributes[:'value']
|
|
76
|
+
else
|
|
77
|
+
self.value = nil
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'currency')
|
|
81
|
+
self.currency = attributes[:'currency']
|
|
82
|
+
else
|
|
83
|
+
self.currency = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'order_id')
|
|
87
|
+
self.order_id = attributes[:'order_id']
|
|
88
|
+
else
|
|
89
|
+
self.order_id = nil
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
94
|
+
# @return Array for valid properties with the reasons
|
|
95
|
+
def list_invalid_properties
|
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
97
|
+
invalid_properties = Array.new
|
|
98
|
+
if @value.nil?
|
|
99
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @currency.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if @order_id.nil?
|
|
107
|
+
invalid_properties.push('invalid value for "order_id", order_id cannot be nil.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
invalid_properties
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Check to see if the all the properties in the model are valid
|
|
114
|
+
# @return true if the model is valid
|
|
115
|
+
def valid?
|
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
|
+
return false if @value.nil?
|
|
118
|
+
return false if @currency.nil?
|
|
119
|
+
return false if @order_id.nil?
|
|
120
|
+
true
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Custom attribute writer method with validation
|
|
124
|
+
# @param [Object] value Value to be assigned
|
|
125
|
+
def value=(value)
|
|
126
|
+
if value.nil?
|
|
127
|
+
fail ArgumentError, 'value cannot be nil'
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
@value = value
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Custom attribute writer method with validation
|
|
134
|
+
# @param [Object] currency Value to be assigned
|
|
135
|
+
def currency=(currency)
|
|
136
|
+
if currency.nil?
|
|
137
|
+
fail ArgumentError, 'currency cannot be nil'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
@currency = currency
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Custom attribute writer method with validation
|
|
144
|
+
# @param [Object] order_id Value to be assigned
|
|
145
|
+
def order_id=(order_id)
|
|
146
|
+
if order_id.nil?
|
|
147
|
+
fail ArgumentError, 'order_id cannot be nil'
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
@order_id = order_id
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Checks equality by comparing each attribute.
|
|
154
|
+
# @param [Object] Object to be compared
|
|
155
|
+
def ==(o)
|
|
156
|
+
return true if self.equal?(o)
|
|
157
|
+
self.class == o.class &&
|
|
158
|
+
value == o.value &&
|
|
159
|
+
currency == o.currency &&
|
|
160
|
+
order_id == o.order_id
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# @see the `==` method
|
|
164
|
+
# @param [Object] Object to be compared
|
|
165
|
+
def eql?(o)
|
|
166
|
+
self == o
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Calculates hash code according to all attributes.
|
|
170
|
+
# @return [Integer] Hash code
|
|
171
|
+
def hash
|
|
172
|
+
[value, currency, order_id].hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Builds the object from hash
|
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
177
|
+
# @return [Object] Returns the model itself
|
|
178
|
+
def self.build_from_hash(attributes)
|
|
179
|
+
return nil unless attributes.is_a?(Hash)
|
|
180
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
181
|
+
transformed_hash = {}
|
|
182
|
+
openapi_types.each_pair do |key, type|
|
|
183
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
184
|
+
transformed_hash["#{key}"] = nil
|
|
185
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
186
|
+
# check to ensure the input is an array given that the attribute
|
|
187
|
+
# is documented as an array but the input is not
|
|
188
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
189
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
190
|
+
end
|
|
191
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
192
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
new(transformed_hash)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Returns the object in the form of hash
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_hash
|
|
201
|
+
hash = {}
|
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
203
|
+
value = self.send(attr)
|
|
204
|
+
if value.nil?
|
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
hash[param] = _to_hash(value)
|
|
210
|
+
end
|
|
211
|
+
hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|