zernio-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 (95) 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. metadata +109 -5
@@ -0,0 +1,300 @@
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 GetSequence200ResponseSequence < 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 :status
29
+
30
+ attr_accessor :steps
31
+
32
+ attr_accessor :exit_on_reply
33
+
34
+ attr_accessor :exit_on_unsubscribe
35
+
36
+ attr_accessor :total_enrolled
37
+
38
+ attr_accessor :total_completed
39
+
40
+ attr_accessor :total_exited
41
+
42
+ attr_accessor :created_at
43
+
44
+ attr_accessor :updated_at
45
+
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'id' => :'id',
72
+ :'name' => :'name',
73
+ :'description' => :'description',
74
+ :'platform' => :'platform',
75
+ :'account_id' => :'accountId',
76
+ :'status' => :'status',
77
+ :'steps' => :'steps',
78
+ :'exit_on_reply' => :'exitOnReply',
79
+ :'exit_on_unsubscribe' => :'exitOnUnsubscribe',
80
+ :'total_enrolled' => :'totalEnrolled',
81
+ :'total_completed' => :'totalCompleted',
82
+ :'total_exited' => :'totalExited',
83
+ :'created_at' => :'createdAt',
84
+ :'updated_at' => :'updatedAt'
85
+ }
86
+ end
87
+
88
+ # Returns attribute mapping this model knows about
89
+ def self.acceptable_attribute_map
90
+ attribute_map
91
+ end
92
+
93
+ # Returns all the JSON keys this model knows about
94
+ def self.acceptable_attributes
95
+ acceptable_attribute_map.values
96
+ end
97
+
98
+ # Attribute type mapping.
99
+ def self.openapi_types
100
+ {
101
+ :'id' => :'String',
102
+ :'name' => :'String',
103
+ :'description' => :'String',
104
+ :'platform' => :'String',
105
+ :'account_id' => :'String',
106
+ :'status' => :'String',
107
+ :'steps' => :'Array<GetSequence200ResponseSequenceStepsInner>',
108
+ :'exit_on_reply' => :'Boolean',
109
+ :'exit_on_unsubscribe' => :'Boolean',
110
+ :'total_enrolled' => :'Integer',
111
+ :'total_completed' => :'Integer',
112
+ :'total_exited' => :'Integer',
113
+ :'created_at' => :'Time',
114
+ :'updated_at' => :'Time'
115
+ }
116
+ end
117
+
118
+ # List of attributes with nullable: true
119
+ def self.openapi_nullable
120
+ Set.new([
121
+ ])
122
+ end
123
+
124
+ # Initializes the object
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ def initialize(attributes = {})
127
+ if (!attributes.is_a?(Hash))
128
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetSequence200ResponseSequence` initialize method"
129
+ end
130
+
131
+ # check to see if the attribute exists and convert string to symbol for hash key
132
+ acceptable_attribute_map = self.class.acceptable_attribute_map
133
+ attributes = attributes.each_with_object({}) { |(k, v), h|
134
+ if (!acceptable_attribute_map.key?(k.to_sym))
135
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetSequence200ResponseSequence`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
136
+ end
137
+ h[k.to_sym] = v
138
+ }
139
+
140
+ if attributes.key?(:'id')
141
+ self.id = attributes[:'id']
142
+ end
143
+
144
+ if attributes.key?(:'name')
145
+ self.name = attributes[:'name']
146
+ end
147
+
148
+ if attributes.key?(:'description')
149
+ self.description = attributes[:'description']
150
+ end
151
+
152
+ if attributes.key?(:'platform')
153
+ self.platform = attributes[:'platform']
154
+ end
155
+
156
+ if attributes.key?(:'account_id')
157
+ self.account_id = attributes[:'account_id']
158
+ end
159
+
160
+ if attributes.key?(:'status')
161
+ self.status = attributes[:'status']
162
+ end
163
+
164
+ if attributes.key?(:'steps')
165
+ if (value = attributes[:'steps']).is_a?(Array)
166
+ self.steps = value
167
+ end
168
+ end
169
+
170
+ if attributes.key?(:'exit_on_reply')
171
+ self.exit_on_reply = attributes[:'exit_on_reply']
172
+ end
173
+
174
+ if attributes.key?(:'exit_on_unsubscribe')
175
+ self.exit_on_unsubscribe = attributes[:'exit_on_unsubscribe']
176
+ end
177
+
178
+ if attributes.key?(:'total_enrolled')
179
+ self.total_enrolled = attributes[:'total_enrolled']
180
+ end
181
+
182
+ if attributes.key?(:'total_completed')
183
+ self.total_completed = attributes[:'total_completed']
184
+ end
185
+
186
+ if attributes.key?(:'total_exited')
187
+ self.total_exited = attributes[:'total_exited']
188
+ end
189
+
190
+ if attributes.key?(:'created_at')
191
+ self.created_at = attributes[:'created_at']
192
+ end
193
+
194
+ if attributes.key?(:'updated_at')
195
+ self.updated_at = attributes[:'updated_at']
196
+ end
197
+ end
198
+
199
+ # Show invalid properties with the reasons. Usually used together with valid?
200
+ # @return Array for valid properties with the reasons
201
+ def list_invalid_properties
202
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
203
+ invalid_properties = Array.new
204
+ invalid_properties
205
+ end
206
+
207
+ # Check to see if the all the properties in the model are valid
208
+ # @return true if the model is valid
209
+ def valid?
210
+ warn '[DEPRECATED] the `valid?` method is obsolete'
211
+ status_validator = EnumAttributeValidator.new('String', ["draft", "active", "paused"])
212
+ return false unless status_validator.valid?(@status)
213
+ true
214
+ end
215
+
216
+ # Custom attribute writer method checking allowed values (enum).
217
+ # @param [Object] status Object to be assigned
218
+ def status=(status)
219
+ validator = EnumAttributeValidator.new('String', ["draft", "active", "paused"])
220
+ unless validator.valid?(status)
221
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
222
+ end
223
+ @status = status
224
+ end
225
+
226
+ # Checks equality by comparing each attribute.
227
+ # @param [Object] Object to be compared
228
+ def ==(o)
229
+ return true if self.equal?(o)
230
+ self.class == o.class &&
231
+ id == o.id &&
232
+ name == o.name &&
233
+ description == o.description &&
234
+ platform == o.platform &&
235
+ account_id == o.account_id &&
236
+ status == o.status &&
237
+ steps == o.steps &&
238
+ exit_on_reply == o.exit_on_reply &&
239
+ exit_on_unsubscribe == o.exit_on_unsubscribe &&
240
+ total_enrolled == o.total_enrolled &&
241
+ total_completed == o.total_completed &&
242
+ total_exited == o.total_exited &&
243
+ created_at == o.created_at &&
244
+ updated_at == o.updated_at
245
+ end
246
+
247
+ # @see the `==` method
248
+ # @param [Object] Object to be compared
249
+ def eql?(o)
250
+ self == o
251
+ end
252
+
253
+ # Calculates hash code according to all attributes.
254
+ # @return [Integer] Hash code
255
+ def hash
256
+ [id, name, description, platform, account_id, status, steps, exit_on_reply, exit_on_unsubscribe, total_enrolled, total_completed, total_exited, created_at, updated_at].hash
257
+ end
258
+
259
+ # Builds the object from hash
260
+ # @param [Hash] attributes Model attributes in the form of hash
261
+ # @return [Object] Returns the model itself
262
+ def self.build_from_hash(attributes)
263
+ return nil unless attributes.is_a?(Hash)
264
+ attributes = attributes.transform_keys(&:to_sym)
265
+ transformed_hash = {}
266
+ openapi_types.each_pair do |key, type|
267
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
268
+ transformed_hash["#{key}"] = nil
269
+ elsif type =~ /\AArray<(.*)>/i
270
+ # check to ensure the input is an array given that the attribute
271
+ # is documented as an array but the input is not
272
+ if attributes[attribute_map[key]].is_a?(Array)
273
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
274
+ end
275
+ elsif !attributes[attribute_map[key]].nil?
276
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
277
+ end
278
+ end
279
+ new(transformed_hash)
280
+ end
281
+
282
+ # Returns the object in the form of hash
283
+ # @return [Hash] Returns the object in the form of hash
284
+ def to_hash
285
+ hash = {}
286
+ self.class.attribute_map.each_pair do |attr, param|
287
+ value = self.send(attr)
288
+ if value.nil?
289
+ is_nullable = self.class.openapi_nullable.include?(attr)
290
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
291
+ end
292
+
293
+ hash[param] = _to_hash(value)
294
+ end
295
+ hash
296
+ end
297
+
298
+ end
299
+
300
+ end
@@ -0,0 +1,174 @@
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 GetSequence200ResponseSequenceStepsInner < ApiModelBase
18
+ attr_accessor :order
19
+
20
+ attr_accessor :delay_minutes
21
+
22
+ attr_accessor :message
23
+
24
+ attr_accessor :template
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'order' => :'order',
30
+ :'delay_minutes' => :'delayMinutes',
31
+ :'message' => :'message',
32
+ :'template' => :'template'
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
+ :'order' => :'Integer',
50
+ :'delay_minutes' => :'Integer',
51
+ :'message' => :'GetBroadcast200ResponseBroadcastMessage',
52
+ :'template' => :'GetSequence200ResponseSequenceStepsInnerTemplate'
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 `Late::GetSequence200ResponseSequenceStepsInner` 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 `Late::GetSequence200ResponseSequenceStepsInner`. 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?(:'order')
79
+ self.order = attributes[:'order']
80
+ end
81
+
82
+ if attributes.key?(:'delay_minutes')
83
+ self.delay_minutes = attributes[:'delay_minutes']
84
+ end
85
+
86
+ if attributes.key?(:'message')
87
+ self.message = attributes[:'message']
88
+ end
89
+
90
+ if attributes.key?(:'template')
91
+ self.template = attributes[:'template']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ order == o.order &&
116
+ delay_minutes == o.delay_minutes &&
117
+ message == o.message &&
118
+ template == o.template
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [order, delay_minutes, message, template].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ 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 GetSequence200ResponseSequenceStepsInnerTemplate < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :language
21
+
22
+ attr_accessor :variable_mapping
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'language' => :'language',
29
+ :'variable_mapping' => :'variableMapping'
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
+ :'name' => :'String',
47
+ :'language' => :'String',
48
+ :'variable_mapping' => :'Object'
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::GetSequence200ResponseSequenceStepsInnerTemplate` 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::GetSequence200ResponseSequenceStepsInnerTemplate`. 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?(:'name')
75
+ self.name = attributes[:'name']
76
+ end
77
+
78
+ if attributes.key?(:'language')
79
+ self.language = attributes[:'language']
80
+ end
81
+
82
+ if attributes.key?(:'variable_mapping')
83
+ self.variable_mapping = attributes[:'variable_mapping']
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
+ name == o.name &&
108
+ language == o.language &&
109
+ variable_mapping == o.variable_mapping
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
+ [name, language, variable_mapping].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