messente_api 1.2.0 → 1.2.1

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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +1 -1
  4. data/git_push.sh +10 -7
  5. data/lib/messente_api.rb +1 -1
  6. data/lib/messente_api/api/blacklist_api.rb +1 -1
  7. data/lib/messente_api/api/contacts_api.rb +1 -1
  8. data/lib/messente_api/api/delivery_report_api.rb +1 -1
  9. data/lib/messente_api/api/groups_api.rb +1 -1
  10. data/lib/messente_api/api/number_lookup_api.rb +1 -1
  11. data/lib/messente_api/api/omnimessage_api.rb +1 -1
  12. data/lib/messente_api/api/statistics_api.rb +1 -1
  13. data/lib/messente_api/api_client.rb +29 -29
  14. data/lib/messente_api/api_error.rb +1 -1
  15. data/lib/messente_api/configuration.rb +2 -2
  16. data/lib/messente_api/models/channel.rb +1 -1
  17. data/lib/messente_api/models/contact_envelope.rb +12 -2
  18. data/lib/messente_api/models/contact_fields.rb +21 -2
  19. data/lib/messente_api/models/contact_list_envelope.rb +12 -2
  20. data/lib/messente_api/models/contact_update_fields.rb +21 -2
  21. data/lib/messente_api/models/delivery_report_response.rb +12 -2
  22. data/lib/messente_api/models/delivery_result.rb +12 -2
  23. data/lib/messente_api/models/error_code_omnichannel.rb +1 -1
  24. data/lib/messente_api/models/error_code_omnichannel_machine.rb +1 -1
  25. data/lib/messente_api/models/error_code_phonebook.rb +1 -1
  26. data/lib/messente_api/models/error_code_statistics.rb +1 -1
  27. data/lib/messente_api/models/error_item_number_lookup.rb +12 -2
  28. data/lib/messente_api/models/error_item_number_lookup_error.rb +12 -2
  29. data/lib/messente_api/models/error_item_omnichannel.rb +12 -2
  30. data/lib/messente_api/models/error_item_phonebook.rb +12 -2
  31. data/lib/messente_api/models/error_item_statistics.rb +12 -2
  32. data/lib/messente_api/models/error_number_lookup.rb +12 -2
  33. data/lib/messente_api/models/error_omnichannel.rb +12 -2
  34. data/lib/messente_api/models/error_phonebook.rb +12 -2
  35. data/lib/messente_api/models/error_statistics.rb +12 -2
  36. data/lib/messente_api/models/error_title_omnichannel.rb +1 -1
  37. data/lib/messente_api/models/error_title_phonebook.rb +1 -1
  38. data/lib/messente_api/models/fetch_blacklist_success.rb +12 -2
  39. data/lib/messente_api/models/group_envelope.rb +12 -2
  40. data/lib/messente_api/models/group_list_envelope.rb +12 -2
  41. data/lib/messente_api/models/group_name.rb +12 -2
  42. data/lib/messente_api/models/group_response_fields.rb +13 -2
  43. data/lib/messente_api/models/message_result.rb +12 -2
  44. data/lib/messente_api/models/mobile_network.rb +12 -2
  45. data/lib/messente_api/models/number_to_blacklist.rb +12 -2
  46. data/lib/messente_api/models/numbers_to_investigate.rb +12 -2
  47. data/lib/messente_api/models/omni_message_create_success_response.rb +12 -2
  48. data/lib/messente_api/models/omnimessage.rb +12 -2
  49. data/lib/messente_api/models/sms.rb +12 -2
  50. data/lib/messente_api/models/statistics_report.rb +12 -2
  51. data/lib/messente_api/models/statistics_report_settings.rb +12 -2
  52. data/lib/messente_api/models/statistics_report_success.rb +12 -2
  53. data/lib/messente_api/models/status.rb +1 -1
  54. data/lib/messente_api/models/sync_number_lookup_result.rb +18 -2
  55. data/lib/messente_api/models/sync_number_lookup_success.rb +12 -2
  56. data/lib/messente_api/models/telegram.rb +12 -2
  57. data/lib/messente_api/models/text_store.rb +1 -1
  58. data/lib/messente_api/models/viber.rb +12 -2
  59. data/lib/messente_api/models/whats_app.rb +12 -2
  60. data/lib/messente_api/models/whats_app_audio.rb +12 -2
  61. data/lib/messente_api/models/whats_app_document.rb +12 -2
  62. data/lib/messente_api/models/whats_app_image.rb +12 -2
  63. data/lib/messente_api/models/whats_app_text.rb +12 -2
  64. data/lib/messente_api/version.rb +2 -2
  65. data/messente_api.gemspec +1 -7
  66. data/spec/api_client_spec.rb +2 -2
  67. data/spec/configuration_spec.rb +1 -1
  68. data/spec/spec_helper.rb +1 -1
  69. metadata +11 -132
  70. data/Gemfile.lock +0 -79
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd77dcfab20d6927ba0bff6a8aa7a2d85aecc73742fdf09093b3063fcabb148d
4
- data.tar.gz: cd516da741e8f78eba6c71712a80750051c1690056f603700652ace4631d443a
3
+ metadata.gz: 4ab77a605e22127ceeb26ebea5c305dbb3ad4b5990ef27311770eb94b0a5f5b1
4
+ data.tar.gz: 42f6037b2a556791837c2cb0049b92ea34edf0ba7d4a3d449409d81451b3f987
5
5
  SHA512:
