messente_api 2.2.0 → 2.4.0

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 (138) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -1
  3. data/docs/AccountBalanceApi.md +161 -0
  4. data/docs/NumberVerificationApi.md +195 -0
  5. data/docs/Price.md +24 -0
  6. data/docs/PriceNetworksInner.md +22 -0
  7. data/docs/PricingApi.md +167 -0
  8. data/docs/WhatsApp.md +13 -1
  9. data/docs/WhatsAppAudio.md +22 -0
  10. data/docs/WhatsAppDocument.md +26 -0
  11. data/docs/WhatsAppImage.md +24 -0
  12. data/docs/WhatsAppParameter.md +5 -1
  13. data/docs/WhatsAppSticker.md +24 -0
  14. data/docs/WhatsAppTemplate.md +1 -1
  15. data/docs/WhatsAppTemplatesApi.md +384 -0
  16. data/docs/WhatsAppText.md +20 -0
  17. data/docs/WhatsAppVideo.md +24 -0
  18. data/docs/WhatsappButtonType.md +15 -0
  19. data/docs/WhatsappComponentType.md +15 -0
  20. data/docs/WhatsappCreateTemplateRequest.md +24 -0
  21. data/docs/WhatsappCreateTemplateResponse.md +22 -0
  22. data/docs/WhatsappHeaderFormat.md +15 -0
  23. data/docs/WhatsappListTemplatesResponse.md +20 -0
  24. data/docs/WhatsappOtpButtonType.md +15 -0
  25. data/docs/WhatsappPagination.md +22 -0
  26. data/docs/WhatsappPagingCursors.md +20 -0
  27. data/docs/WhatsappSupportedApp.md +20 -0
  28. data/docs/WhatsappTemplateButton.md +30 -0
  29. data/docs/WhatsappTemplateCategory.md +15 -0
  30. data/docs/WhatsappTemplateComponent.md +26 -0
  31. data/docs/WhatsappTemplateExample.md +20 -0
  32. data/docs/WhatsappTemplateResponse.md +28 -0
  33. data/docs/WhatsappTemplateStatus.md +15 -0
  34. data/docs/WhatsappUpdateTemplateRequest.md +20 -0
  35. data/lib/messente_api/api/account_balance_api.rb +160 -0
  36. data/lib/messente_api/api/blacklist_api.rb +5 -5
  37. data/lib/messente_api/api/bulk_messaging_api.rb +2 -2
  38. data/lib/messente_api/api/contacts_api.rb +9 -9
  39. data/lib/messente_api/api/delivery_report_api.rb +2 -2
  40. data/lib/messente_api/api/groups_api.rb +6 -6
  41. data/lib/messente_api/api/number_lookup_api.rb +2 -2
  42. data/lib/messente_api/api/number_verification_api.rb +217 -0
  43. data/lib/messente_api/api/omnimessage_api.rb +3 -3
  44. data/lib/messente_api/api/pricing_api.rb +170 -0
  45. data/lib/messente_api/api/statistics_api.rb +2 -2
  46. data/lib/messente_api/api/whats_app_templates_api.rb +399 -0
  47. data/lib/messente_api/api_client.rb +1 -1
  48. data/lib/messente_api/api_error.rb +1 -1
  49. data/lib/messente_api/configuration.rb +61 -1
  50. data/lib/messente_api/models/bulk_omni_message_create_success_response.rb +1 -1
  51. data/lib/messente_api/models/bulk_omni_message_create_success_response_messages_inner.rb +1 -1
  52. data/lib/messente_api/models/bulk_omnimessage.rb +1 -1
  53. data/lib/messente_api/models/channel.rb +1 -1
  54. data/lib/messente_api/models/contact_envelope.rb +1 -1
  55. data/lib/messente_api/models/contact_fields.rb +1 -1
  56. data/lib/messente_api/models/contact_list_envelope.rb +1 -1
  57. data/lib/messente_api/models/contact_response_fields.rb +1 -1
  58. data/lib/messente_api/models/contact_update_fields.rb +1 -1
  59. data/lib/messente_api/models/delivery_report_response.rb +1 -1
  60. data/lib/messente_api/models/delivery_result.rb +1 -1
  61. data/lib/messente_api/models/error_code_omnichannel.rb +1 -1
  62. data/lib/messente_api/models/error_code_omnichannel_machine.rb +1 -1
  63. data/lib/messente_api/models/error_code_phonebook.rb +1 -1
  64. data/lib/messente_api/models/error_code_statistics.rb +1 -1
  65. data/lib/messente_api/models/error_item_number_lookup.rb +1 -1
  66. data/lib/messente_api/models/error_item_number_lookup_error.rb +1 -1
  67. data/lib/messente_api/models/error_item_omnichannel.rb +1 -1
  68. data/lib/messente_api/models/error_item_phonebook.rb +1 -1
  69. data/lib/messente_api/models/error_item_statistics.rb +1 -1
  70. data/lib/messente_api/models/error_number_lookup.rb +1 -1
  71. data/lib/messente_api/models/error_omnichannel.rb +1 -1
  72. data/lib/messente_api/models/error_phonebook.rb +1 -1
  73. data/lib/messente_api/models/error_statistics.rb +1 -1
  74. data/lib/messente_api/models/error_title_omnichannel.rb +1 -1
  75. data/lib/messente_api/models/error_title_phonebook.rb +1 -1
  76. data/lib/messente_api/models/fetch_blacklist_success.rb +1 -1
  77. data/lib/messente_api/models/group_envelope.rb +1 -1
  78. data/lib/messente_api/models/group_list_envelope.rb +1 -1
  79. data/lib/messente_api/models/group_name.rb +1 -1
  80. data/lib/messente_api/models/group_response_fields.rb +1 -1
  81. data/lib/messente_api/models/message_result.rb +1 -1
  82. data/lib/messente_api/models/mobile_network.rb +1 -1
  83. data/lib/messente_api/models/number_to_blacklist.rb +1 -1
  84. data/lib/messente_api/models/numbers_to_investigate.rb +1 -1
  85. data/lib/messente_api/models/omni_message_create_success_response.rb +1 -1
  86. data/lib/messente_api/models/omnimessage.rb +1 -1
  87. data/lib/messente_api/models/omnimessage_messages_inner.rb +1 -1
  88. data/lib/messente_api/models/price.rb +276 -0
  89. data/lib/messente_api/models/price_info.rb +1 -1
  90. data/lib/messente_api/models/price_networks_inner.rb +257 -0
  91. data/lib/messente_api/models/priority.rb +1 -1
  92. data/lib/messente_api/models/sms.rb +1 -1
  93. data/lib/messente_api/models/statistics_report.rb +1 -1
  94. data/lib/messente_api/models/statistics_report_settings.rb +1 -1
  95. data/lib/messente_api/models/statistics_report_success.rb +1 -1
  96. data/lib/messente_api/models/status.rb +1 -1
  97. data/lib/messente_api/models/sync_number_lookup_result.rb +1 -1
  98. data/lib/messente_api/models/sync_number_lookup_success.rb +1 -1
  99. data/lib/messente_api/models/telegram.rb +1 -1
  100. data/lib/messente_api/models/text_store.rb +1 -1
  101. data/lib/messente_api/models/viber.rb +1 -1
  102. data/lib/messente_api/models/viber_video.rb +1 -1
  103. data/lib/messente_api/models/whats_app.rb +59 -5
  104. data/lib/messente_api/models/whats_app_audio.rb +239 -0
  105. data/lib/messente_api/models/whats_app_component.rb +2 -1
  106. data/lib/messente_api/models/whats_app_currency.rb +1 -1
  107. data/lib/messente_api/models/whats_app_datetime.rb +1 -1
  108. data/lib/messente_api/models/whats_app_document.rb +261 -0
  109. data/lib/messente_api/models/whats_app_image.rb +250 -0
  110. data/lib/messente_api/models/whats_app_language.rb +1 -1
  111. data/lib/messente_api/models/whats_app_media.rb +1 -1
  112. data/lib/messente_api/models/whats_app_parameter.rb +25 -5
  113. data/lib/messente_api/models/whats_app_sticker.rb +250 -0
  114. data/lib/messente_api/models/whats_app_template.rb +8 -1
  115. data/lib/messente_api/models/whats_app_text.rb +235 -0
  116. data/lib/messente_api/models/whats_app_video.rb +250 -0
  117. data/lib/messente_api/models/whatsapp_button_type.rb +45 -0
  118. data/lib/messente_api/models/whatsapp_component_type.rb +42 -0
  119. data/lib/messente_api/models/whatsapp_create_template_request.rb +297 -0
  120. data/lib/messente_api/models/whatsapp_create_template_response.rb +277 -0
  121. data/lib/messente_api/models/whatsapp_header_format.rb +39 -0
  122. data/lib/messente_api/models/whatsapp_list_templates_response.rb +241 -0
  123. data/lib/messente_api/models/whatsapp_otp_button_type.rb +41 -0
  124. data/lib/messente_api/models/whatsapp_pagination.rb +242 -0
  125. data/lib/messente_api/models/whatsapp_paging_cursors.rb +226 -0
  126. data/lib/messente_api/models/whatsapp_supported_app.rb +240 -0
  127. data/lib/messente_api/models/whatsapp_template_button.rb +355 -0
  128. data/lib/messente_api/models/whatsapp_template_category.rb +41 -0
  129. data/lib/messente_api/models/whatsapp_template_component.rb +277 -0
  130. data/lib/messente_api/models/whatsapp_template_example.rb +230 -0
  131. data/lib/messente_api/models/whatsapp_template_response.rb +330 -0
  132. data/lib/messente_api/models/whatsapp_template_status.rb +47 -0
  133. data/lib/messente_api/models/whatsapp_update_template_request.rb +227 -0
  134. data/lib/messente_api/version.rb +2 -2
  135. data/lib/messente_api.rb +30 -1
  136. data/messente_api.gemspec +1 -1
  137. data/spec/spec_helper.rb +1 -1
  138. metadata +60 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee58be9559a61fa1ea3a5574c3251075df0a2c81cfee73d6434d07aa56839356
