late-sdk 0.0.78 → 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 (103) 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/UpdateCommentAutomation200Response.md +20 -0
  30. data/docs/UpdateCommentAutomation200ResponseAutomation.md +32 -0
  31. data/docs/UpdateContact200Response.md +20 -0
  32. data/docs/UpdateContact200ResponseContact.md +36 -0
  33. data/docs/UpdateCustomField200Response.md +20 -0
  34. data/docs/UpdateCustomField200ResponseField.md +26 -0
  35. data/lib/late-sdk/api/comment_automations_api.rb +20 -20
  36. data/lib/late-sdk/api/contacts_api.rb +30 -30
  37. data/lib/late-sdk/api/custom_fields_api.rb +15 -15
  38. data/lib/late-sdk/models/bulk_create_contacts200_response.rb +185 -0
  39. data/lib/late-sdk/models/create_comment_automation200_response.rb +156 -0
  40. data/lib/late-sdk/models/create_comment_automation200_response_automation.rb +273 -0
  41. data/lib/late-sdk/models/create_comment_automation200_response_automation_stats.rb +165 -0
  42. data/lib/late-sdk/models/create_contact200_response.rb +174 -0
  43. data/lib/late-sdk/models/create_contact200_response_channel.rb +175 -0
  44. data/lib/late-sdk/models/create_contact200_response_contact.rb +230 -0
  45. data/lib/late-sdk/models/create_custom_field200_response.rb +156 -0
  46. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +1 -1
  47. data/lib/late-sdk/models/get_comment_automation200_response.rb +167 -0
  48. data/lib/late-sdk/models/get_comment_automation200_response_automation.rb +309 -0
  49. data/lib/late-sdk/models/get_comment_automation200_response_logs_inner.rb +244 -0
  50. data/lib/late-sdk/models/get_contact200_response.rb +167 -0
  51. data/lib/late-sdk/models/get_contact200_response_channels_inner.rb +210 -0
  52. data/lib/late-sdk/models/get_contact200_response_contact.rb +259 -0
  53. data/lib/late-sdk/models/get_contact_channels200_response.rb +158 -0
  54. data/lib/late-sdk/models/get_contact_channels200_response_channels_inner.rb +219 -0
  55. data/lib/late-sdk/models/list_comment_automation_logs200_response.rb +167 -0
  56. data/lib/late-sdk/models/list_contacts200_response.rb +176 -0
  57. data/lib/late-sdk/models/list_contacts200_response_contacts_inner.rb +302 -0
  58. data/lib/late-sdk/models/{get_broadcast200_response_broadcast_segment_filters.rb → list_contacts200_response_filters.rb} +3 -3
  59. data/lib/late-sdk/models/list_custom_fields200_response.rb +158 -0
  60. data/lib/late-sdk/models/list_custom_fields200_response_fields_inner.rb +228 -0
  61. data/lib/late-sdk/models/update_comment_automation200_response.rb +156 -0
  62. data/lib/late-sdk/models/update_comment_automation200_response_automation.rb +246 -0
  63. data/lib/late-sdk/models/update_contact200_response.rb +156 -0
  64. data/lib/late-sdk/models/update_contact200_response_contact.rb +230 -0
  65. data/lib/late-sdk/models/update_custom_field200_response.rb +156 -0
  66. data/lib/late-sdk/models/update_custom_field200_response_field.rb +185 -0
  67. data/lib/late-sdk/version.rb +1 -1
  68. data/lib/late-sdk.rb +28 -1
  69. data/openapi.yaml +324 -13
  70. data/spec/api/comment_automations_api_spec.rb +4 -4
  71. data/spec/api/contacts_api_spec.rb +6 -6
  72. data/spec/api/custom_fields_api_spec.rb +3 -3
  73. data/spec/models/bulk_create_contacts200_response_spec.rb +60 -0
  74. data/spec/models/create_comment_automation200_response_automation_spec.rb +100 -0
  75. data/spec/models/create_comment_automation200_response_automation_stats_spec.rb +48 -0
  76. data/spec/models/create_comment_automation200_response_spec.rb +42 -0
  77. data/spec/models/create_contact200_response_channel_spec.rb +54 -0
  78. data/spec/models/create_contact200_response_contact_spec.rb +90 -0
  79. data/spec/models/create_contact200_response_spec.rb +54 -0
  80. data/spec/models/create_custom_field200_response_spec.rb +42 -0
  81. data/spec/models/get_comment_automation200_response_automation_spec.rb +124 -0
  82. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +82 -0
  83. data/spec/models/get_comment_automation200_response_spec.rb +48 -0
  84. data/spec/models/get_contact200_response_channels_inner_spec.rb +78 -0
  85. data/spec/models/get_contact200_response_contact_spec.rb +108 -0
  86. data/spec/models/get_contact200_response_spec.rb +48 -0
  87. data/spec/models/get_contact_channels200_response_channels_inner_spec.rb +84 -0
  88. data/spec/models/get_contact_channels200_response_spec.rb +42 -0
  89. data/spec/models/list_comment_automation_logs200_response_spec.rb +48 -0
  90. data/spec/models/list_contacts200_response_contacts_inner_spec.rb +138 -0
  91. data/spec/models/{get_broadcast200_response_broadcast_segment_filters_spec.rb → list_contacts200_response_filters_spec.rb} +6 -6
  92. data/spec/models/list_contacts200_response_spec.rb +54 -0
  93. data/spec/models/list_custom_fields200_response_fields_inner_spec.rb +70 -0
  94. data/spec/models/list_custom_fields200_response_spec.rb +42 -0
  95. data/spec/models/update_comment_automation200_response_automation_spec.rb +82 -0
  96. data/spec/models/update_comment_automation200_response_spec.rb +42 -0
  97. data/spec/models/update_contact200_response_contact_spec.rb +90 -0
  98. data/spec/models/update_contact200_response_spec.rb +42 -0
  99. data/spec/models/update_custom_field200_response_field_spec.rb +60 -0
  100. data/spec/models/update_custom_field200_response_spec.rb +42 -0
  101. data/zernio-sdk-0.0.79.gem +0 -0
  102. metadata +114 -6
  103. data/zernio-sdk-0.0.78.gem +0 -0
