messente_api 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +11 -3
  4. data/docs/ErrorCodeStatistics.md +16 -0
  5. data/docs/ErrorItemNumberLookup.md +17 -0
  6. data/docs/ErrorItemNumberLookupError.md +19 -0
  7. data/docs/ErrorItemStatistics.md +21 -0
  8. data/docs/ErrorNumberLookup.md +17 -0
  9. data/docs/ErrorStatistics.md +17 -0
  10. data/docs/MobileNetwork.md +25 -0
  11. data/docs/NumberLookupApi.md +60 -0
  12. data/docs/NumbersToInvestigate.md +17 -0
  13. data/docs/StatisticsApi.md +60 -0
  14. data/docs/StatisticsReport.md +21 -0
  15. data/docs/StatisticsReportSettings.md +21 -0
  16. data/docs/StatisticsReportSuccess.md +17 -0
  17. data/docs/SyncNumberLookupResult.md +33 -0
  18. data/docs/SyncNumberLookupSuccess.md +19 -0
  19. data/lib/messente_api.rb +17 -2
  20. data/lib/messente_api/api/blacklist_api.rb +2 -2
  21. data/lib/messente_api/api/contacts_api.rb +2 -2
  22. data/lib/messente_api/api/delivery_report_api.rb +2 -2
  23. data/lib/messente_api/api/groups_api.rb +2 -2
  24. data/lib/messente_api/api/number_lookup_api.rb +84 -0
  25. data/lib/messente_api/api/omnimessage_api.rb +2 -2
  26. data/lib/messente_api/api/statistics_api.rb +84 -0
  27. data/lib/messente_api/api_client.rb +2 -2
  28. data/lib/messente_api/api_error.rb +2 -2
  29. data/lib/messente_api/configuration.rb +2 -2
  30. data/lib/messente_api/models/channel.rb +2 -2
  31. data/lib/messente_api/models/contact_envelope.rb +2 -2
  32. data/lib/messente_api/models/contact_fields.rb +2 -2
  33. data/lib/messente_api/models/contact_list_envelope.rb +2 -2
  34. data/lib/messente_api/models/contact_update_fields.rb +2 -2
  35. data/lib/messente_api/models/delivery_report_response.rb +2 -2
  36. data/lib/messente_api/models/delivery_result.rb +2 -2
  37. data/lib/messente_api/models/error_code_omnichannel.rb +2 -2
  38. data/lib/messente_api/models/error_code_omnichannel_machine.rb +2 -2
  39. data/lib/messente_api/models/error_code_phonebook.rb +2 -2
  40. data/lib/messente_api/models/error_code_statistics.rb +38 -0
  41. data/lib/messente_api/models/error_item_number_lookup.rb +202 -0
  42. data/lib/messente_api/models/error_item_number_lookup_error.rb +246 -0
  43. data/lib/messente_api/models/error_item_omnichannel.rb +2 -2
  44. data/lib/messente_api/models/error_item_phonebook.rb +2 -2
  45. data/lib/messente_api/models/error_item_statistics.rb +232 -0
  46. data/lib/messente_api/models/error_number_lookup.rb +205 -0
  47. data/lib/messente_api/models/error_omnichannel.rb +2 -2
  48. data/lib/messente_api/models/error_phonebook.rb +2 -2
  49. data/lib/messente_api/models/error_statistics.rb +205 -0
  50. data/lib/messente_api/models/error_title_omnichannel.rb +2 -2
  51. data/lib/messente_api/models/error_title_phonebook.rb +2 -2
  52. data/lib/messente_api/models/fetch_blacklist_success.rb +2 -2
  53. data/lib/messente_api/models/group_envelope.rb +2 -2
  54. data/lib/messente_api/models/group_list_envelope.rb +2 -2
  55. data/lib/messente_api/models/group_name.rb +2 -2
  56. data/lib/messente_api/models/group_response_fields.rb +2 -2
  57. data/lib/messente_api/models/message_result.rb +2 -2
  58. data/lib/messente_api/models/mobile_network.rb +238 -0
  59. data/lib/messente_api/models/number_to_blacklist.rb +2 -2
  60. data/lib/messente_api/models/numbers_to_investigate.rb +205 -0
  61. data/lib/messente_api/models/omni_message_create_success_response.rb +2 -2
  62. data/lib/messente_api/models/omnimessage.rb +2 -2
  63. data/lib/messente_api/models/sms.rb +2 -2
  64. data/lib/messente_api/models/statistics_report.rb +233 -0
  65. data/lib/messente_api/models/statistics_report_settings.rb +230 -0
  66. data/lib/messente_api/models/statistics_report_success.rb +205 -0
  67. data/lib/messente_api/models/status.rb +2 -2
  68. data/lib/messente_api/models/sync_number_lookup_result.rb +313 -0
  69. data/lib/messente_api/models/sync_number_lookup_success.rb +220 -0
  70. data/lib/messente_api/models/telegram.rb +2 -2
  71. data/lib/messente_api/models/text_store.rb +2 -2
  72. data/lib/messente_api/models/viber.rb +2 -2
  73. data/lib/messente_api/models/whats_app.rb +2 -2
  74. data/lib/messente_api/models/whats_app_audio.rb +2 -2
  75. data/lib/messente_api/models/whats_app_document.rb +2 -2
  76. data/lib/messente_api/models/whats_app_image.rb +2 -2
  77. data/lib/messente_api/models/whats_app_text.rb +2 -2
  78. data/lib/messente_api/version.rb +3 -3
  79. data/messente_api.gemspec +3 -3
  80. data/spec/api_client_spec.rb +2 -2
  81. data/spec/configuration_spec.rb +2 -2
  82. data/spec/spec_helper.rb +2 -2
  83. metadata +38 -7
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Messente API
3
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, WhatsApp and Telegram 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.
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
5
 