6
- metadata.gz: 255085afc92ce6ca1966ba37a5da37006df87247fd06c6b16a26d5041628a10594942f19fdd9ee68ba94b3a1f38d22248851633ecc1d12d89d35916a4945af2f
7
- data.tar.gz: 026e3b7091708def43b19321fb4d53d81e8318d6fba4d55a77ad9c65a8e12273c724dbbd287244fb3c159d13f69e639e226c20ab498994e8fc479c5d4ad9391a
6
+ metadata.gz: b5977dcb9a2c0f67d761cc36f09a77513cf0f072a5591dcd760dae4867180d2962aefbaa28e9f303421ae9049eed0169e63b9e8a8f2469155c693584cbb2f28e
7
+ data.tar.gz: 18194221f7932bbb64a85c07a9bc1d6d27d8b1de689b3eb508b904feb1298031b06535d023182d933132187cc1aca4158e55255302ed3fbca2c5e280df04c97d
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rake', '~> 12.0.0'
6
+ gem 'rake', '~> 13.0.1'
7
7
  gem 'pry-byebug'
8
8
  gem 'rubocop', '~> 0.66.0'
9
9
  end
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Messente API Library
2
2
 
3
3
  - Messente API version: 1.2.0
4
- - Ruby gem version: 1.2.0
4
+ - Ruby gem version: 1.2.1
5
5
 
6
6
  [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.
7
7
 
@@ -1,14 +1,17 @@
1
1
  #!/bin/sh
2
- #
3
- # Generated by: https://openapi-generator.tech
4
- #
5
2
  # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
3
  #
7
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
8
5
 
9
6
  git_user_id=$1
10
7
  git_repo_id=$2
11
8
  release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
12
15
 
13
16
  if [ "$git_user_id" = "" ]; then
14
17
  git_user_id="messente"
@@ -40,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined
40
43
 
41
44
  if [ "$GIT_TOKEN" = "" ]; then
42
45
  echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
- git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
44
47
  else
45
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
48
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
46
49
  fi
47
50
 
48
51
  fi
@@ -50,6 +53,6 @@ fi
50
53
  git pull origin master
51
54
 
52
55
  # Pushes (Forces) the changes in the local repository up to the remote repository
53
- echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
54
57
  git push origin master 2>&1 | grep -v 'To https'
55
58
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -127,6 +127,34 @@ module MessenteApi
127
127
  request
128
128
  end
129
129
 
130
+ # Builds the HTTP request body
131
+ #
132
+ # @param [Hash] header_params Header parameters
133
+ # @param [Hash] form_params Query parameters
134
+ # @param [Object] body HTTP body (JSON/XML)
135
+ # @return [String] HTTP body data in the form of string
136
+ def build_request_body(header_params, form_params, body)
137
+ # http form
138
+ if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
139
+ header_params['Content-Type'] == 'multipart/form-data'
140
+ data = {}
141
+ form_params.each do |key, value|
142
+ case value
143
+ when ::File, ::Array, nil
144
+ # let typhoeus handle File, Array and nil parameters
145
+ data[key] = value
146
+ else
147
+ data[key] = value.to_s
148
+ end
149
+ end
150
+ elsif body
151
+ data = body.is_a?(String) ? body : body.to_json
152
+ else
153
+ data = nil
154
+ end
155
+ data
156
+ end
157
+
130
158
  # Check if the given MIME is a JSON MIME.
131
159
  # JSON MIME examples:
132
160
  # application/json
@@ -264,34 +292,6 @@ module MessenteApi
264
292
  @config.base_url + path
265
293
  end
266
294
 
267
- # Builds the HTTP request body
268
- #
269
- # @param [Hash] header_params Header parameters
270
- # @param [Hash] form_params Query parameters
271
- # @param [Object] body HTTP body (JSON/XML)
272
- # @return [String] HTTP body data in the form of string
273
- def build_request_body(header_params, form_params, body)
274
- # http form
275
- if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
276
- header_params['Content-Type'] == 'multipart/form-data'
277
- data = {}
278
- form_params.each do |key, value|
279
- case value
280
- when ::File, ::Array, nil
281
- # let typhoeus handle File, Array and nil parameters
282
- data[key] = value
283
- else
284
- data[key] = value.to_s
285
- end
286
- end
287
- elsif body
288
- data = body.is_a?(String) ? body : body.to_json
289
- else
290
- data = nil
291
- end
292
- data
293
- end
294
-
295
295
  # Update hearder and query params based on authentication settings.
296
296
  #
297
297
  # @param [Hash] header_params Header parameters
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -208,7 +208,7 @@ module MessenteApi
208
208
  [
209
209
  {
210
210
  url: "https://api.messente.com/v1",
211
- description: "No descriptoin provided",
211
+ description: "No description provided",
212
212
  }
213
213
  ]
214
214
  end
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -31,6 +31,12 @@ module MessenteApi
31
31
  }
