late-sdk 0.0.68 → 0.0.69

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 +62 -0
  3. data/docs/AddBroadcastRecipientsRequest.md +20 -0
  4. data/docs/BroadcastsApi.md +699 -0
  5. data/docs/BulkCreateContactsRequest.md +24 -0
  6. data/docs/BulkCreateContactsRequestContactsInner.md +28 -0
  7. data/docs/CommentAutomationsApi.md +428 -0
  8. data/docs/ContactsApi.md +500 -0
  9. data/docs/CreateBroadcastRequest.md +32 -0
  10. data/docs/CreateBroadcastRequestMessage.md +20 -0
  11. data/docs/CreateBroadcastRequestMessageAttachmentsInner.md +22 -0
  12. data/docs/CreateBroadcastRequestSegmentFilters.md +20 -0
  13. data/docs/CreateBroadcastRequestTemplate.md +22 -0
  14. data/docs/CreateCommentAutomationRequest.md +36 -0
  15. data/docs/CreateContactRequest.md +38 -0
  16. data/docs/CreateCustomFieldRequest.md +26 -0
  17. data/docs/CreateSequenceRequest.md +32 -0
  18. data/docs/CreateSequenceRequestStepsInner.md +24 -0
  19. data/docs/CreateSequenceRequestStepsInnerMessage.md +18 -0
  20. data/docs/CustomFieldsApi.md +419 -0
  21. data/docs/EnrollContactsRequest.md +20 -0
  22. data/docs/ListCommentAutomations200Response.md +20 -0
  23. data/docs/ListCommentAutomations200ResponseAutomationsInner.md +42 -0
  24. data/docs/ListCommentAutomations200ResponseAutomationsInnerStats.md +24 -0
  25. data/docs/ScheduleBroadcastRequest.md +18 -0
  26. data/docs/SequencesApi.md +697 -0
  27. data/docs/SetContactFieldValueRequest.md +18 -0
  28. data/docs/UpdateCommentAutomationRequest.md +28 -0
  29. data/docs/UpdateContactRequest.md +32 -0
  30. data/docs/UpdateCustomFieldRequest.md +20 -0
  31. data/docs/WhatsAppApi.md +25 -25
  32. data/lib/late-sdk/api/broadcasts_api.rb +689 -0
  33. data/lib/late-sdk/api/comment_automations_api.rb +420 -0
  34. data/lib/late-sdk/api/contacts_api.rb +503 -0
  35. data/lib/late-sdk/api/custom_fields_api.rb +424 -0
  36. data/lib/late-sdk/api/sequences_api.rb +681 -0
  37. data/lib/late-sdk/api/whats_app_api.rb +50 -50
  38. data/lib/late-sdk/models/add_broadcast_recipients_request.rb +160 -0
  39. data/lib/late-sdk/models/bulk_create_contacts_request.rb +253 -0
  40. data/lib/late-sdk/models/bulk_create_contacts_request_contacts_inner.rb +228 -0
  41. data/lib/late-sdk/models/create_broadcast_request.rb +302 -0
  42. data/lib/late-sdk/models/create_broadcast_request_message.rb +158 -0
  43. data/lib/late-sdk/models/create_broadcast_request_message_attachments_inner.rb +165 -0
  44. data/lib/late-sdk/models/create_broadcast_request_segment_filters.rb +158 -0
  45. data/lib/late-sdk/models/create_broadcast_request_template.rb +168 -0
  46. data/lib/late-sdk/models/create_comment_automation_request.rb +359 -0
  47. data/lib/late-sdk/models/create_contact_request.rb +276 -0
  48. data/lib/late-sdk/models/create_custom_field_request.rb +262 -0
  49. data/lib/late-sdk/models/create_sequence_request.rb +308 -0
  50. data/lib/late-sdk/models/create_sequence_request_steps_inner.rb +208 -0
  51. data/lib/late-sdk/models/create_sequence_request_steps_inner_message.rb +147 -0
  52. data/lib/late-sdk/models/enroll_contacts_request.rb +178 -0
  53. data/lib/late-sdk/models/list_comment_automations200_response.rb +158 -0
  54. data/lib/late-sdk/models/list_comment_automations200_response_automations_inner.rb +303 -0
  55. data/lib/late-sdk/models/list_comment_automations200_response_automations_inner_stats.rb +174 -0
  56. data/lib/late-sdk/models/schedule_broadcast_request.rb +164 -0
  57. data/lib/late-sdk/models/set_contact_field_value_request.rb +150 -0
  58. data/lib/late-sdk/models/update_comment_automation_request.rb +228 -0
  59. data/lib/late-sdk/models/update_contact_request.rb +212 -0
  60. data/lib/late-sdk/models/update_custom_field_request.rb +158 -0
  61. data/lib/late-sdk/version.rb +1 -1
  62. data/lib/late-sdk.rb +28 -0
  63. data/openapi.yaml +809 -13
  64. data/spec/api/broadcasts_api_spec.rb +154 -0
  65. data/spec/api/comment_automations_api_spec.rb +108 -0
  66. data/spec/api/contacts_api_spec.rb +122 -0
  67. data/spec/api/custom_fields_api_spec.rb +105 -0
  68. data/spec/api/sequences_api_spec.rb +153 -0
  69. data/spec/api/whats_app_api_spec.rb +25 -25
  70. data/spec/models/add_broadcast_recipients_request_spec.rb +42 -0
  71. data/spec/models/bulk_create_contacts_request_contacts_inner_spec.rb +66 -0
  72. data/spec/models/bulk_create_contacts_request_spec.rb +54 -0
  73. data/spec/models/create_broadcast_request_message_attachments_inner_spec.rb +48 -0
  74. data/spec/models/create_broadcast_request_message_spec.rb +42 -0
  75. data/spec/models/create_broadcast_request_segment_filters_spec.rb +42 -0
  76. data/spec/models/create_broadcast_request_spec.rb +82 -0
  77. data/spec/models/create_broadcast_request_template_spec.rb +48 -0
  78. data/spec/models/create_comment_automation_request_spec.rb +94 -0
  79. data/spec/models/create_contact_request_spec.rb +96 -0
  80. data/spec/models/create_custom_field_request_spec.rb +64 -0
  81. data/spec/models/create_sequence_request_spec.rb +82 -0
  82. data/spec/models/create_sequence_request_steps_inner_message_spec.rb +36 -0
  83. data/spec/models/create_sequence_request_steps_inner_spec.rb +54 -0
  84. data/spec/models/enroll_contacts_request_spec.rb +42 -0
  85. data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +116 -0
  86. data/spec/models/list_comment_automations200_response_automations_inner_stats_spec.rb +54 -0
  87. data/spec/models/list_comment_automations200_response_spec.rb +42 -0
  88. data/spec/models/schedule_broadcast_request_spec.rb +36 -0
  89. data/spec/models/set_contact_field_value_request_spec.rb +36 -0
  90. data/spec/models/update_comment_automation_request_spec.rb +70 -0
  91. data/spec/models/update_contact_request_spec.rb +78 -0
  92. data/spec/models/update_custom_field_request_spec.rb +42 -0
  93. data/zernio-sdk-0.0.69.gem +0 -0
  94. metadata +114 -2
  95. data/zernio-sdk-0.0.68.gem +0 -0
