messente_api 1.2.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +2 -2
  4. data/docs/ContactEnvelope.md +1 -1
  5. data/docs/ContactListEnvelope.md +1 -1
  6. data/docs/ContactResponseFields.md +37 -0
  7. data/docs/Omnimessage.md +3 -1
  8. data/docs/OmnimessageApi.md +4 -3
  9. data/docs/Priority.md +16 -0
  10. data/docs/StatisticsReportSettings.md +1 -1
  11. data/docs/SyncNumberLookupResult.md +1 -1
  12. data/git_push.sh +10 -7
  13. data/lib/messente_api.rb +4 -2
  14. data/lib/messente_api/api/blacklist_api.rb +2 -2
  15. data/lib/messente_api/api/contacts_api.rb +2 -2
  16. data/lib/messente_api/api/delivery_report_api.rb +2 -2
  17. data/lib/messente_api/api/groups_api.rb +2 -2
  18. data/lib/messente_api/api/number_lookup_api.rb +2 -2
  19. data/lib/messente_api/api/omnimessage_api.rb +7 -7
  20. data/lib/messente_api/api/statistics_api.rb +2 -2
  21. data/lib/messente_api/api_client.rb +37 -35
  22. data/lib/messente_api/api_error.rb +2 -2
  23. data/lib/messente_api/configuration.rb +3 -3
  24. data/lib/messente_api/models/channel.rb +2 -2
  25. data/lib/messente_api/models/contact_envelope.rb +14 -4
  26. data/lib/messente_api/models/contact_fields.rb +23 -4
  27. data/lib/messente_api/models/contact_list_envelope.rb +14 -4
  28. data/lib/messente_api/models/contact_response_fields.rb +318 -0
  29. data/lib/messente_api/models/contact_update_fields.rb +22 -3
  30. data/lib/messente_api/models/delivery_report_response.rb +13 -3
  31. data/lib/messente_api/models/delivery_result.rb +13 -3
  32. data/lib/messente_api/models/error_code_omnichannel.rb +2 -2
  33. data/lib/messente_api/models/error_code_omnichannel_machine.rb +2 -2
  34. data/lib/messente_api/models/error_code_phonebook.rb +2 -2
  35. data/lib/messente_api/models/error_code_statistics.rb +2 -2
  36. data/lib/messente_api/models/error_item_number_lookup.rb +13 -3
  37. data/lib/messente_api/models/error_item_number_lookup_error.rb +13 -3
  38. data/lib/messente_api/models/error_item_omnichannel.rb +14 -8
  39. data/lib/messente_api/models/error_item_phonebook.rb +13 -3
  40. data/lib/messente_api/models/error_item_statistics.rb +13 -3
  41. data/lib/messente_api/models/error_number_lookup.rb +13 -3
  42. data/lib/messente_api/models/error_omnichannel.rb +13 -3
  43. data/lib/messente_api/models/error_phonebook.rb +13 -3
  44. data/lib/messente_api/models/error_statistics.rb +13 -3
  45. data/lib/messente_api/models/error_title_omnichannel.rb +2 -2
  46. data/lib/messente_api/models/error_title_phonebook.rb +2 -2
  47. data/lib/messente_api/models/fetch_blacklist_success.rb +13 -3
  48. data/lib/messente_api/models/group_envelope.rb +13 -3
  49. data/lib/messente_api/models/group_list_envelope.rb +13 -3
  50. data/lib/messente_api/models/group_name.rb +13 -3
  51. data/lib/messente_api/models/group_response_fields.rb +14 -3
  52. data/lib/messente_api/models/message_result.rb +13 -3
  53. data/lib/messente_api/models/mobile_network.rb +13 -3
  54. data/lib/messente_api/models/number_to_blacklist.rb +13 -3
  55. data/lib/messente_api/models/numbers_to_investigate.rb +13 -3
  56. data/lib/messente_api/models/omni_message_create_success_response.rb +13 -3
  57. data/lib/messente_api/models/omnimessage.rb +26 -7
  58. data/lib/messente_api/models/priority.rb +37 -0
  59. data/lib/messente_api/models/sms.rb +13 -3
  60. data/lib/messente_api/models/statistics_report.rb +13 -3
  61. data/lib/messente_api/models/statistics_report_settings.rb +14 -4
  62. data/lib/messente_api/models/statistics_report_success.rb +13 -3
  63. data/lib/messente_api/models/status.rb +2 -2
  64. data/lib/messente_api/models/sync_number_lookup_result.rb +20 -4
  65. data/lib/messente_api/models/sync_number_lookup_success.rb +13 -3
  66. data/lib/messente_api/models/telegram.rb +13 -3
  67. data/lib/messente_api/models/text_store.rb +2 -2
  68. data/lib/messente_api/models/viber.rb +13 -3
  69. data/lib/messente_api/models/whats_app.rb +13 -3
  70. data/lib/messente_api/models/whats_app_audio.rb +13 -3
  71. data/lib/messente_api/models/whats_app_document.rb +13 -3
  72. data/lib/messente_api/models/whats_app_image.rb +13 -3
  73. data/lib/messente_api/models/whats_app_text.rb +13 -3
  74. data/lib/messente_api/version.rb +3 -3
  75. data/messente_api.gemspec +2 -8
  76. data/spec/api_client_spec.rb +3 -3
  77. data/spec/configuration_spec.rb +2 -2
  78. data/spec/spec_helper.rb +2 -2
  79. metadata +15 -132
  80. 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: a42738696eae565729ee2087cc254d3000f442c791af10ef29446eb7a6699a37
