late-sdk 0.0.76 → 0.0.78

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.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -1
  3. data/docs/ActivateSequence200Response.md +20 -0
  4. data/docs/AddBroadcastRecipients200Response.md +22 -0
  5. data/docs/BroadcastsApi.md +49 -42
  6. data/docs/CancelBroadcast200Response.md +20 -0
  7. data/docs/CancelBroadcast200ResponseBroadcast.md +20 -0
  8. data/docs/CreateBroadcast200Response.md +20 -0
  9. data/docs/CreateBroadcast200ResponseBroadcast.md +30 -0
  10. data/docs/CreateSequence200Response.md +20 -0
  11. data/docs/CreateSequence200ResponseSequence.md +30 -0
  12. data/docs/CreateSequenceRequestStepsInner.md +1 -1
  13. data/docs/EnrollContacts200Response.md +22 -0
  14. data/docs/GetBroadcast200Response.md +20 -0
  15. data/docs/GetBroadcast200ResponseBroadcast.md +54 -0
  16. data/docs/{CreateSequenceRequestStepsInnerMessage.md → GetBroadcast200ResponseBroadcastMessage.md} +2 -2
  17. data/docs/GetBroadcast200ResponseBroadcastSegmentFilters.md +18 -0
  18. data/docs/GetSequence200Response.md +20 -0
  19. data/docs/GetSequence200ResponseSequence.md +44 -0
  20. data/docs/GetSequence200ResponseSequenceStepsInner.md +24 -0
  21. data/docs/GetSequence200ResponseSequenceStepsInnerTemplate.md +22 -0
  22. data/docs/ListBroadcastRecipients200Response.md +22 -0
  23. data/docs/ListBroadcastRecipients200ResponseRecipientsInner.md +38 -0
  24. data/docs/ListSequenceEnrollments200Response.md +22 -0
  25. data/docs/ListSequenceEnrollments200ResponseEnrollmentsInner.md +40 -0
  26. data/docs/ScheduleBroadcast200Response.md +20 -0
  27. data/docs/ScheduleBroadcast200ResponseBroadcast.md +22 -0
  28. data/docs/SequencesApi.md +49 -42
  29. data/docs/UpdateBroadcast200Response.md +20 -0
  30. data/docs/UpdateBroadcast200ResponseBroadcast.md +26 -0
  31. data/docs/UpdateSequence200Response.md +20 -0
  32. data/docs/UpdateSequence200ResponseSequence.md +32 -0
  33. data/lib/late-sdk/api/broadcasts_api.rb +35 -35
  34. data/lib/late-sdk/api/sequences_api.rb +35 -35
  35. data/lib/late-sdk/models/activate_sequence200_response.rb +156 -0
  36. data/lib/late-sdk/models/add_broadcast_recipients200_response.rb +167 -0
  37. data/lib/late-sdk/models/cancel_broadcast200_response.rb +156 -0
  38. data/lib/late-sdk/models/cancel_broadcast200_response_broadcast.rb +156 -0
  39. data/lib/late-sdk/models/create_broadcast200_response.rb +156 -0
  40. data/lib/late-sdk/models/create_broadcast200_response_broadcast.rb +201 -0
  41. data/lib/late-sdk/models/create_sequence200_response.rb +156 -0
  42. data/lib/late-sdk/models/create_sequence200_response_sequence.rb +201 -0
  43. data/lib/late-sdk/models/create_sequence_request_steps_inner.rb +1 -1
  44. data/lib/late-sdk/models/enroll_contacts200_response.rb +167 -0
  45. data/lib/late-sdk/models/get_broadcast200_response.rb +156 -0
  46. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +343 -0
  47. data/lib/late-sdk/models/{create_sequence_request_steps_inner_message.rb → get_broadcast200_response_broadcast_message.rb} +3 -3
  48. data/lib/late-sdk/models/get_broadcast200_response_broadcast_segment_filters.rb +149 -0
  49. data/lib/late-sdk/models/get_sequence200_response.rb +156 -0
  50. data/lib/late-sdk/models/get_sequence200_response_sequence.rb +300 -0
  51. data/lib/late-sdk/models/get_sequence200_response_sequence_steps_inner.rb +174 -0
  52. data/lib/late-sdk/models/get_sequence200_response_sequence_steps_inner_template.rb +165 -0
  53. data/lib/late-sdk/models/list_broadcast_recipients200_response.rb +167 -0
  54. data/lib/late-sdk/models/list_broadcast_recipients200_response_recipients_inner.rb +271 -0
  55. data/lib/late-sdk/models/list_sequence_enrollments200_response.rb +167 -0
  56. data/lib/late-sdk/models/list_sequence_enrollments200_response_enrollments_inner.rb +280 -0
  57. data/lib/late-sdk/models/schedule_broadcast200_response.rb +156 -0
  58. data/lib/late-sdk/models/schedule_broadcast200_response_broadcast.rb +165 -0
  59. data/lib/late-sdk/models/update_broadcast200_response.rb +156 -0
  60. data/lib/late-sdk/models/update_broadcast200_response_broadcast.rb +183 -0
  61. data/lib/late-sdk/models/update_sequence200_response.rb +156 -0
  62. data/lib/late-sdk/models/update_sequence200_response_sequence.rb +212 -0
  63. data/lib/late-sdk/version.rb +1 -1
  64. data/lib/late-sdk.rb +27 -1
  65. data/openapi.yaml +270 -14
  66. data/spec/api/broadcasts_api_spec.rb +7 -7
  67. data/spec/api/sequences_api_spec.rb +7 -7
  68. data/spec/models/activate_sequence200_response_spec.rb +42 -0
  69. data/spec/models/add_broadcast_recipients200_response_spec.rb +48 -0
  70. data/spec/models/cancel_broadcast200_response_broadcast_spec.rb +42 -0
  71. data/spec/models/cancel_broadcast200_response_spec.rb +42 -0
  72. data/spec/models/create_broadcast200_response_broadcast_spec.rb +72 -0
  73. data/spec/models/create_broadcast200_response_spec.rb +42 -0
  74. data/spec/models/create_sequence200_response_sequence_spec.rb +72 -0
  75. data/spec/models/create_sequence200_response_spec.rb +42 -0
  76. data/spec/models/enroll_contacts200_response_spec.rb +48 -0
  77. data/spec/models/{create_sequence_request_steps_inner_message_spec.rb → get_broadcast200_response_broadcast_message_spec.rb} +6 -6
  78. data/spec/models/get_broadcast200_response_broadcast_segment_filters_spec.rb +36 -0
  79. data/spec/models/get_broadcast200_response_broadcast_spec.rb +148 -0
  80. data/spec/models/get_broadcast200_response_spec.rb +42 -0
  81. data/spec/models/get_sequence200_response_sequence_spec.rb +118 -0
  82. data/spec/models/get_sequence200_response_sequence_steps_inner_spec.rb +54 -0
  83. data/spec/models/get_sequence200_response_sequence_steps_inner_template_spec.rb +48 -0
  84. data/spec/models/get_sequence200_response_spec.rb +42 -0
  85. data/spec/models/list_broadcast_recipients200_response_recipients_inner_spec.rb +100 -0
  86. data/spec/models/list_broadcast_recipients200_response_spec.rb +48 -0
  87. data/spec/models/list_sequence_enrollments200_response_enrollments_inner_spec.rb +106 -0
  88. data/spec/models/list_sequence_enrollments200_response_spec.rb +48 -0
  89. data/spec/models/schedule_broadcast200_response_broadcast_spec.rb +48 -0
  90. data/spec/models/schedule_broadcast200_response_spec.rb +42 -0
  91. data/spec/models/update_broadcast200_response_broadcast_spec.rb +60 -0
  92. data/spec/models/update_broadcast200_response_spec.rb +42 -0
  93. data/spec/models/update_sequence200_response_sequence_spec.rb +78 -0
  94. data/spec/models/update_sequence200_response_spec.rb +42 -0
  95. data/zernio-sdk-0.0.78.gem +0 -0
  96. metadata +110 -6
  97. data/zernio-sdk-0.0.76.gem +0 -0
