late-sdk 0.0.77 → 0.0.79

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