messente_api 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +118 -0
  5. data/Rakefile +10 -0
  6. data/docs/BlacklistApi.md +209 -0
  7. data/docs/Channel.md +16 -0
  8. data/docs/ContactEnvelope.md +17 -0
  9. data/docs/ContactFields.md +35 -0
  10. data/docs/ContactListEnvelope.md +17 -0
  11. data/docs/ContactUpdateFields.md +33 -0
  12. data/docs/ContactsApi.md +430 -0
  13. data/docs/DeliveryReportApi.md +60 -0
  14. data/docs/DeliveryReportResponse.md +21 -0
  15. data/docs/DeliveryResult.md +27 -0
  16. data/docs/ErrorCodeOmnichannel.md +16 -0
  17. data/docs/ErrorCodeOmnichannelMachine.md +16 -0
  18. data/docs/ErrorCodePhonebook.md +16 -0
  19. data/docs/ErrorItemOmnichannel.md +23 -0
  20. data/docs/ErrorItemPhonebook.md +21 -0
  21. data/docs/ErrorOmnichannel.md +17 -0
  22. data/docs/ErrorPhonebook.md +17 -0
  23. data/docs/ErrorTitleOmnichannel.md +16 -0
  24. data/docs/ErrorTitlePhonebook.md +16 -0
  25. data/docs/FetchBlacklistSuccess.md +17 -0
  26. data/docs/GroupEnvelope.md +17 -0
  27. data/docs/GroupListEnvelope.md +17 -0
  28. data/docs/GroupName.md +17 -0
  29. data/docs/GroupResponseFields.md +23 -0
  30. data/docs/GroupsApi.md +265 -0
  31. data/docs/MessageResult.md +21 -0
  32. data/docs/NumberToBlacklist.md +17 -0
  33. data/docs/OmniMessageCreateSuccessResponse.md +21 -0
  34. data/docs/Omnimessage.md +25 -0
  35. data/docs/OmnimessageApi.md +111 -0
  36. data/docs/SMS.md +27 -0
  37. data/docs/Status.md +16 -0
  38. data/docs/TextStore.md +16 -0
  39. data/docs/Viber.md +29 -0
  40. data/docs/WhatsApp.md +29 -0
  41. data/docs/WhatsAppAudio.md +17 -0
  42. data/docs/WhatsAppDocument.md +19 -0
  43. data/docs/WhatsAppImage.md +19 -0
  44. data/docs/WhatsAppText.md +19 -0
  45. data/git_push.sh +55 -0
  46. data/lib/messente_api.rb +78 -0
  47. data/lib/messente_api/api/blacklist_api.rb +258 -0
  48. data/lib/messente_api/api/contacts_api.rb +521 -0
  49. data/lib/messente_api/api/delivery_report_api.rb +82 -0
  50. data/lib/messente_api/api/groups_api.rb +326 -0
  51. data/lib/messente_api/api/omnimessage_api.rb +144 -0
  52. data/lib/messente_api/api_client.rb +387 -0
  53. data/lib/messente_api/api_error.rb +57 -0
  54. data/lib/messente_api/configuration.rb +251 -0
  55. data/lib/messente_api/models/channel.rb +37 -0
  56. data/lib/messente_api/models/contact_envelope.rb +196 -0
  57. data/lib/messente_api/models/contact_fields.rb +283 -0
  58. data/lib/messente_api/models/contact_list_envelope.rb +198 -0
  59. data/lib/messente_api/models/contact_update_fields.rb +268 -0
  60. data/lib/messente_api/models/delivery_report_response.rb +234 -0
  61. data/lib/messente_api/models/delivery_result.rb +244 -0
  62. data/lib/messente_api/models/error_code_omnichannel.rb +41 -0
  63. data/lib/messente_api/models/error_code_omnichannel_machine.rb +46 -0
  64. data/lib/messente_api/models/error_code_phonebook.rb +40 -0
  65. data/lib/messente_api/models/error_item_omnichannel.rb +245 -0
  66. data/lib/messente_api/models/error_item_phonebook.rb +230 -0
  67. data/lib/messente_api/models/error_omnichannel.rb +203 -0
  68. data/lib/messente_api/models/error_phonebook.rb +203 -0
  69. data/lib/messente_api/models/error_title_omnichannel.rb +41 -0
  70. data/lib/messente_api/models/error_title_phonebook.rb +40 -0
  71. data/lib/messente_api/models/fetch_blacklist_success.rb +198 -0
  72. data/lib/messente_api/models/group_envelope.rb +196 -0
  73. data/lib/messente_api/models/group_list_envelope.rb +198 -0
  74. data/lib/messente_api/models/group_name.rb +220 -0
  75. data/lib/messente_api/models/group_response_fields.rb +240 -0
  76. data/lib/messente_api/models/message_result.rb +231 -0
  77. data/lib/messente_api/models/number_to_blacklist.rb +202 -0
  78. data/lib/messente_api/models/omni_message_create_success_response.rb +234 -0
  79. data/lib/messente_api/models/omnimessage.rb +247 -0
  80. data/lib/messente_api/models/sms.rb +300 -0
  81. data/lib/messente_api/models/status.rb +45 -0
  82. data/lib/messente_api/models/text_store.rb +37 -0
  83. data/lib/messente_api/models/viber.rb +293 -0
  84. data/lib/messente_api/models/whats_app.rb +289 -0
  85. data/lib/messente_api/models/whats_app_audio.rb +202 -0
  86. data/lib/messente_api/models/whats_app_document.rb +212 -0
  87. data/lib/messente_api/models/whats_app_image.rb +212 -0
  88. data/lib/messente_api/models/whats_app_text.rb +214 -0
  89. data/lib/messente_api/version.rb +15 -0
  90. data/messente_api.gemspec +45 -0
  91. data/spec/api/blacklist_api_spec.rb +78 -0
  92. data/spec/api/contacts_api_spec.rb +126 -0
  93. data/spec/api/delivery_report_api_spec.rb +46 -0
  94. data/spec/api/groups_api_spec.rb +90 -0
  95. data/spec/api/omnimessage_api_spec.rb +57 -0
  96. data/spec/api_client_spec.rb +226 -0
  97. data/spec/configuration_spec.rb +42 -0
  98. data/spec/models/channel_spec.rb +35 -0
  99. data/spec/models/contact_envelope_spec.rb +41 -0
  100. data/spec/models/contact_fields_spec.rb +95 -0
  101. data/spec/models/contact_list_envelope_spec.rb +41 -0
  102. data/spec/models/contact_update_fields_spec.rb +89 -0
  103. data/spec/models/delivery_report_response_spec.rb +53 -0
  104. data/spec/models/delivery_result_spec.rb +71 -0
  105. data/spec/models/error_code_omnichannel_machine_spec.rb +35 -0
  106. data/spec/models/error_code_omnichannel_spec.rb +35 -0
  107. data/spec/models/error_code_phonebook_spec.rb +35 -0
  108. data/spec/models/error_item_omnichannel_spec.rb +59 -0
  109. data/spec/models/error_item_phonebook_spec.rb +53 -0
  110. data/spec/models/error_omnichannel_spec.rb +41 -0
  111. data/spec/models/error_phonebook_spec.rb +41 -0
  112. data/spec/models/error_title_omnichannel_spec.rb +35 -0
  113. data/spec/models/error_title_phonebook_spec.rb +35 -0
  114. data/spec/models/fetch_blacklist_success_spec.rb +41 -0
  115. data/spec/models/group_envelope_spec.rb +41 -0
  116. data/spec/models/group_list_envelope_spec.rb +41 -0
  117. data/spec/models/group_name_spec.rb +41 -0
  118. data/spec/models/group_response_fields_spec.rb +59 -0
  119. data/spec/models/message_result_spec.rb +53 -0
  120. data/spec/models/number_to_blacklist_spec.rb +41 -0
  121. data/spec/models/omni_message_create_success_response_spec.rb +53 -0
  122. data/spec/models/omnimessage_spec.rb +65 -0
  123. data/spec/models/sms_spec.rb +79 -0
  124. data/spec/models/status_spec.rb +35 -0
  125. data/spec/models/text_store_spec.rb +35 -0
  126. data/spec/models/viber_spec.rb +81 -0
  127. data/spec/models/whats_app_audio_spec.rb +41 -0
  128. data/spec/models/whats_app_document_spec.rb +47 -0
  129. data/spec/models/whats_app_image_spec.rb +47 -0
  130. data/spec/models/whats_app_spec.rb +81 -0
  131. data/spec/models/whats_app_text_spec.rb +47 -0
  132. data/spec/spec_helper.rb +111 -0
  133. metadata +401 -0