4
- data.tar.gz: ac898a07b96df35563ecd1c66949c9d666b3a3ebb8fefda2ed26543b40b099a3
3
+ metadata.gz: f8944339304c1f4eaa48499a6b69727a16dfe396794674727ffd175ae4c22225
4
+ data.tar.gz: 4bb1bf0fb6a316bea64fa8a9911a4a42a86eb9f20c221e5d05f31e9e0aba40a4
5
5
  SHA512:
6
- metadata.gz: cbf1572d1dd1fe540b8d9547932b9ffb12e4c2486b45ff28c950c8b92c0e2de2a814f901915b3214f2f49af35b7a6e388e80db90ce3b820fac88d61c94398440
7
- data.tar.gz: f9b9ed86b9d35d59d9861b4cc39d9e17c36b61a4aef0463e89421cede308da0d048f45d2339d743a2069bfaaaf92ccb6c4687aa80df24e05806a7119dbd00603
6
+ metadata.gz: e69625664b4ea8469e721045dbd2f40b7d5da7f23a9a4618fdd908fc040a48e21333088e1f7b7302491997691c9900f9e81ff17b8212e1a62ec0d9bf02e5acdb
7
+ data.tar.gz: d482f41bee3ec10aa51f584ebccb399147b443a866e7197ffc8065fea49bf93a2d01d7454efbe0daa2e03c20dc4101e9939cee27081750906f8b39fa84e68db3
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Messente API Library
2
2
 