32
32
  end
33
33
 
34
+ # List of attributes with nullable: true
35
+ def self.openapi_nullable
36
+ Set.new([
37
+ ])
38
+ end
39
+
34
40
  # Initializes the object
35
41
  # @param [Hash] attributes Model attributes in the form of hash
36
42
  def initialize(attributes = {})
@@ -170,7 +176,11 @@ module MessenteApi
170
176
  hash = {}
171
177
  self.class.attribute_map.each_pair do |attr, param|
172
178
  value = self.send(attr)
173
- next if value.nil?
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
174
184
  hash[param] = _to_hash(value)
175
185
  end
176
186
  hash
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -77,6 +77,21 @@ module MessenteApi
77
77
  }
78
78
  end
79
79
 
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ :'email',
84
+ :'first_name',
85
+ :'last_name',
86
+ :'company',
87
+ :'title',
88
+ :'custom',
89
+ :'custom2',
90
+ :'custom3',
91
+ :'custom4'
92
+ ])
93
+ end
94
+
80
95
  # Initializes the object
81
96
  # @param [Hash] attributes Model attributes in the form of hash
82
97
  def initialize(attributes = {})
@@ -266,7 +281,11 @@ module MessenteApi
266
281
  hash = {}
267
282
  self.class.attribute_map.each_pair do |attr, param|
268
283
  value = self.send(attr)
269
- next if value.nil?
284
+ if value.nil?
285
+ is_nullable = self.class.openapi_nullable.include?(attr)
286
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
287
+ end
288
+
270
289
  hash[param] = _to_hash(value)
271
290
  end
272
291
  hash
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -32,6 +32,12 @@ module MessenteApi
32
32
  }
33
33
  end
34
34
 
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
40
+
35
41
  # Initializes the object
36
42
  # @param [Hash] attributes Model attributes in the form of hash
37
43
  def initialize(attributes = {})
@@ -173,7 +179,11 @@ module MessenteApi
173
179
  hash = {}
174
180
  self.class.attribute_map.each_pair do |attr, param|
175
181
  value = self.send(attr)
176
- next if value.nil?
182
+ if value.nil?
183
+ is_nullable = self.class.openapi_nullable.include?(attr)
184
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
+ end
186
+
177
187
  hash[param] = _to_hash(value)
178
188
  end
179
189
  hash
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -72,6 +72,21 @@ module MessenteApi
72
72
  }
73
73
  end
74
74
 
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ :'email',
79
+ :'first_name',
80
+ :'last_name',
81
+ :'company',
82
+ :'title',
83
+ :'custom',
84
+ :'custom2',
85
+ :'custom3',
86
+ :'custom4'
87
+ ])
88
+ end
89
+
75
90
  # Initializes the object
76
91
  # @param [Hash] attributes Model attributes in the form of hash
77
92
  def initialize(attributes = {})
@@ -251,7 +266,11 @@ module MessenteApi
251
266
  hash = {}
252
267
  self.class.attribute_map.each_pair do |attr, param|
253
268
  value = self.send(attr)
254
- next if value.nil?
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
255
274
  hash[param] = _to_hash(value)
256
275
  end
257
276
  hash
@@ -6,7 +6,7 @@
6
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
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.3.0
10
10
 
11
11
  =end
12
12
 
@@ -42,6 +42,12 @@ module MessenteApi
42
42
  }
43
43
  end
44
44
 
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
45
51
  # Initializes the object
46
52
  # @param [Hash] attributes Model attributes in the form of hash
47
53
  def initialize(attributes = {})
@@ -208,7 +214,11 @@ module MessenteApi
208
214
  hash = {}
209
215
  self.class.attribute_map.each_pair do |attr, param|
210
216
  value = self.send(attr)
211
- next if value.nil?
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
212
222
  hash[param] = _to_hash(value)
213
223
  end
214
224
  hash