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,244 @@
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 GetCommentAutomation200ResponseLogsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :comment_id
21
+
22
+ attr_accessor :commenter_id
23
+
24
+ attr_accessor :commenter_name
25
+
26
+ attr_accessor :comment_text
27
+
28
+ attr_accessor :status
29
+
30
+ attr_accessor :error
31
+
32
+ attr_accessor :created_at
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
+ :'id' => :'id',
60
+ :'comment_id' => :'commentId',
61
+ :'commenter_id' => :'commenterId',
62
+ :'commenter_name' => :'commenterName',
63
+ :'comment_text' => :'commentText',
64
+ :'status' => :'status',
65
+ :'error' => :'error',
66
+ :'created_at' => :'createdAt'
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
+ :'id' => :'String',
84
+ :'comment_id' => :'String',
85
+ :'commenter_id' => :'String',
86
+ :'commenter_name' => :'String',
87
+ :'comment_text' => :'String',
88
+ :'status' => :'String',
89
+ :'error' => :'String',
90
+ :'created_at' => :'Time'
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::GetCommentAutomation200ResponseLogsInner` 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::GetCommentAutomation200ResponseLogsInner`. 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?(:'id')
117
+ self.id = attributes[:'id']
118
+ end
119
+
120
+ if attributes.key?(:'comment_id')
121
+ self.comment_id = attributes[:'comment_id']
122
+ end
123
+
124
+ if attributes.key?(:'commenter_id')
125
+ self.commenter_id = attributes[:'commenter_id']
126
+ end
127
+
128
+ if attributes.key?(:'commenter_name')
129
+ self.commenter_name = attributes[:'commenter_name']
130
+ end
131
+
132
+ if attributes.key?(:'comment_text')
133
+ self.comment_text = attributes[:'comment_text']
134
+ end
135
+
136
+ if attributes.key?(:'status')
137
+ self.status = attributes[:'status']
138
+ end
139
+
140
+ if attributes.key?(:'error')
141
+ self.error = attributes[:'error']
142
+ end
143
+
144
+ if attributes.key?(:'created_at')
145
+ self.created_at = attributes[:'created_at']
146
+ end
147
+ end
148
+
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properties with the reasons
151
+ def list_invalid_properties
152
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
153
+ invalid_properties = Array.new
154
+ invalid_properties
155
+ end
156
+
157
+ # Check to see if the all the properties in the model are valid
158
+ # @return true if the model is valid
159
+ def valid?
160
+ warn '[DEPRECATED] the `valid?` method is obsolete'
161
+ status_validator = EnumAttributeValidator.new('String', ["sent", "failed", "skipped"])
162
+ return false unless status_validator.valid?(@status)
163
+ true
164
+ end
165
+
166
+ # Custom attribute writer method checking allowed values (enum).
167
+ # @param [Object] status Object to be assigned
168
+ def status=(status)
169
+ validator = EnumAttributeValidator.new('String', ["sent", "failed", "skipped"])
170
+ unless validator.valid?(status)
171
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
172
+ end
173
+ @status = status
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(o)
179
+ return true if self.equal?(o)
180
+ self.class == o.class &&
181
+ id == o.id &&
182
+ comment_id == o.comment_id &&
183
+ commenter_id == o.commenter_id &&
184
+ commenter_name == o.commenter_name &&
185
+ comment_text == o.comment_text &&
186
+ status == o.status &&
187
+ error == o.error &&
188
+ created_at == o.created_at
189
+ end
190
+
191
+ # @see the `==` method
192
+ # @param [Object] Object to be compared
193
+ def eql?(o)
194
+ self == o
195
+ end
196
+
197
+ # Calculates hash code according to all attributes.
198
+ # @return [Integer] Hash code
199
+ def hash
200
+ [id, comment_id, commenter_id, commenter_name, comment_text, status, error, created_at].hash
201
+ end
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def self.build_from_hash(attributes)
207
+ return nil unless attributes.is_a?(Hash)
208
+ attributes = attributes.transform_keys(&:to_sym)
209
+ transformed_hash = {}
210
+ openapi_types.each_pair do |key, type|
211
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = nil
213
+ elsif type =~ /\AArray<(.*)>/i
214
+ # check to ensure the input is an array given that the attribute
215
+ # is documented as an array but the input is not
216
+ if attributes[attribute_map[key]].is_a?(Array)
217
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
218
+ end
219
+ elsif !attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
221
+ end
222
+ end
223
+ new(transformed_hash)
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ if value.nil?
233
+ is_nullable = self.class.openapi_nullable.include?(attr)
234
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
+ end
236
+
237
+ hash[param] = _to_hash(value)
238
+ end
239
+ hash
240
+ end
241
+
242
+ end
243
+
244
+ end
@@ -0,0 +1,167 @@
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 GetContact200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :contact
21
+
22
+ attr_accessor :channels
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'success' => :'success',
28
+ :'contact' => :'contact',
29
+ :'channels' => :'channels'
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
+ :'success' => :'Boolean',
47
+ :'contact' => :'GetContact200ResponseContact',
48
+ :'channels' => :'Array<GetContact200ResponseChannelsInner>'
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::GetContact200Response` 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::GetContact200Response`. 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?(:'success')
75
+ self.success = attributes[:'success']
76
+ end
77
+
78
+ if attributes.key?(:'contact')
79
+ self.contact = attributes[:'contact']
80
+ end
81
+
82
+ if attributes.key?(:'channels')
83
+ if (value = attributes[:'channels']).is_a?(Array)
84
+ self.channels = value
85
+ end
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ success == o.success &&
110
+ contact == o.contact &&
111
+ channels == o.channels
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [success, contact, channels].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end
@@ -0,0 +1,210 @@
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 GetContact200ResponseChannelsInner < 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 :created_at
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'id' => :'id',
38
+ :'account_id' => :'accountId',
39
+ :'platform' => :'platform',
40
+ :'platform_identifier' => :'platformIdentifier',
41
+ :'display_identifier' => :'displayIdentifier',
42
+ :'is_subscribed' => :'isSubscribed',
43
+ :'conversation_id' => :'conversationId',
44
+ :'created_at' => :'createdAt'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'id' => :'String',
62
+ :'account_id' => :'String',
63
+ :'platform' => :'String',
64
+ :'platform_identifier' => :'String',
65
+ :'display_identifier' => :'String',
66
+ :'is_subscribed' => :'Boolean',
67
+ :'conversation_id' => :'String',
68
+ :'created_at' => :'Time'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetContact200ResponseChannelsInner` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetContact200ResponseChannelsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'id')
95
+ self.id = attributes[:'id']
96
+ end
97
+
98
+ if attributes.key?(:'account_id')
99
+ self.account_id = attributes[:'account_id']
100
+ end
101
+
102
+ if attributes.key?(:'platform')
103
+ self.platform = attributes[:'platform']
104
+ end
105
+
106
+ if attributes.key?(:'platform_identifier')
107
+ self.platform_identifier = attributes[:'platform_identifier']
108
+ end
109
+
110
+ if attributes.key?(:'display_identifier')
111
+ self.display_identifier = attributes[:'display_identifier']
112
+ end
113
+
114
+ if attributes.key?(:'is_subscribed')
115
+ self.is_subscribed = attributes[:'is_subscribed']
116
+ end
117
+
118
+ if attributes.key?(:'conversation_id')
119
+ self.conversation_id = attributes[:'conversation_id']
120
+ end
121
+
122
+ if attributes.key?(:'created_at')
123
+ self.created_at = attributes[:'created_at']
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
131
+ invalid_properties = Array.new
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ true
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ id == o.id &&
148
+ account_id == o.account_id &&
149
+ platform == o.platform &&
150
+ platform_identifier == o.platform_identifier &&
151
+ display_identifier == o.display_identifier &&
152
+ is_subscribed == o.is_subscribed &&
153
+ conversation_id == o.conversation_id &&
154
+ created_at == o.created_at
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [id, account_id, platform, platform_identifier, display_identifier, is_subscribed, conversation_id, created_at].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ attributes = attributes.transform_keys(&:to_sym)
175
+ transformed_hash = {}
176
+ openapi_types.each_pair do |key, type|
177
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = nil
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[attribute_map[key]].is_a?(Array)
183
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
+ end
185
+ elsif !attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
+ end
188
+ end
189
+ new(transformed_hash)
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ end
209
+
210
+ end