late-sdk 0.0.78 → 0.0.80

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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/BulkCreateContacts200Response.md +26 -0
  4. data/docs/CommentAutomationsApi.md +28 -24
  5. data/docs/ContactsApi.md +42 -36
  6. data/docs/CreateCommentAutomation200Response.md +20 -0
  7. data/docs/CreateCommentAutomation200ResponseAutomation.md +38 -0
  8. data/docs/CreateCommentAutomation200ResponseAutomationStats.md +22 -0
  9. data/docs/CreateContact200Response.md +24 -0
  10. data/docs/CreateContact200ResponseChannel.md +24 -0
  11. data/docs/CreateContact200ResponseContact.md +36 -0
  12. data/docs/CreateCustomField200Response.md +20 -0
  13. data/docs/CustomFieldsApi.md +21 -18
  14. data/docs/GetBroadcast200ResponseBroadcast.md +1 -1
  15. data/docs/GetCommentAutomation200Response.md +22 -0
  16. data/docs/GetCommentAutomation200ResponseAutomation.md +46 -0
  17. data/docs/GetCommentAutomation200ResponseLogsInner.md +32 -0
  18. data/docs/GetContact200Response.md +22 -0
  19. data/docs/GetContact200ResponseChannelsInner.md +32 -0
  20. data/docs/GetContact200ResponseContact.md +42 -0
  21. data/docs/GetContactChannels200Response.md +20 -0
  22. data/docs/GetContactChannels200ResponseChannelsInner.md +34 -0
  23. data/docs/ListCommentAutomationLogs200Response.md +22 -0
  24. data/docs/ListContacts200Response.md +24 -0
  25. data/docs/ListContacts200ResponseContactsInner.md +52 -0
  26. data/docs/{GetBroadcast200ResponseBroadcastSegmentFilters.md → ListContacts200ResponseFilters.md} +2 -2
  27. data/docs/ListCustomFields200Response.md +20 -0
  28. data/docs/ListCustomFields200ResponseFieldsInner.md +28 -0
  29. data/docs/ThreadsPlatformData.md +2 -0
  30. data/docs/UpdateCommentAutomation200Response.md +20 -0
  31. data/docs/UpdateCommentAutomation200ResponseAutomation.md +32 -0
  32. data/docs/UpdateContact200Response.md +20 -0
  33. data/docs/UpdateContact200ResponseContact.md +36 -0
  34. data/docs/UpdateCustomField200Response.md +20 -0
  35. data/docs/UpdateCustomField200ResponseField.md +26 -0
  36. data/lib/late-sdk/api/comment_automations_api.rb +20 -20
  37. data/lib/late-sdk/api/contacts_api.rb +30 -30
  38. data/lib/late-sdk/api/custom_fields_api.rb +15 -15
  39. data/lib/late-sdk/models/bulk_create_contacts200_response.rb +185 -0
  40. data/lib/late-sdk/models/create_comment_automation200_response.rb +156 -0
  41. data/lib/late-sdk/models/create_comment_automation200_response_automation.rb +273 -0
  42. data/lib/late-sdk/models/create_comment_automation200_response_automation_stats.rb +165 -0
  43. data/lib/late-sdk/models/create_contact200_response.rb +174 -0
  44. data/lib/late-sdk/models/create_contact200_response_channel.rb +175 -0
  45. data/lib/late-sdk/models/create_contact200_response_contact.rb +230 -0
  46. data/lib/late-sdk/models/create_custom_field200_response.rb +156 -0
  47. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +1 -1
  48. data/lib/late-sdk/models/get_comment_automation200_response.rb +167 -0
  49. data/lib/late-sdk/models/get_comment_automation200_response_automation.rb +309 -0
  50. data/lib/late-sdk/models/get_comment_automation200_response_logs_inner.rb +244 -0
  51. data/lib/late-sdk/models/get_contact200_response.rb +167 -0
  52. data/lib/late-sdk/models/get_contact200_response_channels_inner.rb +210 -0
  53. data/lib/late-sdk/models/get_contact200_response_contact.rb +259 -0
  54. data/lib/late-sdk/models/get_contact_channels200_response.rb +158 -0
  55. data/lib/late-sdk/models/get_contact_channels200_response_channels_inner.rb +219 -0
  56. data/lib/late-sdk/models/list_comment_automation_logs200_response.rb +167 -0
  57. data/lib/late-sdk/models/list_contacts200_response.rb +176 -0
  58. data/lib/late-sdk/models/list_contacts200_response_contacts_inner.rb +302 -0
  59. data/lib/late-sdk/models/{get_broadcast200_response_broadcast_segment_filters.rb → list_contacts200_response_filters.rb} +3 -3
  60. data/lib/late-sdk/models/list_custom_fields200_response.rb +158 -0
  61. data/lib/late-sdk/models/list_custom_fields200_response_fields_inner.rb +228 -0
  62. data/lib/late-sdk/models/threads_platform_data.rb +39 -1
  63. data/lib/late-sdk/models/update_comment_automation200_response.rb +156 -0
  64. data/lib/late-sdk/models/update_comment_automation200_response_automation.rb +246 -0
  65. data/lib/late-sdk/models/update_contact200_response.rb +156 -0
  66. data/lib/late-sdk/models/update_contact200_response_contact.rb +230 -0
  67. data/lib/late-sdk/models/update_custom_field200_response.rb +156 -0
  68. data/lib/late-sdk/models/update_custom_field200_response_field.rb +185 -0
  69. data/lib/late-sdk/version.rb +1 -1
  70. data/lib/late-sdk.rb +28 -1
  71. data/openapi.yaml +329 -13
  72. data/spec/api/comment_automations_api_spec.rb +4 -4
  73. data/spec/api/contacts_api_spec.rb +6 -6
  74. data/spec/api/custom_fields_api_spec.rb +3 -3
  75. data/spec/models/bulk_create_contacts200_response_spec.rb +60 -0
  76. data/spec/models/create_comment_automation200_response_automation_spec.rb +100 -0
  77. data/spec/models/create_comment_automation200_response_automation_stats_spec.rb +48 -0
  78. data/spec/models/create_comment_automation200_response_spec.rb +42 -0
  79. data/spec/models/create_contact200_response_channel_spec.rb +54 -0
  80. data/spec/models/create_contact200_response_contact_spec.rb +90 -0
  81. data/spec/models/create_contact200_response_spec.rb +54 -0
  82. data/spec/models/create_custom_field200_response_spec.rb +42 -0
  83. data/spec/models/get_comment_automation200_response_automation_spec.rb +124 -0
  84. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +82 -0
  85. data/spec/models/get_comment_automation200_response_spec.rb +48 -0
  86. data/spec/models/get_contact200_response_channels_inner_spec.rb +78 -0
  87. data/spec/models/get_contact200_response_contact_spec.rb +108 -0
  88. data/spec/models/get_contact200_response_spec.rb +48 -0
  89. data/spec/models/get_contact_channels200_response_channels_inner_spec.rb +84 -0
  90. data/spec/models/get_contact_channels200_response_spec.rb +42 -0
  91. data/spec/models/list_comment_automation_logs200_response_spec.rb +48 -0
  92. data/spec/models/list_contacts200_response_contacts_inner_spec.rb +138 -0
  93. data/spec/models/{get_broadcast200_response_broadcast_segment_filters_spec.rb → list_contacts200_response_filters_spec.rb} +6 -6
  94. data/spec/models/list_contacts200_response_spec.rb +54 -0
  95. data/spec/models/list_custom_fields200_response_fields_inner_spec.rb +70 -0
  96. data/spec/models/list_custom_fields200_response_spec.rb +42 -0
  97. data/spec/models/threads_platform_data_spec.rb +6 -0
  98. data/spec/models/update_comment_automation200_response_automation_spec.rb +82 -0
  99. data/spec/models/update_comment_automation200_response_spec.rb +42 -0
  100. data/spec/models/update_contact200_response_contact_spec.rb +90 -0
  101. data/spec/models/update_contact200_response_spec.rb +42 -0
  102. data/spec/models/update_custom_field200_response_field_spec.rb +60 -0
  103. data/spec/models/update_custom_field200_response_spec.rb +42 -0
  104. data/zernio-sdk-0.0.80.gem +0 -0
  105. metadata +115 -7
  106. data/zernio-sdk-0.0.78.gem +0 -0