@@ -0,0 +1,343 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetBroadcast200ResponseBroadcast < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :platform
25
+
26
+ attr_accessor :account_id
27
+
28
+ attr_accessor :message
29
+
30
+ attr_accessor :template
31
+
32
+ attr_accessor :segment_filters
33
+
34
+ attr_accessor :status
35
+
36
+ attr_accessor :scheduled_at
37
+
38
+ attr_accessor :started_at
39
+
40
+ attr_accessor :completed_at
41
+
42
+ attr_accessor :recipient_count
43
+
44
+ attr_accessor :sent_count
45
+
46
+ attr_accessor :delivered_count
47
+
48
+ attr_accessor :read_count
49
+
50
+ attr_accessor :failed_count
51
+
52
+ attr_accessor :created_at
53
+
54
+ attr_accessor :updated_at
55
+
56
+ class EnumAttributeValidator
57
+ attr_reader :datatype
58
+ attr_reader :allowable_values
59
+
60
+ def initialize(datatype, allowable_values)
61
+ @allowable_values = allowable_values.map do |value|
62
+ case datatype.to_s
63
+ when /Integer/i
64
+ value.to_i
65
+ when /Float/i
66
+ value.to_f
67
+ else
68
+ value
69
+ end
70
+ end
71
+ end
72
+
73
+ def valid?(value)
74
+ !value || allowable_values.include?(value)
75
+ end
76
+ end
77
+
78
+ # Attribute mapping from ruby-style variable name to JSON key.
79
+ def self.attribute_map
80
+ {
81
+ :'id' => :'id',
82
+ :'name' => :'name',
83
+ :'description' => :'description',
84
+ :'platform' => :'platform',
85
+ :'account_id' => :'accountId',
86
+ :'message' => :'message',
87
+ :'template' => :'template',
88
+ :'segment_filters' => :'segmentFilters',
89
+ :'status' => :'status',
90
+ :'scheduled_at' => :'scheduledAt',
91
+ :'started_at' => :'startedAt',
92
+ :'completed_at' => :'completedAt',
93
+ :'recipient_count' => :'recipientCount',
94
+ :'sent_count' => :'sentCount',
95
+ :'delivered_count' => :'deliveredCount',
96
+ :'read_count' => :'readCount',
97
+ :'failed_count' => :'failedCount',
98
+ :'created_at' => :'createdAt',
99
+ :'updated_at' => :'updatedAt'
100
+ }
101
+ end
102
+
103
+ # Returns attribute mapping this model knows about
104
+ def self.acceptable_attribute_map
105
+ attribute_map
106
+ end
107
+
108
+ # Returns all the JSON keys this model knows about
109
+ def self.acceptable_attributes
110
+ acceptable_attribute_map.values
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.openapi_types
115
+ {
116
+ :'id' => :'String',
117
+ :'name' => :'String',
118
+ :'description' => :'String',
119
+ :'platform' => :'String',
120
+ :'account_id' => :'String',
121
+ :'message' => :'GetBroadcast200ResponseBroadcastMessage',
122
+ :'template' => :'GetWhatsAppBroadcasts200ResponseBroadcastsInnerTemplate',
123
+ :'segment_filters' => :'GetBroadcast200ResponseBroadcastSegmentFilters',
124
+ :'status' => :'String',
125
+ :'scheduled_at' => :'Time',
126
+ :'started_at' => :'Time',
127
+ :'completed_at' => :'Time',
128
+ :'recipient_count' => :'Integer',
129
+ :'sent_count' => :'Integer',
130
+ :'delivered_count' => :'Integer',
131
+ :'read_count' => :'Integer',
132
+ :'failed_count' => :'Integer',
133
+ :'created_at' => :'Time',
134
+ :'updated_at' => :'Time'
135
+ }
136
+ end
137
+
138
+ # List of attributes with nullable: true
139
+ def self.openapi_nullable
140
+ Set.new([
141
+ ])
142
+ end
143
+
144
+ # Initializes the object
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ def initialize(attributes = {})
147
+ if (!attributes.is_a?(Hash))
148
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetBroadcast200ResponseBroadcast` initialize method"
149
+ end
150
+
151
+ # check to see if the attribute exists and convert string to symbol for hash key
152
+ acceptable_attribute_map = self.class.acceptable_attribute_map
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!acceptable_attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetBroadcast200ResponseBroadcast`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'id')
161
+ self.id = attributes[:'id']
162
+ end
163
+
164
+ if attributes.key?(:'name')
165
+ self.name = attributes[:'name']
166
+ end
167
+
168
+ if attributes.key?(:'description')
169
+ self.description = attributes[:'description']
170
+ end
171
+
172
+ if attributes.key?(:'platform')
173
+ self.platform = attributes[:'platform']
174
+ end
175
+
176
+ if attributes.key?(:'account_id')
177
+ self.account_id = attributes[:'account_id']
178
+ end
179
+
180
+ if attributes.key?(:'message')
181
+ self.message = attributes[:'message']
182
+ end
183
+
184
+ if attributes.key?(:'template')
185
+ self.template = attributes[:'template']
186
+ end
187
+
188
+ if attributes.key?(:'segment_filters')
189
+ self.segment_filters = attributes[:'segment_filters']
190
+ end
191
+
192
+ if attributes.key?(:'status')
193
+ self.status = attributes[:'status']
194
+ end
195
+
196
+ if attributes.key?(:'scheduled_at')
197
+ self.scheduled_at = attributes[:'scheduled_at']
198
+ end
199
+
200
+ if attributes.key?(:'started_at')
201
+ self.started_at = attributes[:'started_at']
202
+ end
203
+
204
+ if attributes.key?(:'completed_at')
205
+ self.completed_at = attributes[:'completed_at']
206
+ end
207
+
208
+ if attributes.key?(:'recipient_count')
209
+ self.recipient_count = attributes[:'recipient_count']
210
+ end
211
+
212
+ if attributes.key?(:'sent_count')
213
+ self.sent_count = attributes[:'sent_count']
214
+ end
215
+
216
+ if attributes.key?(:'delivered_count')
217
+ self.delivered_count = attributes[:'delivered_count']
218
+ end
219
+
220
+ if attributes.key?(:'read_count')
221
+ self.read_count = attributes[:'read_count']
222
+ end
223
+
224
+ if attributes.key?(:'failed_count')
225
+ self.failed_count = attributes[:'failed_count']
226
+ end
227
+
228
+ if attributes.key?(:'created_at')
229
+ self.created_at = attributes[:'created_at']
230
+ end
231
+
232
+ if attributes.key?(:'updated_at')
233
+ self.updated_at = attributes[:'updated_at']
234
+ end
235
+ end
236
+
237
+ # Show invalid properties with the reasons. Usually used together with valid?
238
+ # @return Array for valid properties with the reasons
239
+ def list_invalid_properties
240
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
241
+ invalid_properties = Array.new
242
+ invalid_properties
243
+ end
244
+
245
+ # Check to see if the all the properties in the model are valid
246
+ # @return true if the model is valid
247
+ def valid?
248
+ warn '[DEPRECATED] the `valid?` method is obsolete'
249
+ status_validator = EnumAttributeValidator.new('String', ["draft", "scheduled", "sending", "completed", "failed", "cancelled"])
250
+ return false unless status_validator.valid?(@status)
251
+ true
252
+ end
253
+
254
+ # Custom attribute writer method checking allowed values (enum).
255
+ # @param [Object] status Object to be assigned
256
+ def status=(status)
257
+ validator = EnumAttributeValidator.new('String', ["draft", "scheduled", "sending", "completed", "failed", "cancelled"])
258
+ unless validator.valid?(status)
259
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
260
+ end
261
+ @status = status
262
+ end
263
+
264
+ # Checks equality by comparing each attribute.
265
+ # @param [Object] Object to be compared
266
+ def ==(o)
267
+ return true if self.equal?(o)
268
+ self.class == o.class &&
269
+ id == o.id &&
270
+ name == o.name &&
271
+ description == o.description &&
272
+ platform == o.platform &&
273
+ account_id == o.account_id &&
274
+ message == o.message &&
275
+ template == o.template &&
276
+ segment_filters == o.segment_filters &&
277
+ status == o.status &&
278
+ scheduled_at == o.scheduled_at &&
279
+ started_at == o.started_at &&
280
+ completed_at == o.completed_at &&
281
+ recipient_count == o.recipient_count &&
282
+ sent_count == o.sent_count &&
283
+ delivered_count == o.delivered_count &&
284
+ read_count == o.read_count &&
285
+ failed_count == o.failed_count &&
286
+ created_at == o.created_at &&
287
+ updated_at == o.updated_at
288
+ end
289
+
290
+ # @see the `==` method
291
+ # @param [Object] Object to be compared
292
+ def eql?(o)
293
+ self == o
294
+ end
295
+
296
+ # Calculates hash code according to all attributes.
297
+ # @return [Integer] Hash code
298
+ def hash
299
+ [id, name, description, platform, account_id, message, template, segment_filters, status, scheduled_at, started_at, completed_at, recipient_count, sent_count, delivered_count, read_count, failed_count, created_at, updated_at].hash
300
+ end
301
+
302
+ # Builds the object from hash
303
+ # @param [Hash] attributes Model attributes in the form of hash
304
+ # @return [Object] Returns the model itself
305
+ def self.build_from_hash(attributes)
306
+ return nil unless attributes.is_a?(Hash)
307
+ attributes = attributes.transform_keys(&:to_sym)
308
+ transformed_hash = {}
309
+ openapi_types.each_pair do |key, type|
310
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
311
+ transformed_hash["#{key}"] = nil
312
+ elsif type =~ /\AArray<(.*)>/i
313
+ # check to ensure the input is an array given that the attribute
314
+ # is documented as an array but the input is not
315
+ if attributes[attribute_map[key]].is_a?(Array)
316
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
317
+ end
318
+ elsif !attributes[attribute_map[key]].nil?
319
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
320
+ end
321
+ end
322
+ new(transformed_hash)
323
+ end
324
+
325
+ # Returns the object in the form of hash
326
+ # @return [Hash] Returns the object in the form of hash
327
+ def to_hash
328
+ hash = {}
329
+ self.class.attribute_map.each_pair do |attr, param|
330
+ value = self.send(attr)
331
+ if value.nil?
332
+ is_nullable = self.class.openapi_nullable.include?(attr)
333
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
334
+ end
335
+
336
+ hash[param] = _to_hash(value)
337
+ end
338
+ hash
339
+ end
340
+
341
+ end
342
+
343
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Late
17
- class CreateSequenceRequestStepsInnerMessage < ApiModelBase
17
+ class GetBroadcast200ResponseBroadcastMessage < ApiModelBase
18
18
  attr_accessor :text
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -51,14 +51,14 @@ module Late
51
51
  # @param [Hash] attributes Model attributes in the form of hash
