late-sdk 0.0.790 → 0.0.792

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/docs/DeleteWhatsAppTemplate200Response.md +24 -0
  4. data/docs/DeleteWhatsAppTemplateById200Response.md +24 -0
  5. data/docs/GetWhatsAppTemplate200ResponseTemplate.md +7 -3
  6. data/docs/GetWhatsAppTemplate409Response.md +26 -0
  7. data/docs/GetWhatsAppTemplate409ResponseDetails.md +18 -0
  8. data/docs/LinkedInMentionsApi.md +1 -1
  9. data/docs/UpdateWhatsAppTemplate200ResponseTemplate.md +3 -1
  10. data/docs/UpdateWhatsAppTemplateById200Response.md +20 -0
  11. data/docs/UpdateWhatsAppTemplateById200ResponseTemplate.md +24 -0
  12. data/docs/UpdateWhatsAppTemplateByIdRequest.md +20 -0
  13. data/docs/UpdateWhatsAppTemplateRequest.md +2 -0
  14. data/docs/WhatsAppApi.md +256 -24
  15. data/lib/zernio-sdk/api/linked_in_mentions_api.rb +2 -2
  16. data/lib/zernio-sdk/api/whats_app_api.rb +250 -17
  17. data/lib/zernio-sdk/models/delete_whats_app_template200_response.rb +210 -0
  18. data/lib/zernio-sdk/models/delete_whats_app_template_by_id200_response.rb +208 -0
  19. data/lib/zernio-sdk/models/get_whats_app_template200_response_template.rb +26 -4
  20. data/lib/zernio-sdk/models/get_whats_app_template409_response.rb +241 -0
  21. data/lib/zernio-sdk/models/get_whats_app_template409_response_details.rb +149 -0
  22. data/lib/zernio-sdk/models/update_whats_app_template200_response_template.rb +12 -1
  23. data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response.rb +156 -0
  24. data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response_template.rb +175 -0
  25. data/lib/zernio-sdk/models/update_whats_app_template_by_id_request.rb +203 -0
  26. data/lib/zernio-sdk/models/update_whats_app_template_request.rb +11 -1
  27. data/lib/zernio-sdk/version.rb +1 -1
  28. data/lib/zernio-sdk.rb +7 -0
  29. data/openapi.yaml +288 -36
  30. data/spec/api/linked_in_mentions_api_spec.rb +1 -1
  31. data/spec/api/whats_app_api_spec.rb +52 -8
  32. data/spec/models/delete_whats_app_template200_response_spec.rb +58 -0
  33. data/spec/models/delete_whats_app_template_by_id200_response_spec.rb +58 -0
  34. data/spec/models/get_whats_app_template200_response_template_spec.rb +12 -0
  35. data/spec/models/get_whats_app_template409_response_details_spec.rb +36 -0
  36. data/spec/models/get_whats_app_template409_response_spec.rb +72 -0
  37. data/spec/models/update_whats_app_template200_response_template_spec.rb +6 -0
  38. data/spec/models/update_whats_app_template_by_id200_response_spec.rb +42 -0
  39. data/spec/models/update_whats_app_template_by_id200_response_template_spec.rb +54 -0
  40. data/spec/models/update_whats_app_template_by_id_request_spec.rb +42 -0
  41. data/spec/models/update_whats_app_template_request_spec.rb +6 -0
  42. data/zernio-sdk-0.0.792.gem +0 -0
  43. metadata +31 -3
  44. data/zernio-sdk-0.0.790.gem +0 -0
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
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 Zernio
17
+ class DeleteWhatsAppTemplateById200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :scope
21
+
22
+ attr_accessor :language
23
+
24
+ attr_accessor :message
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'success' => :'success',
52
+ :'scope' => :'scope',
53
+ :'language' => :'language',
54
+ :'message' => :'message'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'success' => :'Boolean',
72
+ :'scope' => :'String',
73
+ :'language' => :'String',
74
+ :'message' => :'String'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteWhatsAppTemplateById200Response` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteWhatsAppTemplateById200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'success')
101
+ self.success = attributes[:'success']
102
+ end
103
+
104
+ if attributes.key?(:'scope')
105
+ self.scope = attributes[:'scope']
106
+ end
107
+
108
+ if attributes.key?(:'language')
109
+ self.language = attributes[:'language']
110
+ end
111
+
112
+ if attributes.key?(:'message')
113
+ self.message = attributes[:'message']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
+ invalid_properties = Array.new
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ scope_validator = EnumAttributeValidator.new('String', ["language"])
130
+ return false unless scope_validator.valid?(@scope)
131
+ true
132
+ end
133
+
134
+ # Custom attribute writer method checking allowed values (enum).
135
+ # @param [Object] scope Object to be assigned
136
+ def scope=(scope)
137
+ validator = EnumAttributeValidator.new('String', ["language"])
138
+ unless validator.valid?(scope)
139
+ fail ArgumentError, "invalid value for \"scope\", must be one of #{validator.allowable_values}."
140
+ end
141
+ @scope = scope
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ success == o.success &&
150
+ scope == o.scope &&
151
+ language == o.language &&
152
+ message == o.message
153
+ end
154
+
155
+ # @see the `==` method
156
+ # @param [Object] Object to be compared
157
+ def eql?(o)
158
+ self == o
159
+ end
160
+
161
+ # Calculates hash code according to all attributes.
162
+ # @return [Integer] Hash code
163
+ def hash
164
+ [success, scope, language, message].hash
165
+ end
166
+
167
+ # Builds the object from hash
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ # @return [Object] Returns the model itself
170
+ def self.build_from_hash(attributes)
171
+ return nil unless attributes.is_a?(Hash)
172
+ attributes = attributes.transform_keys(&:to_sym)
173
+ transformed_hash = {}
174
+ openapi_types.each_pair do |key, type|
175
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = nil
177
+ elsif type =~ /\AArray<(.*)>/i
178
+ # check to ensure the input is an array given that the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[attribute_map[key]].is_a?(Array)
181
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
182
+ end
183
+ elsif !attributes[attribute_map[key]].nil?
184
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
185
+ end
186
+ end
187
+ new(transformed_hash)
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ end
207
+
208
+ end
@@ -15,6 +15,7 @@ require 'time'
15
15
 
16
16
  module Zernio
17
17
  class GetWhatsAppTemplate200ResponseTemplate < ApiModelBase
18
+ # Meta template id. Unique per language variant; usable on /v1/whatsapp/templates/id/{templateId}.
18
19
  attr_accessor :id
19
20
 
20
21
  attr_accessor :name
@@ -23,10 +24,17 @@ module Zernio
23
24
 
24
25
  attr_accessor :category
25
26
 
27
+ # The variant actually returned.
26
28
  attr_accessor :language
27
29
 
28
30
  attr_accessor :components
29
31
 
32
+ # Only when status is REJECTED.
33
+ attr_accessor :rejected_reason
34
+
35
+ # Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.
36
+ attr_accessor :quality_score
37
+
30
38
  # Attribute mapping from ruby-style variable name to JSON key.
31
39
  def self.attribute_map
32
40
  {
@@ -35,7 +43,9 @@ module Zernio
35
43
  :'status' => :'status',
36
44
  :'category' => :'category',
37
45
  :'language' => :'language',
38
- :'components' => :'components'
46
+ :'components' => :'components',
47
+ :'rejected_reason' => :'rejected_reason',
48
+ :'quality_score' => :'quality_score'
39
49
  }
40
50
  end
41
51
 
@@ -57,7 +67,9 @@ module Zernio
57
67
  :'status' => :'String',
58
68
  :'category' => :'String',
59
69
  :'language' => :'String',
60
- :'components' => :'Array<Object>'
70
+ :'components' => :'Array<Object>',
71
+ :'rejected_reason' => :'String',
72
+ :'quality_score' => :'Object'
61
73
  }
62
74
  end
63
75
 
@@ -108,6 +120,14 @@ module Zernio
108
120
  self.components = value
109
121
  end
110
122
  end
123
+
124
+ if attributes.key?(:'rejected_reason')
125
+ self.rejected_reason = attributes[:'rejected_reason']
126
+ end
127
+
128
+ if attributes.key?(:'quality_score')
129
+ self.quality_score = attributes[:'quality_score']
130
+ end
111
131
  end
112
132
 
113
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -135,7 +155,9 @@ module Zernio
135
155
  status == o.status &&
136
156
  category == o.category &&
137
157
  language == o.language &&
138
- components == o.components
158
+ components == o.components &&
159
+ rejected_reason == o.rejected_reason &&
160
+ quality_score == o.quality_score
139
161
  end
140
162
 
141
163
  # @see the `==` method
@@ -147,7 +169,7 @@ module Zernio
147
169
  # Calculates hash code according to all attributes.
148
170
  # @return [Integer] Hash code
149
171
  def hash
150
- [id, name, status, category, language, components].hash
172
+ [id, name, status, category, language, components, rejected_reason, quality_score].hash
151
173
  end
152
174
 
153
175
  # Builds the object from hash
@@ -0,0 +1,241 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
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 Zernio
17
+ class GetWhatsAppTemplate409Response < ApiModelBase
18
+ attr_accessor :error
19
+
20
+ attr_accessor :type
21
+
22
+ attr_accessor :code
23
+
24
+ attr_accessor :param
25
+
26
+ attr_accessor :details
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'error' => :'error',
54
+ :'type' => :'type',
55
+ :'code' => :'code',
56
+ :'param' => :'param',
57
+ :'details' => :'details'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'error' => :'String',
75
+ :'type' => :'String',
76
+ :'code' => :'String',
77
+ :'param' => :'String',
78
+ :'details' => :'GetWhatsAppTemplate409ResponseDetails'
79
+ }
80
+ end
81
+
82
+ # List of attributes with nullable: true
83
+ def self.openapi_nullable
84
+ Set.new([
85
+ ])
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ def initialize(attributes = {})
91
+ if (!attributes.is_a?(Hash))
92
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetWhatsAppTemplate409Response` initialize method"
93
+ end
94
+
95
+ # check to see if the attribute exists and convert string to symbol for hash key
96
+ acceptable_attribute_map = self.class.acceptable_attribute_map
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!acceptable_attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetWhatsAppTemplate409Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'error')
105
+ self.error = attributes[:'error']
106
+ end
107
+
108
+ if attributes.key?(:'type')
109
+ self.type = attributes[:'type']
110
+ end
111
+
112
+ if attributes.key?(:'code')
113
+ self.code = attributes[:'code']
114
+ end
115
+
116
+ if attributes.key?(:'param')
117
+ self.param = attributes[:'param']
118
+ end
119
+
120
+ if attributes.key?(:'details')
121
+ self.details = attributes[:'details']
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
+ invalid_properties = Array.new
130
+ invalid_properties
131
+ end
132
+
133
+ # Check to see if the all the properties in the model are valid
134
+ # @return true if the model is valid
135
+ def valid?
136
+ warn '[DEPRECATED] the `valid?` method is obsolete'
137
+ type_validator = EnumAttributeValidator.new('String', ["invalid_request_error"])
138
+ return false unless type_validator.valid?(@type)
139
+ code_validator = EnumAttributeValidator.new('String', ["ambiguous_template"])
140
+ return false unless code_validator.valid?(@code)
141
+ param_validator = EnumAttributeValidator.new('String', ["language"])
142
+ return false unless param_validator.valid?(@param)
143
+ true
144
+ end
145
+
146
+ # Custom attribute writer method checking allowed values (enum).
147
+ # @param [Object] type Object to be assigned
148
+ def type=(type)
149
+ validator = EnumAttributeValidator.new('String', ["invalid_request_error"])
150
+ unless validator.valid?(type)
151
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
152
+ end
153
+ @type = type
154
+ end
155
+
156
+ # Custom attribute writer method checking allowed values (enum).
157
+ # @param [Object] code Object to be assigned
158
+ def code=(code)
159
+ validator = EnumAttributeValidator.new('String', ["ambiguous_template"])
160
+ unless validator.valid?(code)
161
+ fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
162
+ end
163
+ @code = code
164
+ end
165
+
166
+ # Custom attribute writer method checking allowed values (enum).
167
+ # @param [Object] param Object to be assigned
168
+ def param=(param)
169
+ validator = EnumAttributeValidator.new('String', ["language"])
170
+ unless validator.valid?(param)
171
+ fail ArgumentError, "invalid value for \"param\", must be one of #{validator.allowable_values}."
172
+ end
173
+ @param = param
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
+ error == o.error &&
182
+ type == o.type &&
183
+ code == o.code &&
184
+ param == o.param &&
185
+ details == o.details
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(o)
191
+ self == o
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Integer] Hash code
196
+ def hash
197
+ [error, type, code, param, details].hash
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def self.build_from_hash(attributes)
204
+ return nil unless attributes.is_a?(Hash)
205
+ attributes = attributes.transform_keys(&:to_sym)
206
+ transformed_hash = {}
207
+ openapi_types.each_pair do |key, type|
208
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
209
+ transformed_hash["#{key}"] = nil
210
+ elsif type =~ /\AArray<(.*)>/i
211
+ # check to ensure the input is an array given that the attribute
212
+ # is documented as an array but the input is not
213
+ if attributes[attribute_map[key]].is_a?(Array)
214
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
215
+ end
216
+ elsif !attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
218
+ end
219
+ end
220
+ new(transformed_hash)
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -0,0 +1,149 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
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 Zernio
17
+ class GetWhatsAppTemplate409ResponseDetails < ApiModelBase
18
+ attr_accessor :languages
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'languages' => :'languages'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'languages' => :'Array<String>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetWhatsAppTemplate409ResponseDetails` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetWhatsAppTemplate409ResponseDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'languages')
67
+ if (value = attributes[:'languages']).is_a?(Array)
68
+ self.languages = value
69
+ end
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ languages == o.languages
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [languages].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = self.send(attr)
137
+ if value.nil?
138
+ is_nullable = self.class.openapi_nullable.include?(attr)
139
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
140
+ end
141
+
142
+ hash[param] = _to_hash(value)
143
+ end
144
+ hash
145
+ end
146
+
147
+ end
148
+
149
+ end