6
- The version of the OpenAPI document: 1.1.0
6
+ The version of the OpenAPI document: 1.2.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.0.3
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Messente API
3
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, WhatsApp and Telegram 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.
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
5
 
6
- The version of the OpenAPI document: 1.1.0
6
+ The version of the OpenAPI document: 1.2.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.0.3
@@ -0,0 +1,232 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. 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.2.0
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MessenteApi
16
+ # Error fields container
17
+ class ErrorItemStatistics
18
+ # Error title
19
+ attr_accessor :title
20
+
21
+ # Error details
22
+ attr_accessor :details
23
+
24
+ attr_accessor :code
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'title' => :'title',
30
+ :'details' => :'details',
31
+ :'code' => :'code'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'title' => :'String',
39
+ :'details' => :'String',
40
+ :'code' => :'ErrorCodeStatistics'
41
+ }
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::ErrorItemStatistics` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::ErrorItemStatistics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'title')
60
+ self.title = attributes[:'title']
61
+ end
62
+
63
+ if attributes.key?(:'details')
64
+ self.details = attributes[:'details']
65
+ end
66
+
67
+ if attributes.key?(:'code')
68
+ self.code = attributes[:'code']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @title.nil?
77
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
78
+ end
79
+
80
+ if @details.nil?
81
+ invalid_properties.push('invalid value for "details", details cannot be nil.')
82
+ end
83
+
84
+ if @code.nil?
85
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
86
+ end
87
+
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ return false if @title.nil?
95
+ return false if @details.nil?
96
+ return false if @code.nil?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ title == o.title &&
106
+ details == o.details &&
107
+ code == o.code
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ def hash
119
+ [title, details, code].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def self.build_from_hash(attributes)
126
+ new.build_from_hash(attributes)
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ self.class.openapi_types.each_pair do |key, type|
135
+ if type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ DateTime.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ MessenteApi.const_get(type).build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ next if value.nil?
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+ end
232
+ end
@@ -0,0 +1,205 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. 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.2.0
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MessenteApi
16
+ # A container for errors
17
+ class ErrorNumberLookup
18
+ # An array of errors
19
+ attr_accessor :errors
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'errors' => :'errors'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'errors' => :'Array<ErrorItemNumberLookup>'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ if (!attributes.is_a?(Hash))
39
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::ErrorNumberLookup` initialize method"
40
+ end
41
+
42
+ # check to see if the attribute exists and convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h|
44
+ if (!self.class.attribute_map.key?(k.to_sym))
45
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::ErrorNumberLookup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
46
+ end
47
+ h[k.to_sym] = v
48
+ }
49
+
50
+ if attributes.key?(:'errors')
51
+ if (value = attributes[:'errors']).is_a?(Array)
52
+ self.errors = value
53
+ end
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ if @errors.nil?
62
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
63
+ end
64
+
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return false if @errors.nil?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ errors == o.errors
81
+ end
82
+
83
+ # @see the `==` method
84
+ # @param [Object] Object to be compared
85
+ def eql?(o)
86
+ self == o
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Integer] Hash code
91
+ def hash
92
+ [errors].hash
93
+ end
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def self.build_from_hash(attributes)
99
+ new.build_from_hash(attributes)
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.openapi_types.each_pair do |key, type|
108
+ if type =~ /\AArray<(.*)>/i
109
+ # check to ensure the input is an array given that the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
117
+ end
118
+
119
+ self
120
+ end
121
+
122
+ # Deserializes the data based on type
123
+ # @param string type Data type
124
+ # @param string value Value to be deserialized
125
+ # @return [Object] Deserialized data
126
+ def _deserialize(type, value)
127
+ case type.to_sym
128
+ when :DateTime
129
+ DateTime.parse(value)
130
+ when :Date
131
+ Date.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :Boolean
139
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ MessenteApi.const_get(type).build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ next if value.nil?
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ # Outputs non-array value in the form of hash
188
+ # For object, use to_hash. Otherwise, just return the value
189
+ # @param [Object] value Any valid value
190
+ # @return [Hash] Returns the value in the form of hash
191
+ def _to_hash(value)
192
+ if value.is_a?(Array)
193
+ value.compact.map { |v| _to_hash(v) }
194
+ elsif value.is_a?(Hash)
195
+ {}.tap do |hash|
196
+ value.each { |k, v| hash[k] = _to_hash(v) }
197
+ end
198
+ elsif value.respond_to? :to_hash
199
+ value.to_hash
200
+ else
201
+ value
202
+ end
203
+ end
204
+ end
205
+ end