52
52
  def initialize(attributes = {})
53
53
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateSequenceRequestStepsInnerMessage` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetBroadcast200ResponseBroadcastMessage` initialize method"
55
55
  end
56
56
 
57
57
  # check to see if the attribute exists and convert string to symbol for hash key
58
58
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
60
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateSequenceRequestStepsInnerMessage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetBroadcast200ResponseBroadcastMessage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
62
  end
63
63
  h[k.to_sym] = v
64
64
  }
@@ -0,0 +1,149 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetBroadcast200ResponseBroadcastSegmentFilters < ApiModelBase
18
+ attr_accessor :tags
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'tags' => :'tags'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'tags' => :'Array<String>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetBroadcast200ResponseBroadcastSegmentFilters` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetBroadcast200ResponseBroadcastSegmentFilters`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'tags')
67
+ if (value = attributes[:'tags']).is_a?(Array)
68
+ self.tags = value
69
+ end
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ tags == o.tags
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [tags].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = self.send(attr)
137
+ if value.nil?
138
+ is_nullable = self.class.openapi_nullable.include?(attr)
139
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
140
+ end
141
+
142
+ hash[param] = _to_hash(value)
143
+ end
144
+ hash
145
+ end
146
+
147
+ end
148
+
149
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetSequence200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :sequence
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'sequence' => :'sequence'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'success' => :'Boolean',
44
+ :'sequence' => :'GetSequence200ResponseSequence'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetSequence200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetSequence200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'success')
71
+ self.success = attributes[:'success']
72
+ end
73
+
74
+ if attributes.key?(:'sequence')
75
+ self.sequence = attributes[:'sequence']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ success == o.success &&
100
+ sequence == o.sequence
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [success, sequence].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end