3
3
  - Messente API version: 2.0.0
4
- - Ruby gem version: 2.2.0
4
+ - Ruby gem version: 2.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
 
@@ -18,6 +18,11 @@ Messente API has the following features:
18
18
 
19
19
  Messente API Library provides the operations described below to access the features.
20
20
 
21
+ ### AccountBalanceApi
22
+
23
+ 1. Get account balance [`get_account_balance`](docs/AccountBalanceApi.md#get_account_balance)
24
+ 1. Get account balance [`get_account_balance_using_post`](docs/AccountBalanceApi.md#get_account_balance_using_post)
25
+
21
26
  ### BlacklistApi
22
27
 
23
28
  1. Adds a phone number to the blacklist [`add_to_blacklist`](docs/BlacklistApi.md#add_to_blacklist)
@@ -56,15 +61,33 @@ Messente API Library provides the operations described below to access the featu
56
61
 
57
62
  1. Requests info about phone numbers [`fetch_info`](docs/NumberLookupApi.md#fetch_info)
58
63
 
64
+ ### NumberVerificationApi
65
+
66
+ 1. verify number [`verify_number`](docs/NumberVerificationApi.md#verify_number)
67
+ 1. verified the PIN code entered by the user. [`verify_pin`](docs/NumberVerificationApi.md#verify_pin)
68
+
59
69
  ### OmnimessageApi
60
70
 
61
71
  1. Cancels a scheduled Omnimessage [`cancel_scheduled_message`](docs/OmnimessageApi.md#cancel_scheduled_message)
62
72
  1. Sends an Omnimessage [`send_omnimessage`](docs/OmnimessageApi.md#send_omnimessage)
63
73
 
74
+ ### PricingApi
75
+
76
+ 1. Get pricelist for account [`get_pricelist`](docs/PricingApi.md#get_pricelist)
77
+ 1. Get pricing for a specific country [`get_prices`](docs/PricingApi.md#get_prices)
78
+
64
79
  ### StatisticsApi
65
80
 
66
81
  1. Requests statistics reports for each country [`create_statistics_report`](docs/StatisticsApi.md#create_statistics_report)
67
82
 
83
+ ### WhatsAppTemplatesApi
84
+
85
+ 1. Creates a WhatsApp template [`create_whatsapp_template`](docs/WhatsAppTemplatesApi.md#create_whatsapp_template)
86
+ 1. Deletes a WhatsApp template [`delete_whatsapp_template`](docs/WhatsAppTemplatesApi.md#delete_whatsapp_template)
87
+ 1. Requests a WhatsApp template with the given ID [`get_whatsapp_template_by_id`](docs/WhatsAppTemplatesApi.md#get_whatsapp_template_by_id)
88
+ 1. Requests a list of WhatsApp templates [`list_whatsapp_templates`](docs/WhatsAppTemplatesApi.md#list_whatsapp_templates)
89
+ 1. Updates a WhatsApp template [`update_whatsapp_template`](docs/WhatsAppTemplatesApi.md#update_whatsapp_template)
90
+
68
91
  ## Auth
69
92
 
70
93
  **Type**: HTTP basic authentication
@@ -0,0 +1,161 @@
1
+ # MessenteApi::AccountBalanceApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_account_balance**](AccountBalanceApi.md#get_account_balance) | **GET** /get_balance | Get account balance |
8
+ | [**get_account_balance_using_post**](AccountBalanceApi.md#get_account_balance_using_post) | **POST** /get_balance | Get account balance |
9
+
10
+
11
+ ## get_account_balance
12
+
13
+ > String get_account_balance(username, password)
14
+
15
+ Get account balance
16
+
17
+ ### Examples
18
+
19
+ ```ruby
20
+ require 'time'
21
+ require 'messente_api'
22
+ # setup authorization
23
+ MessenteApi.configure do |config|
24
+ # Configure API key authorization: apiPassword
25
+ config.api_key['password'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ # config.api_key_prefix['password'] = 'Bearer'
28
+
29
+ # Configure API key authorization: apiUsername
30
+ config.api_key['username'] = 'YOUR API KEY'
31
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
+ # config.api_key_prefix['username'] = 'Bearer'
33
+ end
34
+
35
+ api_instance = MessenteApi::AccountBalanceApi.new
36
+ username = 'username_example' # String | The API username
37
+ password = 'password_example' # String | The API password
38
+
39
+ begin
40
+ # Get account balance
41
+ result = api_instance.get_account_balance(username, password)
42
+ p result
43
+ rescue MessenteApi::ApiError => e
44
+ puts "Error when calling AccountBalanceApi->get_account_balance: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the get_account_balance_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(String, Integer, Hash)> get_account_balance_with_http_info(username, password)
53
+
54
+ ```ruby
55
+ begin
56
+ # Get account balance
57
+ data, status_code, headers = api_instance.get_account_balance_with_http_info(username, password)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => String
61
+ rescue MessenteApi::ApiError => e
62
+ puts "Error when calling AccountBalanceApi->get_account_balance_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **username** | **String** | The API username | |
71
+ | **password** | **String** | The API password | |
72
+
73
+ ### Return type
74
+
75
+ **String**
76
+
77
+ ### Authorization
78
+
79
+ [apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: Not defined
84
+ - **Accept**: text/plain
85
+
86
+
87
+ ## get_account_balance_using_post
88
+
89
+ > String get_account_balance_using_post(username, password)
90
+
91
+ Get account balance
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'messente_api'
98
+ # setup authorization
99
+ MessenteApi.configure do |config|
100
+ # Configure API key authorization: apiPassword
101
+ config.api_key['password'] = 'YOUR API KEY'
102
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
103
+ # config.api_key_prefix['password'] = 'Bearer'
104
+
105
+ # Configure API key authorization: apiUsername
106
+ config.api_key['username'] = 'YOUR API KEY'
107
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
108
+ # config.api_key_prefix['username'] = 'Bearer'
109
+ end
110
+
111
+ api_instance = MessenteApi::AccountBalanceApi.new
112
+ username = 'username_example' # String | The API username
113
+ password = 'password_example' # String | The API password
114
+
115
+ begin
116
+ # Get account balance
117
+ result = api_instance.get_account_balance_using_post(username, password)
118
+ p result
119
+ rescue MessenteApi::ApiError => e
120
+ puts "Error when calling AccountBalanceApi->get_account_balance_using_post: #{e}"
121
+ end
122
+ ```
123
+
124
+ #### Using the get_account_balance_using_post_with_http_info variant
125
+
126
+ This returns an Array which contains the response data, status code and headers.
127
+
128
+ > <Array(String, Integer, Hash)> get_account_balance_using_post_with_http_info(username, password)
129
+
130
+ ```ruby
131
+ begin
132
+ # Get account balance
133
+ data, status_code, headers = api_instance.get_account_balance_using_post_with_http_info(username, password)
134
+ p status_code # => 2xx
135
+ p headers # => { ... }
136
+ p data # => String
137
+ rescue MessenteApi::ApiError => e
138
+ puts "Error when calling AccountBalanceApi->get_account_balance_using_post_with_http_info: #{e}"
139
+ end
140
+ ```
141
+
142
+ ### Parameters
143
+
144
+ | Name | Type | Description | Notes |
145
+ | ---- | ---- | ----------- | ----- |
146
+ | **username** | **String** | The API username | |
147
+ | **password** | **String** | The API password | |
148
+
149
+ ### Return type
150
+
151
+ **String**
152
+
153
+ ### Authorization
154
+
155
+ [apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
156
+
157
+ ### HTTP request headers
158
+
159
+ - **Content-Type**: Not defined
160
+ - **Accept**: text/plain
161
+
@@ -0,0 +1,195 @@
1
+ # MessenteApi::NumberVerificationApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**verify_number**](NumberVerificationApi.md#verify_number) | **POST** /verify/start | verify number |
8
+ | [**verify_pin**](NumberVerificationApi.md#verify_pin) | **POST** /verify/pin | verified the PIN code entered by the user. |
9
+
10
+
11
+ ## verify_number
12
+
13
+ > String verify_number(username, password, to, opts)
14
+
15
+ verify number
16
+
17
+ ### Examples
18
+
19
+ ```ruby
20
+ require 'time'
21
+ require 'messente_api'
22
+ # setup authorization
23
+ MessenteApi.configure do |config|
24
+ # Configure API key authorization: apiPassword
25
+ config.api_key['password'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ # config.api_key_prefix['password'] = 'Bearer'
28
+
29
+ # Configure API key authorization: apiUsername
30
+ config.api_key['username'] = 'YOUR API KEY'
31
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
+ # config.api_key_prefix['username'] = 'Bearer'
33
+ end
34
+
35
+ api_instance = MessenteApi::NumberVerificationApi.new
36
+ username = 'username_example' # String | The API username
37
+ password = 'password_example' # String | The API password
38
+ to = 'to_example' # String | Receiver's phone number with the country code
39
+ opts = {
40
+ template: 'template_example', # String | Template of the message, including PIN code. Placeholder for PIN code is <PIN>. When not set, default template is used: \"Your Verification PIN code is <PIN>\".
41
+ pin_length: 'pin_length_example', # String | Length of the PIN code. Minumum 4 digits, maximum 16. Defaults to 4.
42
+ from: 'from_example', # String | Sender name. When not set, the default Sender name \"Verigator\" is used. This sender ID also needs to be added to your account beforehand.
43
+ max_tries: 'max_tries_example', # String | Maximum number of times the PIN code is sent in total. Defaults to \"2\" - initial PIN code and one retry. It is discouraged to set this value to \"1\" as only the initial PIN code is sent and retry is disabled.
44
+ retry_delay: 'retry_delay_example', # String | For how long (in seconds) to wait for next retry, if the correct PIN code has not been entered yet? Defaults to 30 seconds.
45
+ validity: 'validity_example', # String | For how long (in seconds) is the PIN code valid. Defaults to 5 minutes (300 seconds). Maximum 30 minutes (1800 seconds).
46
+ ip: 'ip_example', # String | IP address of the client making verification request.
47
+ browser: 'browser_example', # String | User Agent of the browser. For example \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\".
48
+ cookie: 'cookie_example' # String | Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed.
49
+ }
50
+
51
+ begin
52
+ # verify number
53
+ result = api_instance.verify_number(username, password, to, opts)
54
+ p result
55
+ rescue MessenteApi::ApiError => e
56
+ puts "Error when calling NumberVerificationApi->verify_number: #{e}"
57
+ end
58
+ ```
59
+
60
+ #### Using the verify_number_with_http_info variant
61
+
62
+ This returns an Array which contains the response data, status code and headers.
63
+
64
+ > <Array(String, Integer, Hash)> verify_number_with_http_info(username, password, to, opts)
65
+
66
+ ```ruby
67
+ begin
68
+ # verify number
69
+ data, status_code, headers = api_instance.verify_number_with_http_info(username, password, to, opts)
70
+ p status_code # => 2xx
71
+ p headers # => { ... }
72
+ p data # => String
73
+ rescue MessenteApi::ApiError => e
74
+ puts "Error when calling NumberVerificationApi->verify_number_with_http_info: #{e}"
75
+ end
76
+ ```
77
+
78
+ ### Parameters
79
+
80
+ | Name | Type | Description | Notes |
81
+ | ---- | ---- | ----------- | ----- |
82
+ | **username** | **String** | The API username | |
83
+ | **password** | **String** | The API password | |
84
+ | **to** | **String** | Receiver&#39;s phone number with the country code | |
85
+ | **template** | **String** | Template of the message, including PIN code. Placeholder for PIN code is &lt;PIN&gt;. When not set, default template is used: \&quot;Your Verification PIN code is &lt;PIN&gt;\&quot;. | [optional] |
86
+ | **pin_length** | **String** | Length of the PIN code. Minumum 4 digits, maximum 16. Defaults to 4. | [optional] |
87
+ | **from** | **String** | Sender name. When not set, the default Sender name \&quot;Verigator\&quot; is used. This sender ID also needs to be added to your account beforehand. | [optional] |
88
+ | **max_tries** | **String** | Maximum number of times the PIN code is sent in total. Defaults to \&quot;2\&quot; - initial PIN code and one retry. It is discouraged to set this value to \&quot;1\&quot; as only the initial PIN code is sent and retry is disabled. | [optional] |
89
+ | **retry_delay** | **String** | For how long (in seconds) to wait for next retry, if the correct PIN code has not been entered yet? Defaults to 30 seconds. | [optional] |
90
+ | **validity** | **String** | For how long (in seconds) is the PIN code valid. Defaults to 5 minutes (300 seconds). Maximum 30 minutes (1800 seconds). | [optional] |
91
+ | **ip** | **String** | IP address of the client making verification request. | [optional] |
92
+ | **browser** | **String** | User Agent of the browser. For example \&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\&quot;. | [optional] |
93
+ | **cookie** | **String** | Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed. | [optional] |
94
+
95
+ ### Return type
96
+
97
+ **String**
98
+
99
+ ### Authorization
100
+
101
+ [apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
102
+
103
+ ### HTTP request headers
104
+
105
+ - **Content-Type**: Not defined
106
+ - **Accept**: text/plain
107
+
108
+
109
+ ## verify_pin
110
+
111
+ > String verify_pin(username, password, verification_id, pin, opts)
112
+
113
+ verified the PIN code entered by the user.
114
+
115
+ ### Examples
116
+
117
+ ```ruby
118
+ require 'time'
119
+ require 'messente_api'
120
+ # setup authorization
121
+ MessenteApi.configure do |config|
122
+ # Configure API key authorization: apiPassword
123
+ config.api_key['password'] = 'YOUR API KEY'
124
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
125
+ # config.api_key_prefix['password'] = 'Bearer'
126
+
127
+ # Configure API key authorization: apiUsername
128
+ config.api_key['username'] = 'YOUR API KEY'
129
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
130
+ # config.api_key_prefix['username'] = 'Bearer'
131
+ end
132
+
133
+ api_instance = MessenteApi::NumberVerificationApi.new
134
+ username = 'username_example' # String | The API username
135
+ password = 'password_example' # String | The API password
136
+ verification_id = 'verification_id_example' # String | Verification ID returned by the successful verification request.
137
+ pin = 'pin_example' # String | PIN code entered by the user.
138
+ opts = {
139
+ ip: 'ip_example', # String | IP address of the client making verification request. If the IP address is from another country, PIN is required even if the cookies match.
140
+ browser: 'browser_example', # String | User Agent of the browser. For example \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\".
141
+ cookie: 'cookie_example' # String | Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed.
142
+ }
143
+
144
+ begin
145
+ # verified the PIN code entered by the user.
146
+ result = api_instance.verify_pin(username, password, verification_id, pin, opts)
147
+ p result
148
+ rescue MessenteApi::ApiError => e
149
+ puts "Error when calling NumberVerificationApi->verify_pin: #{e}"
150
+ end
151
+ ```
152
+
153
+ #### Using the verify_pin_with_http_info variant
154
+
155
+ This returns an Array which contains the response data, status code and headers.
156
+
157
+ > <Array(String, Integer, Hash)> verify_pin_with_http_info(username, password, verification_id, pin, opts)
158
+
159
+ ```ruby
160
+ begin
161
+ # verified the PIN code entered by the user.
162
+ data, status_code, headers = api_instance.verify_pin_with_http_info(username, password, verification_id, pin, opts)
163
+ p status_code # => 2xx
164
+ p headers # => { ... }
165
+ p data # => String
166
+ rescue MessenteApi::ApiError => e
167
+ puts "Error when calling NumberVerificationApi->verify_pin_with_http_info: #{e}"
168
+ end
169
+ ```
170
+
171
+ ### Parameters
172
+
173
+ | Name | Type | Description | Notes |
174
+ | ---- | ---- | ----------- | ----- |
175
+ | **username** | **String** | The API username | |
176
+ | **password** | **String** | The API password | |
177
+ | **verification_id** | **String** | Verification ID returned by the successful verification request. | |
178
+ | **pin** | **String** | PIN code entered by the user. | |
179
+ | **ip** | **String** | IP address of the client making verification request. If the IP address is from another country, PIN is required even if the cookies match. | [optional] |
180
+ | **browser** | **String** | User Agent of the browser. For example \&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\&quot;. | [optional] |
181
+ | **cookie** | **String** | Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed. | [optional] |
182
+
183
+ ### Return type
184
+
185
+ **String**
186
+
187
+ ### Authorization
188
+
189
+ [apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
190
+
191
+ ### HTTP request headers
192
+
193
+ - **Content-Type**: Not defined
194
+ - **Accept**: text/plain
195
+
data/docs/Price.md ADDED
@@ -0,0 +1,24 @@
1
+ # MessenteApi::Price
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **country** | **String** | The alpha-2 code for the country | |
8
+ | **name** | **String** | The name of the country | |
9
+ | **prefix** | **String** | The country code prefix | |
10
+ | **networks** | [**Array&lt;PriceNetworksInner&gt;**](PriceNetworksInner.md) | A list of networks available in the country | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'messente_api'
16
+
17
+ instance = MessenteApi::Price.new(
18
+ country: EE,
19
+ name: Estonia,
20
+ prefix: 372,
21
+ networks: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # MessenteApi::PriceNetworksInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The name of the network | |
8
+ | **price** | **String** | The price for sending a message to this network | |
9
+ | **mccmnc** | **Float** | The MCCMNC code for the network | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'messente_api'
15
+
16
+ instance = MessenteApi::PriceNetworksInner.new(
17
+ name: Tele2,
18
+ price: 0.01,
19
+ mccmnc: 24602
20
+ )
21
+ ```
22
+
@@ -0,0 +1,167 @@
1
+ # MessenteApi::PricingApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_pricelist**](PricingApi.md#get_pricelist) | **GET** /pricelist | Get pricelist for account |
8
+ | [**get_prices**](PricingApi.md#get_prices) | **GET** /prices | Get pricing for a specific country |
9
+
10
+
11
+ ## get_pricelist
12
+
13
+ > String get_pricelist(username, password)
14
+
15
+ Get pricelist for account
16
+
17
+ ### Examples
18
+
19
+ ```ruby
20
+ require 'time'
21
+ require 'messente_api'
22
+ # setup authorization
23
+ MessenteApi.configure do |config|
24
+ # Configure API key authorization: apiPassword
25
+ config.api_key['password'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ # config.api_key_prefix['password'] = 'Bearer'
28
+
29
+ # Configure API key authorization: apiUsername
30
+ config.api_key['username'] = 'YOUR API KEY'
31
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
+ # config.api_key_prefix['username'] = 'Bearer'
33
+ end
34
+
35
+ api_instance = MessenteApi::PricingApi.new
36
+ username = 'username_example' # String | The API username
37
+ password = 'password_example' # String | The API password
38
+
39
+ begin
40
+ # Get pricelist for account
41
+ result = api_instance.get_pricelist(username, password)
42
+ p result
43
+ rescue MessenteApi::ApiError => e
44
+ puts "Error when calling PricingApi->get_pricelist: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the get_pricelist_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(String, Integer, Hash)> get_pricelist_with_http_info(username, password)
53
+
54
+ ```ruby
55
+ begin
56
+ # Get pricelist for account
57
+ data, status_code, headers = api_instance.get_pricelist_with_http_info(username, password)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => String
61
+ rescue MessenteApi::ApiError => e
62
+ puts "Error when calling PricingApi->get_pricelist_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **username** | **String** | The API username | |
71
+ | **password** | **String** | The API password | |
72
+
73
+ ### Return type
74
+
75
+ **String**
76
+
77
+ ### Authorization
78
+
79
+ [apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: Not defined
84
+ - **Accept**: text/plain
85
+
86
+
87
+ ## get_prices
88
+
89
+ > <Price> get_prices(username, password, country, opts)
90
+
91
+ Get pricing for a specific country
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'messente_api'
98
+ # setup authorization
99
+ MessenteApi.configure do |config|
100
+ # Configure API key authorization: apiPassword
101
+ config.api_key['password'] = 'YOUR API KEY'
102
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
103
+ # config.api_key_prefix['password'] = 'Bearer'
104
+
105
+ # Configure API key authorization: apiUsername
106
+ config.api_key['username'] = 'YOUR API KEY'
107
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
108
+ # config.api_key_prefix['username'] = 'Bearer'
109
+ end
110
+
111
+ api_instance = MessenteApi::PricingApi.new
112
+ username = 'username_example' # String | The API username
113
+ password = 'password_example' # String | The API password
114
+ country = 'EE' # String | The country code, for which to get the prices
115
+ opts = {
116
+ format: 'format_example' # String | The format of the response. Can be either 'json' or 'xml'. If not specified, defaults to 'json'.
117
+ }
118
+
119
+ begin
120
+ # Get pricing for a specific country
121
+ result = api_instance.get_prices(username, password, country, opts)
122
+ p result
123
+ rescue MessenteApi::ApiError => e
124
+ puts "Error when calling PricingApi->get_prices: #{e}"
125
+ end
126
+ ```
127
+
128
+ #### Using the get_prices_with_http_info variant
129
+
130
+ This returns an Array which contains the response data, status code and headers.
131
+
132
+ > <Array(<Price>, Integer, Hash)> get_prices_with_http_info(username, password, country, opts)
133
+
134
+ ```ruby
135
+ begin
136
+ # Get pricing for a specific country
137
+ data, status_code, headers = api_instance.get_prices_with_http_info(username, password, country, opts)
138
+ p status_code # => 2xx
139
+ p headers # => { ... }
140
+ p data # => <Price>
141
+ rescue MessenteApi::ApiError => e
142
+ puts "Error when calling PricingApi->get_prices_with_http_info: #{e}"
143
+ end
144
+ ```
145
+
146
+ ### Parameters
147
+
148
+ | Name | Type | Description | Notes |
149
+ | ---- | ---- | ----------- | ----- |
150
+ | **username** | **String** | The API username | |
151
+ | **password** | **String** | The API password | |
152
+ | **country** | **String** | The country code, for which to get the prices | |
153
+ | **format** | **String** | The format of the response. Can be either &#39;json&#39; or &#39;xml&#39;. If not specified, defaults to &#39;json&#39;. | [optional] |
154
+
155
+ ### Return type
156
+
157
+ [**Price**](Price.md)
158
+
159
+ ### Authorization
160
+
161
+ [apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
162
+
163
+ ### HTTP request headers
164
+
165
+ - **Content-Type**: Not defined
166
+ - **Accept**: application/json, application/xml, text/plain; charset=utf-8
167
+
data/docs/WhatsApp.md CHANGED
@@ -9,6 +9,12 @@
9
9
  | **ttl** | **Integer** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \&quot;ttl\&quot; and \&quot;validity\&quot; can be used. | [optional] |
10
10
  | **template** | [**WhatsAppTemplate**](WhatsAppTemplate.md) | | [optional] |
11
11
  | **channel** | **String** | The channel used to deliver the message | [optional][default to &#39;whatsapp&#39;] |
12
+ | **text** | [**WhatsAppText**](WhatsAppText.md) | | [optional] |
13
+ | **image** | [**WhatsAppImage**](WhatsAppImage.md) | | [optional] |
14
+ | **video** | [**WhatsAppVideo**](WhatsAppVideo.md) | | [optional] |
15
+ | **audio** | [**WhatsAppAudio**](WhatsAppAudio.md) | | [optional] |
16
+ | **document** | [**WhatsAppDocument**](WhatsAppDocument.md) | | [optional] |
17
+ | **sticker** | [**WhatsAppSticker**](WhatsAppSticker.md) | | [optional] |
12
18
 
13
19
  ## Example
14
20
 
@@ -20,7 +26,13 @@ instance = MessenteApi::WhatsApp.new(
20
26
  validity: 360,
21
27
  ttl: 21600,
22
28
  template: null,
23
- channel: null
29
+ channel: null,
30
+ text: null,
31
+ image: null,
32
+ video: null,
33
+ audio: null,
34
+ document: null,
35
+ sticker: null
24
36
  )
25
37
  ```
26
38
 
@@ -0,0 +1,22 @@
1
+ # MessenteApi::WhatsAppAudio
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Unique identifier for the audio file. | [optional] |
8
+ | **mime_type** | **String** | MIME type of the audio file. | [optional] |
9
+ | **link** | **String** | URL link to the audio file. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'messente_api'
15
+
16
+ instance = MessenteApi::WhatsAppAudio.new(
17
+ id: 12345,
18
+ mime_type: audio/mpeg,
19
+ link: https://example.com/audio.mp3
20
+ )
21
+ ```
22
+