@@ -0,0 +1,203 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MessenteApi
16
+ class ErrorOmnichannel
17
+ attr_accessor :errors
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'errors' => :'errors'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'errors' => :'Array<ErrorItemOmnichannel>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ if (!attributes.is_a?(Hash))
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::ErrorOmnichannel` initialize method"
38
+ end
39
+
40
+ # check to see if the attribute exists and convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h|
42
+ if (!self.class.attribute_map.key?(k.to_sym))
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::ErrorOmnichannel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
+ end
45
+ h[k.to_sym] = v
46
+ }
47
+
48
+ if attributes.key?(:'errors')
49
+ if (value = attributes[:'errors']).is_a?(Array)
50
+ self.errors = value
51
+ end
52
+ end
53
+ end
54
+
55
+ # Show invalid properties with the reasons. Usually used together with valid?
56
+ # @return Array for valid properties with the reasons
57
+ def list_invalid_properties
58
+ invalid_properties = Array.new
59
+ if @errors.nil?
60
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
61
+ end
62
+
63
+ invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return false if @errors.nil?
70
+ true
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param [Object] Object to be compared
75
+ def ==(o)
76
+ return true if self.equal?(o)
77
+ self.class == o.class &&
78
+ errors == o.errors
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Integer] Hash code
89
+ def hash
90
+ [errors].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def self.build_from_hash(attributes)
97
+ new.build_from_hash(attributes)
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.openapi_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ MessenteApi.const_get(type).build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ next if value.nil?
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end
202
+ end
203
+ end
@@ -0,0 +1,203 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MessenteApi
16
+ class ErrorPhonebook
17
+ attr_accessor :errors
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'errors' => :'errors'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'errors' => :'Array<ErrorItemPhonebook>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ if (!attributes.is_a?(Hash))
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::ErrorPhonebook` initialize method"
38
+ end
39
+
40
+ # check to see if the attribute exists and convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h|
42
+ if (!self.class.attribute_map.key?(k.to_sym))
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::ErrorPhonebook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
+ end
45
+ h[k.to_sym] = v
46
+ }
47
+
48
+ if attributes.key?(:'errors')
49
+ if (value = attributes[:'errors']).is_a?(Array)
50
+ self.errors = value
51
+ end
52
+ end
53
+ end
54
+
55
+ # Show invalid properties with the reasons. Usually used together with valid?
56
+ # @return Array for valid properties with the reasons
57
+ def list_invalid_properties
58
+ invalid_properties = Array.new
59
+ if @errors.nil?
60
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
61
+ end
62
+
63
+ invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return false if @errors.nil?
70
+ true
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param [Object] Object to be compared
75
+ def ==(o)
76
+ return true if self.equal?(o)
77
+ self.class == o.class &&
78
+ errors == o.errors
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Integer] Hash code
89
+ def hash
90
+ [errors].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def self.build_from_hash(attributes)
97
+ new.build_from_hash(attributes)
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.openapi_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ MessenteApi.const_get(type).build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ next if value.nil?
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end
202
+ end
203
+ end
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MessenteApi
16
+ class ErrorTitleOmnichannel
17
+ NOT_FOUND = "Not found".freeze
18
+ FORBIDDEN = "Forbidden".freeze
19
+ UNAUTHORIZED = "Unauthorized".freeze
20
+ INVALID_DATA = "Invalid data".freeze
21
+ INTERNAL_SERVER_ERROR = "Internal Server Error".freeze
22
+ MISSING_DATA = "Missing data".freeze
23
+ METHOD_NOT_ALLOWED = "Method not allowed".freeze
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ constantValues = ErrorTitleOmnichannel.constants.select { |c| ErrorTitleOmnichannel::const_get(c) == value }
37
+ raise "Invalid ENUM value #{value} for class #ErrorTitleOmnichannel" if constantValues.empty?
38
+ value
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,40 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MessenteApi
16
+ class ErrorTitlePhonebook
17
+ INVALID_DATA = "Invalid data".freeze
18
+ UNAUTHORIZED = "Unauthorized".freeze
19
+ MISSING_RESOURCE = "Missing resource".freeze
20
+ CONFLICT = "Conflict".freeze
21
+ CLIENT_ERROR = "Client error".freeze
22
+ GENERAL_ERROR = "General error".freeze
23
+
24
+ # Builds the enum from string
25
+ # @param [String] The enum value in the form of the string
26
+ # @return [String] The enum value
27
+ def self.build_from_hash(value)
28
+ new.build_from_hash(value)
29
+ end
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ constantValues = ErrorTitlePhonebook.constants.select { |c| ErrorTitlePhonebook::const_get(c) == value }
36
+ raise "Invalid ENUM value #{value} for class #ErrorTitlePhonebook" if constantValues.empty?
37
+ value
38
+ end
39
+ end
40
+ end