4
+ data.tar.gz: a43474a47328423758c9786e37414073e30a8767ce93a407faf2eb78251dea2d
5
5
  SHA512:
6
- metadata.gz: 255085afc92ce6ca1966ba37a5da37006df87247fd06c6b16a26d5041628a10594942f19fdd9ee68ba94b3a1f38d22248851633ecc1d12d89d35916a4945af2f
7
- data.tar.gz: 026e3b7091708def43b19321fb4d53d81e8318d6fba4d55a77ad9c65a8e12273c724dbbd287244fb3c159d13f69e639e226c20ab498994e8fc479c5d4ad9391a
6
+ metadata.gz: e2ec6073025f0b124150cfe9351233d706694fcb5aba588b9daa92d16cc4734378b39bdd6137febf78df673d5b5031518f625d111d09147a52473176759de615
7
+ data.tar.gz: 0bbd80c32a9273ec7e89af795b6755332370c4ac789857c78f7dd4d50ea52f54e7cf10df63d6bceb362c172b1f6dfa58e85f6fc8c41b94a68d30db33cdb037da
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
- - Messente API version: 1.2.0
4
- - Ruby gem version: 1.2.0
3
+ - Messente API version: 1.4.0
4
+ - Ruby gem version: 1.4.0
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
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **contact** | [**ContactFields**](ContactFields.md) | | [optional]
7
+ **contact** | [**ContactResponseFields**](ContactResponseFields.md) | | [optional]
8
8
 
9
9
  ## Code Sample
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **contacts** | [**Array<ContactFields>**](ContactFields.md) | An array of contacts | [optional]
7
+ **contacts** | [**Array<ContactResponseFields>**](ContactResponseFields.md) | An array of contacts | [optional]
8
8
 
9
9
  ## Code Sample
10
10
 
@@ -0,0 +1,37 @@
1
+ # MessenteApi::ContactResponseFields
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **phone_number** | **String** | Phone number in e.164 format | [optional]
8
+ **email** | **String** | The email of the contact | [optional]
9
+ **first_name** | **String** | The first name of the contact | [optional]
10
+ **last_name** | **String** | The last name of the contact | [optional]
11
+ **company** | **String** | The company of the contact | [optional]
12
+ **title** | **String** | The title of the contact | [optional]
13
+ **custom** | **String** | The first custom field | [optional]
14
+ **custom2** | **String** | The second custom field | [optional]
15
+ **custom3** | **String** | The third custom field | [optional]
16
+ **custom4** | **String** | The fourth custom field | [optional]
17
+ **scheduled_deletion_date** | **Date** | The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days | [optional]
18
+
19
+ ## Code Sample
20
+
21
+ ```ruby
22
+ require 'MessenteApi'
23
+
24
+ instance = MessenteApi::ContactResponseFields.new(phone_number: null,
25
+ email: null,
26
+ first_name: null,
27
+ last_name: null,
28
+ company: null,
29
+ title: null,
30
+ custom: null,
31
+ custom2: null,
32
+ custom3: null,
33
+ custom4: null,
34
+ scheduled_deletion_date: null)
35
+ ```
36
+
37
+
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **dlr_url** | **String** | URL where the delivery report will be sent | [optional]
10
10
  **text_store** | [**TextStore**](TextStore.md) | | [optional]
11
11
  **time_to_send** | **DateTime** | Optional parameter for sending messages at some specific time in the future. Time must be specified in the ISO-8601 format. If no timezone is specified, then the timezone is assumed to be UTC Examples: * Time specified with timezone: 2018-06-22T09:05:07+00:00 Time specified in UTC: 2018-06-22T09:05:07Z * Time specified without timezone: 2018-06-22T09:05 (equivalent to 2018-06-22T09:05+00:00) | [optional]
12
+ **priority** | [**Priority**](Priority.md) | | [optional]
12
13
 
13
14
  ## Code Sample
14
15
 
