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