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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4fd882f4b79bd2dc9e804c999e81cf4e3e4366986e97c9b62b1ae113a77ff6a2
4
- data.tar.gz: e37894538a46765feb464b5e733ea9ac78f25383cfd1c0e70073b2d14ccc9ee2
3
+ metadata.gz: bd77dcfab20d6927ba0bff6a8aa7a2d85aecc73742fdf09093b3063fcabb148d
4
+ data.tar.gz: cd516da741e8f78eba6c71712a80750051c1690056f603700652ace4631d443a
5
5
  SHA512:
6
- metadata.gz: c2e2be95c7bfe17c31fed3cd534922c6242f76b7ba53211ffa44a748fbf36994c8b9ca4815ef288294f337ce4e663a94cbd2684cd4877a4a776962a7c6cbbd93
7
- data.tar.gz: 7d9b9c02efa09817dd0f5fa8b5fb25338a63fbbf9918c37c8dc76a93e2d964b7fe0bf34e8779c22e696c6a791c5bedc3d02ff51bed61efb34b4f3bd3f0ee191d
6
+ metadata.gz: 255085afc92ce6ca1966ba37a5da37006df87247fd06c6b16a26d5041628a10594942f19fdd9ee68ba94b3a1f38d22248851633ecc1d12d89d35916a4945af2f
7
+ data.tar.gz: 026e3b7091708def43b19321fb4d53d81e8318d6fba4d55a77ad9c65a8e12273c724dbbd287244fb3c159d13f69e639e226c20ab498994e8fc479c5d4ad9391a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- messente_api (1.1.0)
4
+ messente_api (1.2.0)
5
5
  json (~> 2.1, >= 2.1.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Messente API Library
2
2
 
3
- - Messente API version: 1.1.0
4
- - Ruby gem version: 1.1.0
3
+ - Messente API version: 1.2.0
4
+ - Ruby gem version: 1.2.0
5
5
 
6
- [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.
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
 
8
8
  ## Installation
9
9
 
@@ -48,11 +48,19 @@ Messente API Library provides the operations described below to access the featu
48
48
  1. Returns all groups [`fetch_groups`](docs/GroupsApi.md#fetch_groups)
49
49
  1. Updates a group with the provided name [`update_group`](docs/GroupsApi.md#update_group)
50
50
 
51
+ ### NumberLookupApi
52
+
53
+ 1. Requests info about phone numbers [`fetch_info`](docs/NumberLookupApi.md#fetch_info)
54
+
51
55
  ### OmnimessageApi
52
56
 
53
57
  1. Cancels a scheduled Omnimessage [`cancel_scheduled_message`](docs/OmnimessageApi.md#cancel_scheduled_message)
54
58
  1. Sends an Omnimessage [`send_omnimessage`](docs/OmnimessageApi.md#send_omnimessage)
55
59
 
60
+ ### StatisticsApi
61
+
62
+ 1. Requests statistics reports for each country [`create_statistics_report`](docs/StatisticsApi.md#create_statistics_report)
63
+
56
64
  ## Auth
57
65
 
58
66
  **Type**: HTTP basic authentication
@@ -0,0 +1,16 @@
1
+ # MessenteApi::ErrorCodeStatistics
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'MessenteApi'
12
+
13
+ instance = MessenteApi::ErrorCodeStatistics.new()
14
+ ```
15
+
16
+
@@ -0,0 +1,17 @@
1
+ # MessenteApi::ErrorItemNumberLookup
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **error** | [**ErrorItemNumberLookupError**](ErrorItemNumberLookupError.md) | |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'MessenteApi'
13
+
14
+ instance = MessenteApi::ErrorItemNumberLookup.new(error: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,19 @@
1
+ # MessenteApi::ErrorItemNumberLookupError
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **description** | **String** | Error description |
8
+ **code** | **Integer** | Matches the following error title. This field is a constant * 101 - Unauthorized * 102 - Invalid arguments or parameters * 103 - Server error * 104 - Crediting error #1 * 105 - Crediting error #2 * 106 - Client error |
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'MessenteApi'
14
+
15
+ instance = MessenteApi::ErrorItemNumberLookupError.new(description: null,
16
+ code: null)
17
+ ```
18
+
19
+
@@ -0,0 +1,21 @@
1
+ # MessenteApi::ErrorItemStatistics
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **title** | **String** | Error title |
8
+ **details** | **String** | Error details |
9
+ **code** | [**ErrorCodeStatistics**](ErrorCodeStatistics.md) | |
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'MessenteApi'
15
+
16
+ instance = MessenteApi::ErrorItemStatistics.new(title: null,
17
+ details: null,
18
+ code: null)
19
+ ```
20
+
21
+
@@ -0,0 +1,17 @@
1
+ # MessenteApi::ErrorNumberLookup
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **errors** | [**Array<ErrorItemNumberLookup>**](ErrorItemNumberLookup.md) | An array of errors |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'MessenteApi'
13
+
14
+ instance = MessenteApi::ErrorNumberLookup.new(errors: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,17 @@
1
+ # MessenteApi::ErrorStatistics
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **errors** | [**Array<ErrorItemStatistics>**](ErrorItemStatistics.md) | An array of errors |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'MessenteApi'
13
+
14
+ instance = MessenteApi::ErrorStatistics.new(errors: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,25 @@
1
+ # MessenteApi::MobileNetwork
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **mccmnc** | **String** | Mobile country and mobile network code | [optional]
8
+ **network_name** | **String** | Mobile network name | [optional]
9
+ **country_name** | **String** | Country name | [optional]
10
+ **country_prefix** | **String** | Country prefix | [optional]
11
+ **country_code** | **String** | Country code | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'MessenteApi'
17
+
18
+ instance = MessenteApi::MobileNetwork.new(mccmnc: null,
19
+ network_name: null,
20
+ country_name: null,
21
+ country_prefix: null,
22
+ country_code: null)
23
+ ```
24
+
25
+
@@ -0,0 +1,60 @@
1
+ # MessenteApi::NumberLookupApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**fetch_info**](NumberLookupApi.md#fetch_info) | **POST** /hlr/sync | Requests info about phone numbers
8
+
9
+
10
+
11
+ ## fetch_info
12
+
13
+ > SyncNumberLookupSuccess fetch_info(numbers_to_investigate)
14
+
15
+ Requests info about phone numbers
16
+
17
+ ### Example
18
+
19
+ ```ruby
20
+ # load the gem
21
+ require 'messente_api'
22
+ # setup authorization
23
+ MessenteApi.configure do |config|
24
+ # Configure HTTP basic authorization: basicAuth
25
+ config.username = 'YOUR USERNAME'
26
+ config.password = 'YOUR PASSWORD'
27
+ end
28
+
29
+ api_instance = MessenteApi::NumberLookupApi.new
30
+ numbers_to_investigate = {"numbers":["+37251000000","+37251000001"]} # NumbersToInvestigate | Numbers for lookup
31
+
32
+ begin
33
+ #Requests info about phone numbers
34
+ result = api_instance.fetch_info(numbers_to_investigate)
35
+ p result
36
+ rescue MessenteApi::ApiError => e
37
+ puts "Exception when calling NumberLookupApi->fetch_info: #{e}"
38
+ end
39
+ ```
40
+
41
+ ### Parameters
42
+
43
+
44
+ Name | Type | Description | Notes
45
+ ------------- | ------------- | ------------- | -------------
46
+ **numbers_to_investigate** | [**NumbersToInvestigate**](NumbersToInvestigate.md)| Numbers for lookup |
47
+
48
+ ### Return type
49
+
50
+ [**SyncNumberLookupSuccess**](SyncNumberLookupSuccess.md)
51
+
52
+ ### Authorization
53
+
54
+ [basicAuth](../README.md#basicAuth)
55
+
56
+ ### HTTP request headers
57
+
58
+ - **Content-Type**: application/json
59
+ - **Accept**: application/json
60
+
@@ -0,0 +1,17 @@
1
+ # MessenteApi::NumbersToInvestigate
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **numbers** | **Array<String>** | Array of phone numbers |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'MessenteApi'
13
+
14
+ instance = MessenteApi::NumbersToInvestigate.new(numbers: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,60 @@
1
+ # MessenteApi::StatisticsApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_statistics_report**](StatisticsApi.md#create_statistics_report) | **POST** /statistics/reports | Requests statistics reports for each country
8
+
9
+
10
+
11
+ ## create_statistics_report
12
+
13
+ > StatisticsReportSuccess create_statistics_report(statistics_report_settings)
14
+
15
+ Requests statistics reports for each country
16
+
17
+ ### Example
18
+
19
+ ```ruby
20
+ # load the gem
21
+ require 'messente_api'
22
+ # setup authorization
23
+ MessenteApi.configure do |config|
24
+ # Configure HTTP basic authorization: basicAuth
25
+ config.username = 'YOUR USERNAME'
26
+ config.password = 'YOUR PASSWORD'
27
+ end
28
+
29
+ api_instance = MessenteApi::StatisticsApi.new
30
+ statistics_report_settings = {"start_date":"2017-01-01","end_date":"2019-06-20","message_types":["sms"]} # StatisticsReportSettings | Settings for statistics report
31
+
32
+ begin
33
+ #Requests statistics reports for each country
34
+ result = api_instance.create_statistics_report(statistics_report_settings)
35
+ p result
36
+ rescue MessenteApi::ApiError => e
37
+ puts "Exception when calling StatisticsApi->create_statistics_report: #{e}"
38
+ end
39
+ ```
40
+
41
+ ### Parameters
42
+
43
+
44
+ Name | Type | Description | Notes
45
+ ------------- | ------------- | ------------- | -------------
46
+ **statistics_report_settings** | [**StatisticsReportSettings**](StatisticsReportSettings.md)| Settings for statistics report |
47
+
48
+ ### Return type
49
+
50
+ [**StatisticsReportSuccess**](StatisticsReportSuccess.md)
51
+
52
+ ### Authorization
53
+
54
+ [basicAuth](../README.md#basicAuth)
55
+
56
+ ### HTTP request headers
57
+
58
+ - **Content-Type**: application/json
59
+ - **Accept**: application/json
60
+
@@ -0,0 +1,21 @@
1
+ # MessenteApi::StatisticsReport
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **total_messages** | **Integer** | Sum of all messages |
8
+ **total_price** | **String** | Price for all messages |
9
+ **country** | **String** | Target country of all messages |
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'MessenteApi'
15
+
16
+ instance = MessenteApi::StatisticsReport.new(total_messages: null,
17
+ total_price: null,
18
+ country: null)
19
+ ```
20
+
21
+
@@ -0,0 +1,21 @@
1
+ # MessenteApi::StatisticsReportSettings
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **start_date** | **Date** | Start date for the report |
8
+ **end_date** | **Date** | End date for the report |
9
+ **message_types** | **Array<String>** | Optional list of message types (sms, viber, whatsapp, hlr) | [optional]
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'MessenteApi'
15
+
16
+ instance = MessenteApi::StatisticsReportSettings.new(start_date: null,
17
+ end_date: null,
18
+ message_types: null)
19
+ ```
20
+
21
+
@@ -0,0 +1,17 @@
1
+ # MessenteApi::StatisticsReportSuccess
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **reports** | [**Array<StatisticsReport>**](StatisticsReport.md) | Array of report objects |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'MessenteApi'
13
+
14
+ instance = MessenteApi::StatisticsReportSuccess.new(reports: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,33 @@
1
+ # MessenteApi::SyncNumberLookupResult
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **number** | **String** | Phone number in e.164 format |
8
+ **roaming** | **Boolean** | Indicates if a number is roaming | [optional]
9
+ **ported** | **Boolean** | Indicates if a number is ported | [optional]
10
+ **roaming_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional]
11
+ **current_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional]
12
+ **original_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional]
13
+ **ported_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional]
14
+ **status** | **String** | Status of the phone number | [optional]
15
+ **error** | **Object** | Indicates if any error occurred while handling the request | [optional]
16
+
17
+ ## Code Sample
18
+
19
+ ```ruby
20
+ require 'MessenteApi'
21
+
22
+ instance = MessenteApi::SyncNumberLookupResult.new(number: null,
23
+ roaming: null,
24
+ ported: null,
25
+ roaming_network: null,
26
+ current_network: null,
27
+ original_network: null,
28
+ ported_network: null,
29
+ status: null,
30
+ error: null)
31
+ ```
32
+
33
+
@@ -0,0 +1,19 @@
1
+ # MessenteApi::SyncNumberLookupSuccess
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **request_id** | **String** | ID of the request |
8
+ **result** | [**Array<SyncNumberLookupResult>**](SyncNumberLookupResult.md) | A container for phone number info objects |
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'MessenteApi'
14
+
15
+ instance = MessenteApi::SyncNumberLookupSuccess.new(request_id: null,
16
+ result: null)
17
+ ```
18
+
19
+