@@ -19,7 +20,8 @@ instance = MessenteApi::Omnimessage.new(to: null,
19
20
  messages: null,
20
21
  dlr_url: null,
21
22
  text_store: null,
22
- time_to_send: null)
23
+ time_to_send: null,
24
+ priority: null)
23
25
  ```
24
26
 
25
27
 
@@ -11,7 +11,7 @@ Method | HTTP request | Description
11
11
 
12
12
  ## cancel_scheduled_message
13
13
 
14
- > cancel_scheduled_message(omnimessage_id)
14
+ > Object cancel_scheduled_message(omnimessage_id)
15
15
 
16
16
  Cancels a scheduled Omnimessage
17
17
 
@@ -32,7 +32,8 @@ omnimessage_id = 'omnimessage_id_example' # String | UUID of the scheduled omnim
32
32
 
33
33
  begin
34
34
  #Cancels a scheduled Omnimessage
35
- api_instance.cancel_scheduled_message(omnimessage_id)
35
+ result = api_instance.cancel_scheduled_message(omnimessage_id)
36
+ p result
36
37
  rescue MessenteApi::ApiError => e
37
38
  puts "Exception when calling OmnimessageApi->cancel_scheduled_message: #{e}"
38
39
  end
@@ -47,7 +48,7 @@ Name | Type | Description | Notes
47
48
 
48
49
  ### Return type
49
50
 
50
- nil (empty response body)
51
+ **Object**
51
52
 
52
53
  ### Authorization
53
54
 
@@ -0,0 +1,16 @@
1
+ # MessenteApi::Priority
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'MessenteApi'
12
+
13
+ instance = MessenteApi::Priority.new()
14
+ ```
15
+
16
+
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **start_date** | **Date** | Start date for the report |
8
8
  **end_date** | **Date** | End date for the report |
9
- **message_types** | **Array<String>** | Optional list of message types (sms, viber, whatsapp, hlr) | [optional]
9
+ **message_types** | **Array<String>** | Optional list of message types (sms, viber, whatsapp, hlr, telegram) | [optional]
10
10
 
11
11
  ## Code Sample
12
12
 
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
12
12
  **original_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional]
13
13
  **ported_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional]
14
14
  **status** | **String** | Status of the phone number | [optional]
15
- **error** | **Object** | Indicates if any error occurred while handling the request | [optional]
15
+ **error** | [**AnyType**](.md) | Indicates if any error occurred while handling the request | [optional]
16
16
 
17
17
  ## Code Sample
18
18
 
@@ -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
 
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -21,6 +21,7 @@ require 'messente_api/models/channel'
21
21
  require 'messente_api/models/contact_envelope'
22
22
  require 'messente_api/models/contact_fields'
23
23
  require 'messente_api/models/contact_list_envelope'
24
+ require 'messente_api/models/contact_response_fields'
24
25
  require 'messente_api/models/contact_update_fields'
25
26
  require 'messente_api/models/delivery_report_response'
26
27
  require 'messente_api/models/delivery_result'
@@ -50,6 +51,7 @@ require 'messente_api/models/number_to_blacklist'
50
51
  require 'messente_api/models/numbers_to_investigate'
51
52
  require 'messente_api/models/omni_message_create_success_response'
52
53
  require 'messente_api/models/omnimessage'
54
+ require 'messente_api/models/priority'
53
55
  require 'messente_api/models/sms'
54
56
  require 'messente_api/models/statistics_report'
55
57
  require 'messente_api/models/statistics_report_settings'
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -22,16 +22,16 @@ module MessenteApi
22
22
  # Cancels a scheduled Omnimessage
23
23
  # @param omnimessage_id [String] UUID of the scheduled omnimessage to be cancelled
24
24
  # @param [Hash] opts the optional parameters
25
- # @return [nil]
25
+ # @return [Object]
26
26
  def cancel_scheduled_message(omnimessage_id, opts = {})
27
- cancel_scheduled_message_with_http_info(omnimessage_id, opts)
28
- nil
27
+ data, _status_code, _headers = cancel_scheduled_message_with_http_info(omnimessage_id, opts)
28
+ data
29
29
  end
30
30
 
31
31
  # Cancels a scheduled Omnimessage
32
32
  # @param omnimessage_id [String] UUID of the scheduled omnimessage to be cancelled
33
33
  # @param [Hash] opts the optional parameters
34
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
34
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
35
35
  def cancel_scheduled_message_with_http_info(omnimessage_id, opts = {})
36
36
  if @api_client.config.debugging
37
37
  @api_client.config.logger.debug 'Calling API: OmnimessageApi.cancel_scheduled_message ...'
@@ -58,7 +58,7 @@ module MessenteApi
58
58
  post_body = opts[:body]
59
59
 
60
60
  # return_type
61
- return_type = opts[:return_type]
61
+ return_type = opts[:return_type] || 'Object'
62
62
 
63
63
  # auth_names
64
64
  auth_names = opts[:auth_names] || ['basicAuth']
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
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.2.0
6
+ The version of the OpenAPI document: 1.4.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.1
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
@@ -241,11 +269,13 @@ module MessenteApi
241
269
  tempfile.write(chunk)
242
270
  end
243
271
  request.on_complete do |response|
244
- tempfile.close if tempfile
245
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
246
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
247
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
248
- "explicitly with `tempfile.delete`"
272
+ if tempfile
273
+ tempfile.close
274
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
275
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
276
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
277
+ "explicitly with `tempfile.delete`"
278
+ end
249
279
  end
250
280
  end
251
281
 
@@ -264,34 +294,6 @@ module MessenteApi
264
294
  @config.base_url + path
265
295
  end
266
296
 
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
297
  # Update hearder and query params based on authentication settings.
296
298
  #
297
299
  # @param [Hash] header_params Header parameters