@@ -0,0 +1,308 @@
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 CreateSequenceRequest < ApiModelBase
18
+ attr_accessor :profile_id
19
+
20
+ attr_accessor :account_id
21
+
22
+ attr_accessor :platform
23
+
24
+ attr_accessor :name
25
+
26
+ attr_accessor :description
27
+
28
+ attr_accessor :steps
29
+
30
+ attr_accessor :exit_on_reply
31
+
32
+ attr_accessor :exit_on_unsubscribe
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'profile_id' => :'profileId',
60
+ :'account_id' => :'accountId',
61
+ :'platform' => :'platform',
62
+ :'name' => :'name',
63
+ :'description' => :'description',
64
+ :'steps' => :'steps',
65
+ :'exit_on_reply' => :'exitOnReply',
66
+ :'exit_on_unsubscribe' => :'exitOnUnsubscribe'
67
+ }
68
+ end
69
+
70
+ # Returns attribute mapping this model knows about
71
+ def self.acceptable_attribute_map
72
+ attribute_map
73
+ end
74
+
75
+ # Returns all the JSON keys this model knows about
76
+ def self.acceptable_attributes
77
+ acceptable_attribute_map.values
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.openapi_types
82
+ {
83
+ :'profile_id' => :'String',
84
+ :'account_id' => :'String',
85
+ :'platform' => :'String',
86
+ :'name' => :'String',
87
+ :'description' => :'String',
88
+ :'steps' => :'Array<CreateSequenceRequestStepsInner>',
89
+ :'exit_on_reply' => :'Boolean',
90
+ :'exit_on_unsubscribe' => :'Boolean'
91
+ }
92
+ end
93
+
94
+ # List of attributes with nullable: true
95
+ def self.openapi_nullable
96
+ Set.new([
97
+ ])
98
+ end
99
+
100
+ # Initializes the object
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ def initialize(attributes = {})
103
+ if (!attributes.is_a?(Hash))
104
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateSequenceRequest` initialize method"
105
+ end
106
+
107
+ # check to see if the attribute exists and convert string to symbol for hash key
108
+ acceptable_attribute_map = self.class.acceptable_attribute_map
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!acceptable_attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateSequenceRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'profile_id')
117
+ self.profile_id = attributes[:'profile_id']
118
+ else
119
+ self.profile_id = nil
120
+ end
121
+
122
+ if attributes.key?(:'account_id')
123
+ self.account_id = attributes[:'account_id']
124
+ else
125
+ self.account_id = nil
126
+ end
127
+
128
+ if attributes.key?(:'platform')
129
+ self.platform = attributes[:'platform']
130
+ else
131
+ self.platform = nil
132
+ end
133
+
134
+ if attributes.key?(:'name')
135
+ self.name = attributes[:'name']
136
+ else
137
+ self.name = nil
138
+ end
139
+
140
+ if attributes.key?(:'description')
141
+ self.description = attributes[:'description']
142
+ end
143
+
144
+ if attributes.key?(:'steps')
145
+ if (value = attributes[:'steps']).is_a?(Array)
146
+ self.steps = value
147
+ end
148
+ end
149
+
150
+ if attributes.key?(:'exit_on_reply')
151
+ self.exit_on_reply = attributes[:'exit_on_reply']
152
+ else
153
+ self.exit_on_reply = true
154
+ end
155
+
156
+ if attributes.key?(:'exit_on_unsubscribe')
157
+ self.exit_on_unsubscribe = attributes[:'exit_on_unsubscribe']
158
+ else
159
+ self.exit_on_unsubscribe = true
160
+ end
161
+ end
162
+
163
+ # Show invalid properties with the reasons. Usually used together with valid?
164
+ # @return Array for valid properties with the reasons
165
+ def list_invalid_properties
166
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
167
+ invalid_properties = Array.new
168
+ if @profile_id.nil?
169
+ invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
170
+ end
171
+
172
+ if @account_id.nil?
173
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
174
+ end
175
+
176
+ if @platform.nil?
177
+ invalid_properties.push('invalid value for "platform", platform cannot be nil.')
178
+ end
179
+
180
+ if @name.nil?
181
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
182
+ end
183
+
184
+ invalid_properties
185
+ end
186
+
187
+ # Check to see if the all the properties in the model are valid
188
+ # @return true if the model is valid
189
+ def valid?
190
+ warn '[DEPRECATED] the `valid?` method is obsolete'
191
+ return false if @profile_id.nil?
192
+ return false if @account_id.nil?
193
+ return false if @platform.nil?
194
+ platform_validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "twitter", "bluesky", "reddit", "whatsapp"])
195
+ return false unless platform_validator.valid?(@platform)
196
+ return false if @name.nil?
197
+ true
198
+ end
199
+
200
+ # Custom attribute writer method with validation
201
+ # @param [Object] profile_id Value to be assigned
202
+ def profile_id=(profile_id)
203
+ if profile_id.nil?
204
+ fail ArgumentError, 'profile_id cannot be nil'
205
+ end
206
+
207
+ @profile_id = profile_id
208
+ end
209
+
210
+ # Custom attribute writer method with validation
211
+ # @param [Object] account_id Value to be assigned
212
+ def account_id=(account_id)
213
+ if account_id.nil?
214
+ fail ArgumentError, 'account_id cannot be nil'
215
+ end
216
+
217
+ @account_id = account_id
218
+ end
219
+
220
+ # Custom attribute writer method checking allowed values (enum).
221
+ # @param [Object] platform Object to be assigned
222
+ def platform=(platform)
223
+ validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "twitter", "bluesky", "reddit", "whatsapp"])
224
+ unless validator.valid?(platform)
225
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
226
+ end
227
+ @platform = platform
228
+ end
229
+
230
+ # Custom attribute writer method with validation
231
+ # @param [Object] name Value to be assigned
232
+ def name=(name)
233
+ if name.nil?
234
+ fail ArgumentError, 'name cannot be nil'
235
+ end
236
+
237
+ @name = name
238
+ end
239
+
240
+ # Checks equality by comparing each attribute.
241
+ # @param [Object] Object to be compared
242
+ def ==(o)
243
+ return true if self.equal?(o)
244
+ self.class == o.class &&
245
+ profile_id == o.profile_id &&
246
+ account_id == o.account_id &&
247
+ platform == o.platform &&
248
+ name == o.name &&
249
+ description == o.description &&
250
+ steps == o.steps &&
251
+ exit_on_reply == o.exit_on_reply &&
252
+ exit_on_unsubscribe == o.exit_on_unsubscribe
253
+ end
254
+
255
+ # @see the `==` method
256
+ # @param [Object] Object to be compared
257
+ def eql?(o)
258
+ self == o
259
+ end
260
+
261
+ # Calculates hash code according to all attributes.
262
+ # @return [Integer] Hash code
263
+ def hash
264
+ [profile_id, account_id, platform, name, description, steps, exit_on_reply, exit_on_unsubscribe].hash
265
+ end
266
+
267
+ # Builds the object from hash
268
+ # @param [Hash] attributes Model attributes in the form of hash
269
+ # @return [Object] Returns the model itself
270
+ def self.build_from_hash(attributes)
271
+ return nil unless attributes.is_a?(Hash)
272
+ attributes = attributes.transform_keys(&:to_sym)
273
+ transformed_hash = {}
274
+ openapi_types.each_pair do |key, type|
275
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
276
+ transformed_hash["#{key}"] = nil
277
+ elsif type =~ /\AArray<(.*)>/i
278
+ # check to ensure the input is an array given that the attribute
279
+ # is documented as an array but the input is not
280
+ if attributes[attribute_map[key]].is_a?(Array)
281
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
282
+ end
283
+ elsif !attributes[attribute_map[key]].nil?
284
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
285
+ end
286
+ end
287
+ new(transformed_hash)
288
+ end
289
+
290
+ # Returns the object in the form of hash
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_hash
293
+ hash = {}
294
+ self.class.attribute_map.each_pair do |attr, param|
295
+ value = self.send(attr)
296
+ if value.nil?
297
+ is_nullable = self.class.openapi_nullable.include?(attr)
298
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
299
+ end
300
+
301
+ hash[param] = _to_hash(value)
302
+ end
303
+ hash
304
+ end
305
+
306
+ end
307
+
308
+ end
@@ -0,0 +1,208 @@
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 CreateSequenceRequestStepsInner < 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' => :'CreateSequenceRequestStepsInnerMessage',
52
+ :'template' => :'GetWhatsAppBroadcasts200ResponseBroadcastsInnerTemplate'
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::CreateSequenceRequestStepsInner` 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::CreateSequenceRequestStepsInner`. 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
+ else
81
+ self.order = nil
82
+ end
83
+
84
+ if attributes.key?(:'delay_minutes')
85
+ self.delay_minutes = attributes[:'delay_minutes']
86
+ else
87
+ self.delay_minutes = nil
88
+ end
89
+
90
+ if attributes.key?(:'message')
91
+ self.message = attributes[:'message']
92
+ end
93
+
94
+ if attributes.key?(:'template')
95
+ self.template = attributes[:'template']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ if @order.nil?
105
+ invalid_properties.push('invalid value for "order", order cannot be nil.')
106
+ end
107
+
108
+ if @delay_minutes.nil?
109
+ invalid_properties.push('invalid value for "delay_minutes", delay_minutes cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @order.nil?
120
+ return false if @delay_minutes.nil?
121
+ true
122
+ end
123
+
124
+ # Custom attribute writer method with validation
125
+ # @param [Object] order Value to be assigned
126
+ def order=(order)
127
+ if order.nil?
128
+ fail ArgumentError, 'order cannot be nil'
129
+ end
130
+
131
+ @order = order
132
+ end
133
+
134
+ # Custom attribute writer method with validation
135
+ # @param [Object] delay_minutes Value to be assigned
136
+ def delay_minutes=(delay_minutes)
137
+ if delay_minutes.nil?
138
+ fail ArgumentError, 'delay_minutes cannot be nil'
139
+ end
140
+
141
+ @delay_minutes = delay_minutes
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ order == o.order &&
150
+ delay_minutes == o.delay_minutes &&
151
+ message == o.message &&
152
+ template == o.template
153
+ end
154
+
155
+ # @see the `==` method
156
+ # @param [Object] Object to be compared
157
+ def eql?(o)
158
+ self == o
159
+ end
160
+
161
+ # Calculates hash code according to all attributes.
162
+ # @return [Integer] Hash code
163
+ def hash
164
+ [order, delay_minutes, message, template].hash
165
+ end
166
+
167
+ # Builds the object from hash
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ # @return [Object] Returns the model itself
170
+ def self.build_from_hash(attributes)
171
+ return nil unless attributes.is_a?(Hash)
172
+ attributes = attributes.transform_keys(&:to_sym)
173
+ transformed_hash = {}
174
+ openapi_types.each_pair do |key, type|
175
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = nil
177
+ elsif type =~ /\AArray<(.*)>/i
178
+ # check to ensure the input is an array given that the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[attribute_map[key]].is_a?(Array)
181
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
182
+ end
183
+ elsif !attributes[attribute_map[key]].nil?
184
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
185
+ end
186
+ end
187
+ new(transformed_hash)
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ end
207
+
208
+ end
@@ -0,0 +1,147 @@
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 CreateSequenceRequestStepsInnerMessage < ApiModelBase
18
+ attr_accessor :text
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'text' => :'text'
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
+ :'text' => :'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::CreateSequenceRequestStepsInnerMessage` 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::CreateSequenceRequestStepsInnerMessage`. 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?(:'text')
67
+ self.text = attributes[:'text']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ text == o.text
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [text].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end