@@ -0,0 +1,228 @@
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 ListCustomFields200ResponseFieldsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :slug
23
+
24
+ attr_accessor :type
25
+
26
+ attr_accessor :options
27
+
28
+ attr_accessor :created_at
29
+
30
+ class EnumAttributeValidator
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
33
+
34
+ def initialize(datatype, allowable_values)
35
+ @allowable_values = allowable_values.map do |value|
36
+ case datatype.to_s
37
+ when /Integer/i
38
+ value.to_i
39
+ when /Float/i
40
+ value.to_f
41
+ else
42
+ value
43
+ end
44
+ end
45
+ end
46
+
47
+ def valid?(value)
48
+ !value || allowable_values.include?(value)
49
+ end
50
+ end
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'id' => :'id',
56
+ :'name' => :'name',
57
+ :'slug' => :'slug',
58
+ :'type' => :'type',
59
+ :'options' => :'options',
60
+ :'created_at' => :'createdAt'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'id' => :'String',
78
+ :'name' => :'String',
79
+ :'slug' => :'String',
80
+ :'type' => :'String',
81
+ :'options' => :'Array<String>',
82
+ :'created_at' => :'Time'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListCustomFields200ResponseFieldsInner` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ acceptable_attribute_map = self.class.acceptable_attribute_map
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!acceptable_attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListCustomFields200ResponseFieldsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'id')
109
+ self.id = attributes[:'id']
110
+ end
111
+
112
+ if attributes.key?(:'name')
113
+ self.name = attributes[:'name']
114
+ end
115
+
116
+ if attributes.key?(:'slug')
117
+ self.slug = attributes[:'slug']
118
+ end
119
+
120
+ if attributes.key?(:'type')
121
+ self.type = attributes[:'type']
122
+ end
123
+
124
+ if attributes.key?(:'options')
125
+ if (value = attributes[:'options']).is_a?(Array)
126
+ self.options = value
127
+ end
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
+ type_validator = EnumAttributeValidator.new('String', ["text", "number", "date", "boolean", "select"])
148
+ return false unless type_validator.valid?(@type)
149
+ true
150
+ end
151
+
152
+ # Custom attribute writer method checking allowed values (enum).
153
+ # @param [Object] type Object to be assigned
154
+ def type=(type)
155
+ validator = EnumAttributeValidator.new('String', ["text", "number", "date", "boolean", "select"])
156
+ unless validator.valid?(type)
157
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
158
+ end
159
+ @type = type
160
+ end
161
+
162
+ # Checks equality by comparing each attribute.
163
+ # @param [Object] Object to be compared
164
+ def ==(o)
165
+ return true if self.equal?(o)
166
+ self.class == o.class &&
167
+ id == o.id &&
168
+ name == o.name &&
169
+ slug == o.slug &&
170
+ type == o.type &&
171
+ options == o.options &&
172
+ created_at == o.created_at
173
+ end
174
+
175
+ # @see the `==` method
176
+ # @param [Object] Object to be compared
177
+ def eql?(o)
178
+ self == o
179
+ end
180
+
181
+ # Calculates hash code according to all attributes.
182
+ # @return [Integer] Hash code
183
+ def hash
184
+ [id, name, slug, type, options, created_at].hash
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def self.build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ attributes = attributes.transform_keys(&:to_sym)
193
+ transformed_hash = {}
194
+ openapi_types.each_pair do |key, type|
195
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = nil
197
+ elsif type =~ /\AArray<(.*)>/i
198
+ # check to ensure the input is an array given that the attribute
199
+ # is documented as an array but the input is not
200
+ if attributes[attribute_map[key]].is_a?(Array)
201
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
202
+ end
203
+ elsif !attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
205
+ end
206
+ end
207
+ new(transformed_hash)
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ end
227
+
228
+ 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 UpdateCommentAutomation200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :automation
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'automation' => :'automation'
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
+ :'automation' => :'UpdateCommentAutomation200ResponseAutomation'
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::UpdateCommentAutomation200Response` 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::UpdateCommentAutomation200Response`. 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?(:'automation')
75
+ self.automation = attributes[:'automation']
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
+ automation == o.automation
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, automation].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,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