messente_api 1.4.0 → 2.2.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.
- checksums.yaml +4 -4
- data/README.md +33 -30
- data/docs/BlacklistApi.md +105 -37
- data/docs/BulkMessagingApi.md +76 -0
- data/docs/BulkOmniMessageCreateSuccessResponse.md +18 -0
- data/docs/BulkOmniMessageCreateSuccessResponseMessagesInner.md +49 -0
- data/docs/BulkOmnimessage.md +18 -0
- data/docs/Channel.md +4 -5
- data/docs/ContactEnvelope.md +8 -7
- data/docs/ContactFields.md +26 -25
- data/docs/ContactListEnvelope.md +8 -7
- data/docs/ContactResponseFields.md +28 -27
- data/docs/ContactUpdateFields.md +24 -23
- data/docs/ContactsApi.md +221 -86
- data/docs/DeliveryReportApi.md +29 -13
- data/docs/DeliveryReportResponse.md +12 -11
- data/docs/DeliveryResult.md +22 -17
- data/docs/ErrorCodeOmnichannel.md +4 -5
- data/docs/ErrorCodeOmnichannelMachine.md +4 -5
- data/docs/ErrorCodePhonebook.md +4 -5
- data/docs/ErrorCodeStatistics.md +4 -5
- data/docs/ErrorItemNumberLookup.md +8 -7
- data/docs/ErrorItemNumberLookupError.md +10 -9
- data/docs/ErrorItemOmnichannel.md +14 -13
- data/docs/ErrorItemPhonebook.md +12 -11
- data/docs/ErrorItemStatistics.md +12 -11
- data/docs/ErrorNumberLookup.md +8 -7
- data/docs/ErrorOmnichannel.md +8 -7
- data/docs/ErrorPhonebook.md +8 -7
- data/docs/ErrorStatistics.md +8 -7
- data/docs/ErrorTitleOmnichannel.md +4 -5
- data/docs/ErrorTitlePhonebook.md +4 -5
- data/docs/FetchBlacklistSuccess.md +8 -7
- data/docs/GroupEnvelope.md +8 -7
- data/docs/GroupListEnvelope.md +8 -7
- data/docs/GroupName.md +8 -7
- data/docs/GroupResponseFields.md +14 -13
- data/docs/GroupsApi.md +136 -51
- data/docs/MessageResult.md +12 -11
- data/docs/MobileNetwork.md +16 -15
- data/docs/NumberLookupApi.md +30 -14
- data/docs/NumberToBlacklist.md +8 -7
- data/docs/NumbersToInvestigate.md +8 -7
- data/docs/OmniMessageCreateSuccessResponse.md +12 -11
- data/docs/Omnimessage.md +18 -17
- data/docs/OmnimessageApi.md +56 -23
- data/docs/OmnimessageMessagesInner.md +53 -0
- data/docs/PriceInfo.md +22 -0
- data/docs/Priority.md +4 -5
- data/docs/SMS.md +20 -17
- data/docs/StatisticsApi.md +30 -14
- data/docs/StatisticsReport.md +12 -11
- data/docs/StatisticsReportSettings.md +12 -11
- data/docs/StatisticsReportSuccess.md +8 -7
- data/docs/Status.md +4 -5
- data/docs/SyncNumberLookupResult.md +24 -23
- data/docs/SyncNumberLookupSuccess.md +10 -9
- data/docs/Telegram.md +20 -19
- data/docs/TextStore.md +4 -5
- data/docs/Viber.md +24 -19
- data/docs/ViberVideo.md +24 -0
- data/docs/WhatsApp.md +16 -19
- data/docs/WhatsAppComponent.md +24 -0
- data/docs/WhatsAppCurrency.md +22 -0
- data/docs/WhatsAppDatetime.md +18 -0
- data/docs/WhatsAppLanguage.md +20 -0
- data/docs/WhatsAppMedia.md +24 -0
- data/docs/WhatsAppParameter.md +30 -0
- data/docs/WhatsAppTemplate.md +22 -0
- data/git_push.sh +3 -4
- data/lib/messente_api/api/blacklist_api.rb +22 -15
- data/lib/messente_api/api/bulk_messaging_api.rb +88 -0
- data/lib/messente_api/api/contacts_api.rb +42 -28
- data/lib/messente_api/api/delivery_report_api.rb +6 -5
- data/lib/messente_api/api/groups_api.rb +30 -19
- data/lib/messente_api/api/number_lookup_api.rb +10 -6
- data/lib/messente_api/api/omnimessage_api.rb +14 -9
- data/lib/messente_api/api/statistics_api.rb +10 -6
- data/lib/messente_api/api_client.rb +72 -66
- data/lib/messente_api/api_error.rb +3 -2
- data/lib/messente_api/configuration.rb +64 -14
- data/lib/messente_api/models/{whats_app_audio.rb → bulk_omni_message_create_success_response.rb} +50 -38
- data/lib/messente_api/models/bulk_omni_message_create_success_response_messages_inner.rb +105 -0
- data/lib/messente_api/models/{whats_app_text.rb → bulk_omnimessage.rb} +49 -49
- data/lib/messente_api/models/channel.rb +9 -5
- data/lib/messente_api/models/contact_envelope.rb +31 -23
- data/lib/messente_api/models/contact_fields.rb +33 -23
- data/lib/messente_api/models/contact_list_envelope.rb +41 -23
- data/lib/messente_api/models/contact_response_fields.rb +31 -23
- data/lib/messente_api/models/contact_update_fields.rb +31 -23
- data/lib/messente_api/models/delivery_report_response.rb +37 -23
- data/lib/messente_api/models/delivery_result.rb +77 -27
- data/lib/messente_api/models/error_code_omnichannel.rb +9 -5
- data/lib/messente_api/models/error_code_omnichannel_machine.rb +9 -5
- data/lib/messente_api/models/error_code_phonebook.rb +9 -5
- data/lib/messente_api/models/error_code_statistics.rb +9 -5
- data/lib/messente_api/models/error_item_number_lookup.rb +33 -23
- data/lib/messente_api/models/error_item_number_lookup_error.rb +35 -23
- data/lib/messente_api/models/error_item_omnichannel.rb +61 -23
- data/lib/messente_api/models/error_item_phonebook.rb +59 -23
- data/lib/messente_api/models/error_item_statistics.rb +59 -23
- data/lib/messente_api/models/error_number_lookup.rb +33 -23
- data/lib/messente_api/models/error_omnichannel.rb +33 -23
- data/lib/messente_api/models/error_phonebook.rb +33 -23
- data/lib/messente_api/models/error_statistics.rb +33 -23
- data/lib/messente_api/models/error_title_omnichannel.rb +9 -5
- data/lib/messente_api/models/error_title_phonebook.rb +9 -5
- data/lib/messente_api/models/fetch_blacklist_success.rb +41 -23
- data/lib/messente_api/models/group_envelope.rb +31 -23
- data/lib/messente_api/models/group_list_envelope.rb +41 -23
- data/lib/messente_api/models/group_name.rb +33 -23
- data/lib/messente_api/models/group_response_fields.rb +37 -23
- data/lib/messente_api/models/message_result.rb +59 -23
- data/lib/messente_api/models/mobile_network.rb +31 -23
- data/lib/messente_api/models/number_to_blacklist.rb +33 -23
- data/lib/messente_api/models/numbers_to_investigate.rb +62 -24
- data/lib/messente_api/models/omni_message_create_success_response.rb +37 -23
- data/lib/messente_api/models/omnimessage.rb +59 -25
- data/lib/messente_api/models/omnimessage_messages_inner.rb +107 -0
- data/lib/messente_api/models/price_info.rb +257 -0
- data/lib/messente_api/models/priority.rb +9 -5
- data/lib/messente_api/models/sms.rb +45 -25
- data/lib/messente_api/models/statistics_report.rb +37 -23
- data/lib/messente_api/models/statistics_report_settings.rb +35 -23
- data/lib/messente_api/models/statistics_report_success.rb +33 -23
- data/lib/messente_api/models/status.rb +9 -5
- data/lib/messente_api/models/sync_number_lookup_result.rb +35 -24
- data/lib/messente_api/models/sync_number_lookup_success.rb +35 -23
- data/lib/messente_api/models/telegram.rb +31 -23
- data/lib/messente_api/models/text_store.rb +9 -5
- data/lib/messente_api/models/viber.rb +55 -28
- data/lib/messente_api/models/viber_video.rb +274 -0
- data/lib/messente_api/models/whats_app.rb +45 -54
- data/lib/messente_api/models/whats_app_component.rb +255 -0
- data/lib/messente_api/models/whats_app_currency.rb +257 -0
- data/lib/messente_api/models/{whats_app_document.rb → whats_app_datetime.rb} +48 -48
- data/lib/messente_api/models/{whats_app_image.rb → whats_app_language.rb} +55 -45
- data/lib/messente_api/models/whats_app_media.rb +246 -0
- data/lib/messente_api/models/whats_app_parameter.rb +278 -0
- data/lib/messente_api/models/whats_app_template.rb +251 -0
- data/lib/messente_api/version.rb +3 -3
- data/lib/messente_api.rb +16 -6
- data/messente_api.gemspec +5 -5
- data/spec/spec_helper.rb +2 -2
- metadata +35 -39
- data/docs/WhatsAppAudio.md +0 -17
- data/docs/WhatsAppDocument.md +0 -19
- data/docs/WhatsAppImage.md +0 -19
- data/docs/WhatsAppText.md +0 -19
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee58be9559a61fa1ea3a5574c3251075df0a2c81cfee73d6434d07aa56839356
|
4
|
+
data.tar.gz: ac898a07b96df35563ecd1c66949c9d666b3a3ebb8fefda2ed26543b40b099a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbf1572d1dd1fe540b8d9547932b9ffb12e4c2486b45ff28c950c8b92c0e2de2a814f901915b3214f2f49af35b7a6e388e80db90ce3b820fac88d61c94398440
|
7
|
+
data.tar.gz: f9b9ed86b9d35d59d9861b4cc39d9e17c36b61a4aef0463e89421cede308da0d048f45d2339d743a2069bfaaaf92ccb6c4687aa80df24e05806a7119dbd00603
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Messente API Library
|
2
2
|
|
3
|
-
- Messente API version:
|
4
|
-
- Ruby gem version:
|
3
|
+
- Messente API version: 2.0.0
|
4
|
+
- Ruby gem version: 2.2.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
|
|
@@ -25,6 +25,10 @@ Messente API Library provides the operations described below to access the featu
|
|
25
25
|
1. Returns all blacklisted phone numbers [`fetch_blacklist`](docs/BlacklistApi.md#fetch_blacklist)
|
26
26
|
1. Checks if a phone number is blacklisted [`is_blacklisted`](docs/BlacklistApi.md#is_blacklisted)
|
27
27
|
|
28
|
+
### BulkMessagingApi
|
29
|
+
|
30
|
+
1. Sends a bulk Omnimessage [`send_bulk_omnimessage`](docs/BulkMessagingApi.md#send_bulk_omnimessage)
|
31
|
+
|
28
32
|
### ContactsApi
|
29
33
|
|
30
34
|
1. Adds a contact to a group [`add_contact_to_group`](docs/ContactsApi.md#add_contact_to_group)
|
@@ -81,38 +85,37 @@ end
|
|
81
85
|
|
82
86
|
api_instance = MessenteApi::OmnimessageApi.new
|
83
87
|
omnimessage = MessenteApi::Omnimessage.new
|
84
|
-
omnimessage.to = '<
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
:preview_url => false
|
99
|
-
}
|
100
|
-
)
|
101
|
-
}
|
102
|
-
),
|
103
|
-
MessenteApi::Viber.new(
|
104
|
-
{
|
105
|
-
:sender => "<sender name or phone number in e.164 format>",
|
106
|
-
:text => "Hello from Viber!"
|
107
|
-
}
|
108
|
-
)
|
88
|
+
omnimessage.to = '<recipient_phone_number>'
|
89
|
+
|
90
|
+
sms = MessenteApi::SMS.new(
|
91
|
+
sender: "<sender name (optional)>",
|
92
|
+
text: "Hello SMS!"
|
93
|
+
)
|
94
|
+
|
95
|
+
viber = MessenteApi::Viber.new(
|
96
|
+
sender: "<sender name (optional)>",
|
97
|
+
text: "Hello from Viber!"
|
98
|
+
)
|
99
|
+
|
100
|
+
wa_parameters = [
|
101
|
+
MessenteApi::WhatsAppParameter.new(type: 'text', text: 'hello whatsapp'),
|
109
102
|
]
|
103
|
+
wa_component = MessenteApi::WhatsAppComponent.new(type: 'body', parameters: wa_parameters)
|
104
|
+
wa_lang = MessenteApi::WhatsAppLanguage.new(code: '<language_code>')
|
105
|
+
wa_template = MessenteApi::WhatsAppTemplate.new(name: '<template_name>', language: wa_lang, components: [wa_component])
|
106
|
+
whatsapp = MessenteApi::WhatsApp.new(
|
107
|
+
sender: '<sender name (optional)>',
|
108
|
+
template: wa_template,
|
109
|
+
)
|
110
|
+
|
111
|
+
omnimessage.messages = [sms, viber, whatsapp]
|
110
112
|
|
111
113
|
begin
|
112
|
-
|
114
|
+
result = api_instance.send_omnimessage(omnimessage)
|
115
|
+
puts result
|
113
116
|
rescue MessenteApi::ApiError => e
|
114
|
-
|
115
|
-
|
117
|
+
puts "Exception when calling send_omnimessage: #{e}"
|
118
|
+
puts e.response_body
|
116
119
|
end
|
117
120
|
|
118
121
|
```
|
data/docs/BlacklistApi.md
CHANGED
@@ -2,13 +2,12 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *https://api.messente.com/v1*
|
4
4
|
|
5
|
-
Method | HTTP request | Description
|
6
|
-
|
7
|
-
[**add_to_blacklist**](BlacklistApi.md#add_to_blacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist
|
8
|
-
[**delete_from_blacklist**](BlacklistApi.md#delete_from_blacklist) | **DELETE** /phonebook/blacklist/{phone} | Deletes a phone number from the blacklist
|
9
|
-
[**fetch_blacklist**](BlacklistApi.md#fetch_blacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers
|
10
|
-
[**is_blacklisted**](BlacklistApi.md#is_blacklisted) | **GET** /phonebook/blacklist/{phone} | Checks if a phone number is blacklisted
|
11
|
-
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**add_to_blacklist**](BlacklistApi.md#add_to_blacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist |
|
8
|
+
| [**delete_from_blacklist**](BlacklistApi.md#delete_from_blacklist) | **DELETE** /phonebook/blacklist/{phone} | Deletes a phone number from the blacklist |
|
9
|
+
| [**fetch_blacklist**](BlacklistApi.md#fetch_blacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers |
|
10
|
+
| [**is_blacklisted**](BlacklistApi.md#is_blacklisted) | **GET** /phonebook/blacklist/{phone} | Checks if a phone number is blacklisted |
|
12
11
|
|
13
12
|
|
14
13
|
## add_to_blacklist
|
@@ -17,10 +16,10 @@ Method | HTTP request | Description
|
|
17
16
|
|
18
17
|
Adds a phone number to the blacklist
|
19
18
|
|
20
|
-
###
|
19
|
+
### Examples
|
21
20
|
|
22
21
|
```ruby
|
23
|
-
|
22
|
+
require 'time'
|
24
23
|
require 'messente_api'
|
25
24
|
# setup authorization
|
26
25
|
MessenteApi.configure do |config|
|
@@ -30,22 +29,39 @@ MessenteApi.configure do |config|
|
|
30
29
|
end
|
31
30
|
|
32
31
|
api_instance = MessenteApi::BlacklistApi.new
|
33
|
-
number_to_blacklist = {
|
32
|
+
number_to_blacklist = MessenteApi::NumberToBlacklist.new({phone_number: 'phone_number_example'}) # NumberToBlacklist | Phone number to be blacklisted
|
34
33
|
|
35
34
|
begin
|
36
|
-
#Adds a phone number to the blacklist
|
35
|
+
# Adds a phone number to the blacklist
|
37
36
|
api_instance.add_to_blacklist(number_to_blacklist)
|
38
37
|
rescue MessenteApi::ApiError => e
|
39
|
-
puts "
|
38
|
+
puts "Error when calling BlacklistApi->add_to_blacklist: #{e}"
|
40
39
|
end
|
41
40
|
```
|
42
41
|
|
43
|
-
|
42
|
+
#### Using the add_to_blacklist_with_http_info variant
|
43
|
+
|
44
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
45
|
+
|
46
|
+
> <Array(nil, Integer, Hash)> add_to_blacklist_with_http_info(number_to_blacklist)
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
begin
|
50
|
+
# Adds a phone number to the blacklist
|
51
|
+
data, status_code, headers = api_instance.add_to_blacklist_with_http_info(number_to_blacklist)
|
52
|
+
p status_code # => 2xx
|
53
|
+
p headers # => { ... }
|
54
|
+
p data # => nil
|
55
|
+
rescue MessenteApi::ApiError => e
|
56
|
+
puts "Error when calling BlacklistApi->add_to_blacklist_with_http_info: #{e}"
|
57
|
+
end
|
58
|
+
```
|
44
59
|
|
60
|
+
### Parameters
|
45
61
|
|
46
|
-
Name | Type | Description
|
47
|
-
|
48
|
-
**number_to_blacklist** | [**NumberToBlacklist**](NumberToBlacklist.md)| Phone number to be blacklisted |
|
62
|
+
| Name | Type | Description | Notes |
|
63
|
+
| ---- | ---- | ----------- | ----- |
|
64
|
+
| **number_to_blacklist** | [**NumberToBlacklist**](NumberToBlacklist.md) | Phone number to be blacklisted | |
|
49
65
|
|
50
66
|
### Return type
|
51
67
|
|
@@ -67,10 +83,10 @@ nil (empty response body)
|
|
67
83
|
|
68
84
|
Deletes a phone number from the blacklist
|
69
85
|
|
70
|
-
###
|
86
|
+
### Examples
|
71
87
|
|
72
88
|
```ruby
|
73
|
-
|
89
|
+
require 'time'
|
74
90
|
require 'messente_api'
|
75
91
|
# setup authorization
|
76
92
|
MessenteApi.configure do |config|
|
@@ -83,19 +99,36 @@ api_instance = MessenteApi::BlacklistApi.new
|
|
83
99
|
phone = '+37251000000' # String | A phone number
|
84
100
|
|
85
101
|
begin
|
86
|
-
#Deletes a phone number from the blacklist
|
102
|
+
# Deletes a phone number from the blacklist
|
87
103
|
api_instance.delete_from_blacklist(phone)
|
88
104
|
rescue MessenteApi::ApiError => e
|
89
|
-
puts "
|
105
|
+
puts "Error when calling BlacklistApi->delete_from_blacklist: #{e}"
|
90
106
|
end
|
91
107
|
```
|
92
108
|
|
93
|
-
|
109
|
+
#### Using the delete_from_blacklist_with_http_info variant
|
110
|
+
|
111
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
112
|
+
|
113
|
+
> <Array(nil, Integer, Hash)> delete_from_blacklist_with_http_info(phone)
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
begin
|
117
|
+
# Deletes a phone number from the blacklist
|
118
|
+
data, status_code, headers = api_instance.delete_from_blacklist_with_http_info(phone)
|
119
|
+
p status_code # => 2xx
|
120
|
+
p headers # => { ... }
|
121
|
+
p data # => nil
|
122
|
+
rescue MessenteApi::ApiError => e
|
123
|
+
puts "Error when calling BlacklistApi->delete_from_blacklist_with_http_info: #{e}"
|
124
|
+
end
|
125
|
+
```
|
94
126
|
|
127
|
+
### Parameters
|
95
128
|
|
96
|
-
Name | Type | Description
|
97
|
-
|
98
|
-
**phone** | **String
|
129
|
+
| Name | Type | Description | Notes |
|
130
|
+
| ---- | ---- | ----------- | ----- |
|
131
|
+
| **phone** | **String** | A phone number | |
|
99
132
|
|
100
133
|
### Return type
|
101
134
|
|
@@ -113,14 +146,14 @@ nil (empty response body)
|
|
113
146
|
|
114
147
|
## fetch_blacklist
|
115
148
|
|
116
|
-
> FetchBlacklistSuccess fetch_blacklist
|
149
|
+
> <FetchBlacklistSuccess> fetch_blacklist
|
117
150
|
|
118
151
|
Returns all blacklisted phone numbers
|
119
152
|
|
120
|
-
###
|
153
|
+
### Examples
|
121
154
|
|
122
155
|
```ruby
|
123
|
-
|
156
|
+
require 'time'
|
124
157
|
require 'messente_api'
|
125
158
|
# setup authorization
|
126
159
|
MessenteApi.configure do |config|
|
@@ -132,11 +165,29 @@ end
|
|
132
165
|
api_instance = MessenteApi::BlacklistApi.new
|
133
166
|
|
134
167
|
begin
|
135
|
-
#Returns all blacklisted phone numbers
|
168
|
+
# Returns all blacklisted phone numbers
|
136
169
|
result = api_instance.fetch_blacklist
|
137
170
|
p result
|
138
171
|
rescue MessenteApi::ApiError => e
|
139
|
-
puts "
|
172
|
+
puts "Error when calling BlacklistApi->fetch_blacklist: #{e}"
|
173
|
+
end
|
174
|
+
```
|
175
|
+
|
176
|
+
#### Using the fetch_blacklist_with_http_info variant
|
177
|
+
|
178
|
+
This returns an Array which contains the response data, status code and headers.
|
179
|
+
|
180
|
+
> <Array(<FetchBlacklistSuccess>, Integer, Hash)> fetch_blacklist_with_http_info
|
181
|
+
|
182
|
+
```ruby
|
183
|
+
begin
|
184
|
+
# Returns all blacklisted phone numbers
|
185
|
+
data, status_code, headers = api_instance.fetch_blacklist_with_http_info
|
186
|
+
p status_code # => 2xx
|
187
|
+
p headers # => { ... }
|
188
|
+
p data # => <FetchBlacklistSuccess>
|
189
|
+
rescue MessenteApi::ApiError => e
|
190
|
+
puts "Error when calling BlacklistApi->fetch_blacklist_with_http_info: #{e}"
|
140
191
|
end
|
141
192
|
```
|
142
193
|
|
@@ -164,10 +215,10 @@ This endpoint does not need any parameter.
|
|
164
215
|
|
165
216
|
Checks if a phone number is blacklisted
|
166
217
|
|
167
|
-
###
|
218
|
+
### Examples
|
168
219
|
|
169
220
|
```ruby
|
170
|
-
|
221
|
+
require 'time'
|
171
222
|
require 'messente_api'
|
172
223
|
# setup authorization
|
173
224
|
MessenteApi.configure do |config|
|
@@ -180,19 +231,36 @@ api_instance = MessenteApi::BlacklistApi.new
|
|
180
231
|
phone = '+37251000000' # String | A phone number
|
181
232
|
|
182
233
|
begin
|
183
|
-
#Checks if a phone number is blacklisted
|
234
|
+
# Checks if a phone number is blacklisted
|
184
235
|
api_instance.is_blacklisted(phone)
|
185
236
|
rescue MessenteApi::ApiError => e
|
186
|
-
puts "
|
237
|
+
puts "Error when calling BlacklistApi->is_blacklisted: #{e}"
|
187
238
|
end
|
188
239
|
```
|
189
240
|
|
190
|
-
|
241
|
+
#### Using the is_blacklisted_with_http_info variant
|
242
|
+
|
243
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
244
|
+
|
245
|
+
> <Array(nil, Integer, Hash)> is_blacklisted_with_http_info(phone)
|
246
|
+
|
247
|
+
```ruby
|
248
|
+
begin
|
249
|
+
# Checks if a phone number is blacklisted
|
250
|
+
data, status_code, headers = api_instance.is_blacklisted_with_http_info(phone)
|
251
|
+
p status_code # => 2xx
|
252
|
+
p headers # => { ... }
|
253
|
+
p data # => nil
|
254
|
+
rescue MessenteApi::ApiError => e
|
255
|
+
puts "Error when calling BlacklistApi->is_blacklisted_with_http_info: #{e}"
|
256
|
+
end
|
257
|
+
```
|
191
258
|
|
259
|
+
### Parameters
|
192
260
|
|
193
|
-
Name | Type | Description
|
194
|
-
|
195
|
-
**phone** | **String
|
261
|
+
| Name | Type | Description | Notes |
|
262
|
+
| ---- | ---- | ----------- | ----- |
|
263
|
+
| **phone** | **String** | A phone number | |
|
196
264
|
|
197
265
|
### Return type
|
198
266
|
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# MessenteApi::BulkMessagingApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.messente.com/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**send_bulk_omnimessage**](BulkMessagingApi.md#send_bulk_omnimessage) | **POST** /omnimessages | Sends a bulk Omnimessage |
|
8
|
+
|
9
|
+
|
10
|
+
## send_bulk_omnimessage
|
11
|
+
|
12
|
+
> <BulkOmniMessageCreateSuccessResponse> send_bulk_omnimessage(bulk_omnimessage)
|
13
|
+
|
14
|
+
Sends a bulk Omnimessage
|
15
|
+
|
16
|
+
### Examples
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'time'
|
20
|
+
require 'messente_api'
|
21
|
+
# setup authorization
|
22
|
+
MessenteApi.configure do |config|
|
23
|
+
# Configure HTTP basic authorization: basicAuth
|
24
|
+
config.username = 'YOUR USERNAME'
|
25
|
+
config.password = 'YOUR PASSWORD'
|
26
|
+
end
|
27
|
+
|
28
|
+
api_instance = MessenteApi::BulkMessagingApi.new
|
29
|
+
bulk_omnimessage = MessenteApi::BulkOmnimessage.new({messages: [MessenteApi::Omnimessage.new({to: 'to_example', messages: [MessenteApi::SMS.new({text: 'Hello world!'})]})]}) # BulkOmnimessage | Bulk Omnimessage to be sent
|
30
|
+
|
31
|
+
begin
|
32
|
+
# Sends a bulk Omnimessage
|
33
|
+
result = api_instance.send_bulk_omnimessage(bulk_omnimessage)
|
34
|
+
p result
|
35
|
+
rescue MessenteApi::ApiError => e
|
36
|
+
puts "Error when calling BulkMessagingApi->send_bulk_omnimessage: #{e}"
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Using the send_bulk_omnimessage_with_http_info variant
|
41
|
+
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
43
|
+
|
44
|
+
> <Array(<BulkOmniMessageCreateSuccessResponse>, Integer, Hash)> send_bulk_omnimessage_with_http_info(bulk_omnimessage)
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
begin
|
48
|
+
# Sends a bulk Omnimessage
|
49
|
+
data, status_code, headers = api_instance.send_bulk_omnimessage_with_http_info(bulk_omnimessage)
|
50
|
+
p status_code # => 2xx
|
51
|
+
p headers # => { ... }
|
52
|
+
p data # => <BulkOmniMessageCreateSuccessResponse>
|
53
|
+
rescue MessenteApi::ApiError => e
|
54
|
+
puts "Error when calling BulkMessagingApi->send_bulk_omnimessage_with_http_info: #{e}"
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
### Parameters
|
59
|
+
|
60
|
+
| Name | Type | Description | Notes |
|
61
|
+
| ---- | ---- | ----------- | ----- |
|
62
|
+
| **bulk_omnimessage** | [**BulkOmnimessage**](BulkOmnimessage.md) | Bulk Omnimessage to be sent | |
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
[**BulkOmniMessageCreateSuccessResponse**](BulkOmniMessageCreateSuccessResponse.md)
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
[basicAuth](../README.md#basicAuth)
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: application/json
|
75
|
+
- **Accept**: application/json
|
76
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# MessenteApi::BulkOmniMessageCreateSuccessResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **messages** | [**Array<BulkOmniMessageCreateSuccessResponseMessagesInner>**](BulkOmniMessageCreateSuccessResponseMessagesInner.md) | List of responses for each Omnimessage in the bulk. These can be errors or successful responses | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'messente_api'
|
13
|
+
|
14
|
+
instance = MessenteApi::BulkOmniMessageCreateSuccessResponse.new(
|
15
|
+
messages: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# MessenteApi::BulkOmniMessageCreateSuccessResponseMessagesInner
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'messente_api'
|
13
|
+
|
14
|
+
MessenteApi::BulkOmniMessageCreateSuccessResponseMessagesInner.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'ErrorOmnichannel',
|
18
|
+
# :'OmniMessageCreateSuccessResponse'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'messente_api'
|
30
|
+
|
31
|
+
MessenteApi::BulkOmniMessageCreateSuccessResponseMessagesInner.build(data)
|
32
|
+
# => #<ErrorOmnichannel:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
MessenteApi::BulkOmniMessageCreateSuccessResponseMessagesInner.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `ErrorOmnichannel`
|
47
|
+
- `OmniMessageCreateSuccessResponse`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# MessenteApi::BulkOmnimessage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **messages** | [**Array<Omnimessage>**](Omnimessage.md) | A list of omnimessages. | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'messente_api'
|
13
|
+
|
14
|
+
instance = MessenteApi::BulkOmnimessage.new(
|
15
|
+
messages: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/Channel.md
CHANGED
@@ -2,15 +2,14 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
7
|
|
8
|
-
##
|
8
|
+
## Example
|
9
9
|
|
10
10
|
```ruby
|
11
|
-
require '
|
11
|
+
require 'messente_api'
|
12
12
|
|
13
13
|
instance = MessenteApi::Channel.new()
|
14
14
|
```
|
15
15
|
|
16
|
-
|
data/docs/ContactEnvelope.md
CHANGED
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**contact** | [**ContactResponseFields**](ContactResponseFields.md) | | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **contact** | [**ContactResponseFields**](ContactResponseFields.md) | | [optional] |
|
8
8
|
|
9
|
-
##
|
9
|
+
## Example
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
require '
|
12
|
+
require 'messente_api'
|
13
13
|
|
14
|
-
instance = MessenteApi::ContactEnvelope.new(
|
14
|
+
instance = MessenteApi::ContactEnvelope.new(
|
15
|
+
contact: null
|
16
|
+
)
|
15
17
|
```
|
16
18
|
|
17
|
-
|
data/docs/ContactFields.md
CHANGED
@@ -2,34 +2,35 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**phone_number** | **String** | Phone number in e.164 format |
|
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]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **phone_number** | **String** | Phone number in e.164 format | |
|
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
17
|
|
18
|
-
##
|
18
|
+
## Example
|
19
19
|
|
20
20
|
```ruby
|
21
|
-
require '
|
21
|
+
require 'messente_api'
|
22
22
|
|
23
|
-
instance = MessenteApi::ContactFields.new(
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
23
|
+
instance = MessenteApi::ContactFields.new(
|
24
|
+
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
|
+
)
|
33
35
|
```
|
34
36
|
|
35
|
-
|
data/docs/ContactListEnvelope.md
CHANGED
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**contacts** | [**Array<ContactResponseFields>**](ContactResponseFields.md) | An array of contacts | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **contacts** | [**Array<ContactResponseFields>**](ContactResponseFields.md) | An array of contacts | [optional] |
|
8
8
|
|
9
|
-
##
|
9
|
+
## Example
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
require '
|
12
|
+
require 'messente_api'
|
13
13
|
|
14
|
-
instance = MessenteApi::ContactListEnvelope.new(
|
14
|
+
instance = MessenteApi::ContactListEnvelope.new(
|
15
|
+
contacts: null
|
16
|
+
)
|
15
17
|
```
|
16
18
|
|
17
|
-
|