late-sdk 0.0.75 → 0.0.77

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