@@ -0,0 +1,176 @@
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 ListContacts200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :contacts
21
+
22
+ attr_accessor :filters
23
+
24
+ attr_accessor :pagination
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'success' => :'success',
30
+ :'contacts' => :'contacts',
31
+ :'filters' => :'filters',
32
+ :'pagination' => :'pagination'
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
+ :'success' => :'Boolean',
50
+ :'contacts' => :'Array<ListContacts200ResponseContactsInner>',
51
+ :'filters' => :'ListContacts200ResponseFilters',
52
+ :'pagination' => :'GetWhatsAppContacts200ResponsePagination'
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::ListContacts200Response` 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::ListContacts200Response`. 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?(:'success')
79
+ self.success = attributes[:'success']
80
+ end
81
+
82
+ if attributes.key?(:'contacts')
83
+ if (value = attributes[:'contacts']).is_a?(Array)
84
+ self.contacts = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'filters')
89
+ self.filters = attributes[:'filters']
90
+ end
91
+
92
+ if attributes.key?(:'pagination')
93
+ self.pagination = attributes[:'pagination']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ success == o.success &&
118
+ contacts == o.contacts &&
119
+ filters == o.filters &&
120
+ pagination == o.pagination
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [success, contacts, filters, pagination].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ if value.nil?
165
+ is_nullable = self.class.openapi_nullable.include?(attr)
166
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
167
+ end
168
+
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ end
175
+
176
+ end
@@ -0,0 +1,302 @@
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 ListContacts200ResponseContactsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :email
23
+
24
+ attr_accessor :company
25
+
26
+ attr_accessor :avatar_url
27
+
28
+ attr_accessor :tags
29
+
30
+ attr_accessor :is_subscribed
31
+
32
+ attr_accessor :is_blocked
33
+
34
+ attr_accessor :last_message_sent_at
35
+
36
+ attr_accessor :last_message_received_at
37
+
38
+ attr_accessor :messages_sent_count
39
+
40
+ attr_accessor :messages_received_count
41
+
42
+ attr_accessor :custom_fields
43
+
44
+ attr_accessor :notes
45
+
46
+ attr_accessor :created_at
47
+
48
+ attr_accessor :platform
49
+
50
+ attr_accessor :platform_identifier
51
+
52
+ attr_accessor :display_identifier
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'id' => :'id',
58
+ :'name' => :'name',
59
+ :'email' => :'email',
60
+ :'company' => :'company',
61
+ :'avatar_url' => :'avatarUrl',
62
+ :'tags' => :'tags',
63
+ :'is_subscribed' => :'isSubscribed',
64
+ :'is_blocked' => :'isBlocked',
65
+ :'last_message_sent_at' => :'lastMessageSentAt',
66
+ :'last_message_received_at' => :'lastMessageReceivedAt',
67
+ :'messages_sent_count' => :'messagesSentCount',
68
+ :'messages_received_count' => :'messagesReceivedCount',
69
+ :'custom_fields' => :'customFields',
70
+ :'notes' => :'notes',
71
+ :'created_at' => :'createdAt',
72
+ :'platform' => :'platform',
73
+ :'platform_identifier' => :'platformIdentifier',
74
+ :'display_identifier' => :'displayIdentifier'
75
+ }
76
+ end
77
+
78
+ # Returns attribute mapping this model knows about
79
+ def self.acceptable_attribute_map
80
+ attribute_map
81
+ end
82
+
83
+ # Returns all the JSON keys this model knows about
84
+ def self.acceptable_attributes
85
+ acceptable_attribute_map.values
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.openapi_types
90
+ {
91
+ :'id' => :'String',
92
+ :'name' => :'String',
93
+ :'email' => :'String',
94
+ :'company' => :'String',
95
+ :'avatar_url' => :'String',
96
+ :'tags' => :'Array<String>',
97
+ :'is_subscribed' => :'Boolean',
98
+ :'is_blocked' => :'Boolean',
99
+ :'last_message_sent_at' => :'Time',
100
+ :'last_message_received_at' => :'Time',
101
+ :'messages_sent_count' => :'Integer',
102
+ :'messages_received_count' => :'Integer',
103
+ :'custom_fields' => :'Object',
104
+ :'notes' => :'String',
105
+ :'created_at' => :'Time',
106
+ :'platform' => :'String',
107
+ :'platform_identifier' => :'String',
108
+ :'display_identifier' => :'String'
109
+ }
110
+ end
111
+
112
+ # List of attributes with nullable: true
113
+ def self.openapi_nullable
114
+ Set.new([
115
+ ])
116
+ end
117
+
118
+ # Initializes the object
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ def initialize(attributes = {})
121
+ if (!attributes.is_a?(Hash))
122
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListContacts200ResponseContactsInner` initialize method"
123
+ end
124
+
125
+ # check to see if the attribute exists and convert string to symbol for hash key
126
+ acceptable_attribute_map = self.class.acceptable_attribute_map
127
+ attributes = attributes.each_with_object({}) { |(k, v), h|
128
+ if (!acceptable_attribute_map.key?(k.to_sym))
129
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListContacts200ResponseContactsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
130
+ end
131
+ h[k.to_sym] = v
132
+ }
133
+
134
+ if attributes.key?(:'id')
135
+ self.id = attributes[:'id']
136
+ end
137
+
138
+ if attributes.key?(:'name')
139
+ self.name = attributes[:'name']
140
+ end
141
+
142
+ if attributes.key?(:'email')
143
+ self.email = attributes[:'email']
144
+ end
145
+
146
+ if attributes.key?(:'company')
147
+ self.company = attributes[:'company']
148
+ end
149
+
150
+ if attributes.key?(:'avatar_url')
151
+ self.avatar_url = attributes[:'avatar_url']
152
+ end
153
+
154
+ if attributes.key?(:'tags')
155
+ if (value = attributes[:'tags']).is_a?(Array)
156
+ self.tags = value
157
+ end
158
+ end
159
+
160
+ if attributes.key?(:'is_subscribed')
161
+ self.is_subscribed = attributes[:'is_subscribed']
162
+ end
163
+
164
+ if attributes.key?(:'is_blocked')
165
+ self.is_blocked = attributes[:'is_blocked']
166
+ end
167
+
168
+ if attributes.key?(:'last_message_sent_at')
169
+ self.last_message_sent_at = attributes[:'last_message_sent_at']
170
+ end
171
+
172
+ if attributes.key?(:'last_message_received_at')
173
+ self.last_message_received_at = attributes[:'last_message_received_at']
174
+ end
175
+
176
+ if attributes.key?(:'messages_sent_count')
177
+ self.messages_sent_count = attributes[:'messages_sent_count']
178
+ end
179
+
180
+ if attributes.key?(:'messages_received_count')
181
+ self.messages_received_count = attributes[:'messages_received_count']
182
+ end
183
+
184
+ if attributes.key?(:'custom_fields')
185
+ self.custom_fields = attributes[:'custom_fields']
186
+ end
187
+
188
+ if attributes.key?(:'notes')
189
+ self.notes = attributes[:'notes']
190
+ end
191
+
192
+ if attributes.key?(:'created_at')
193
+ self.created_at = attributes[:'created_at']
194
+ end
195
+
196
+ if attributes.key?(:'platform')
197
+ self.platform = attributes[:'platform']
198
+ end
199
+
200
+ if attributes.key?(:'platform_identifier')
201
+ self.platform_identifier = attributes[:'platform_identifier']
202
+ end
203
+
204
+ if attributes.key?(:'display_identifier')
205
+ self.display_identifier = attributes[:'display_identifier']
206
+ end
207
+ end
208
+
209
+ # Show invalid properties with the reasons. Usually used together with valid?
210
+ # @return Array for valid properties with the reasons
211
+ def list_invalid_properties
212
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
213
+ invalid_properties = Array.new
214
+ invalid_properties
215
+ end
216
+
217
+ # Check to see if the all the properties in the model are valid
218
+ # @return true if the model is valid
219
+ def valid?
220
+ warn '[DEPRECATED] the `valid?` method is obsolete'
221
+ true
222
+ end
223
+
224
+ # Checks equality by comparing each attribute.
225
+ # @param [Object] Object to be compared
226
+ def ==(o)
227
+ return true if self.equal?(o)
228
+ self.class == o.class &&
229
+ id == o.id &&
230
+ name == o.name &&
231
+ email == o.email &&
232
+ company == o.company &&
233
+ avatar_url == o.avatar_url &&
234
+ tags == o.tags &&
235
+ is_subscribed == o.is_subscribed &&
236
+ is_blocked == o.is_blocked &&
237
+ last_message_sent_at == o.last_message_sent_at &&
238
+ last_message_received_at == o.last_message_received_at &&
239
+ messages_sent_count == o.messages_sent_count &&
240
+ messages_received_count == o.messages_received_count &&
241
+ custom_fields == o.custom_fields &&
242
+ notes == o.notes &&
243
+ created_at == o.created_at &&
244
+ platform == o.platform &&
245
+ platform_identifier == o.platform_identifier &&
246
+ display_identifier == o.display_identifier
247
+ end
248
+
249
+ # @see the `==` method
250
+ # @param [Object] Object to be compared
251
+ def eql?(o)
252
+ self == o
253
+ end
254
+
255
+ # Calculates hash code according to all attributes.
256
+ # @return [Integer] Hash code
257
+ def hash
258
+ [id, name, email, company, avatar_url, tags, is_subscribed, is_blocked, last_message_sent_at, last_message_received_at, messages_sent_count, messages_received_count, custom_fields, notes, created_at, platform, platform_identifier, display_identifier].hash
259
+ end
260
+
261
+ # Builds the object from hash
262
+ # @param [Hash] attributes Model attributes in the form of hash
263
+ # @return [Object] Returns the model itself
264
+ def self.build_from_hash(attributes)
265
+ return nil unless attributes.is_a?(Hash)
266
+ attributes = attributes.transform_keys(&:to_sym)
267
+ transformed_hash = {}
268
+ openapi_types.each_pair do |key, type|
269
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
270
+ transformed_hash["#{key}"] = nil
271
+ elsif type =~ /\AArray<(.*)>/i
272
+ # check to ensure the input is an array given that the attribute
273
+ # is documented as an array but the input is not
274
+ if attributes[attribute_map[key]].is_a?(Array)
275
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
276
+ end
277
+ elsif !attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
279
+ end
280
+ end
281
+ new(transformed_hash)
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ end
301
+
302
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Late
17
- class GetBroadcast200ResponseBroadcastSegmentFilters < ApiModelBase
17
+ class ListContacts200ResponseFilters < ApiModelBase
18
18
  attr_accessor :tags
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::GetBroadcast200ResponseBroadcastSegmentFilters` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListContacts200ResponseFilters` 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::GetBroadcast200ResponseBroadcastSegmentFilters`. 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::ListContacts200ResponseFilters`. 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,158 @@
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 ListCustomFields200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :fields
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'fields' => :'fields'
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
+ :'fields' => :'Array<ListCustomFields200ResponseFieldsInner>'
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::ListCustomFields200Response` 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::ListCustomFields200Response`. 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?(:'fields')
75
+ if (value = attributes[:'fields']).is_a?(Array)
76
+ self.fields = value
77
+ end
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ success == o.success &&
102
+ fields == o.fields
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [success, fields].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end