Skip to content

Commit bbd8ae8

Browse files
Merge pull request #21 from messente/travis
Release version 3.0.0
2 parents 9cc0ae8 + 7803fd6 commit bbd8ae8

156 files changed

Lines changed: 12368 additions & 7935 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ composer.phar
99

1010
# php-cs-fixer cache
1111
.php_cs.cache
12+
.php-cs-fixer.cache
1213

1314
# PHPUnit cache
1415
.phpunit.result.cache

.openapi-generator/FILES

Lines changed: 25 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
.gitignore
22
.openapi-generator-ignore
3-
.php_cs
3+
.php-cs-fixer.dist.php
44
.travis.yml
55
README.md
66
composer.json
77
docs/Api/BlacklistApi.md
8+
docs/Api/BulkMessagingApi.md
89
docs/Api/ContactsApi.md
910
docs/Api/DeliveryReportApi.md
1011
docs/Api/GroupsApi.md
1112
docs/Api/NumberLookupApi.md
1213
docs/Api/OmnimessageApi.md
1314
docs/Api/StatisticsApi.md
15+
docs/Model/BulkOmniMessageCreateSuccessResponse.md
16+
docs/Model/BulkOmniMessageCreateSuccessResponseMessagesInner.md
17+
docs/Model/BulkOmnimessage.md
1418
docs/Model/Channel.md
1519
docs/Model/ContactEnvelope.md
1620
docs/Model/ContactFields.md
@@ -45,6 +49,7 @@ docs/Model/NumberToBlacklist.md
4549
docs/Model/NumbersToInvestigate.md
4650
docs/Model/OmniMessageCreateSuccessResponse.md
4751
docs/Model/Omnimessage.md
52+
docs/Model/OmnimessageMessagesInner.md
4853
docs/Model/Priority.md
4954
docs/Model/SMS.md
5055
docs/Model/StatisticsReport.md
@@ -57,12 +62,16 @@ docs/Model/Telegram.md
5762
docs/Model/TextStore.md
5863
docs/Model/Viber.md
5964
docs/Model/WhatsApp.md
60-
docs/Model/WhatsAppAudio.md
61-
docs/Model/WhatsAppDocument.md
62-
docs/Model/WhatsAppImage.md
63-
docs/Model/WhatsAppText.md
65+
docs/Model/WhatsAppComponent.md
66+
docs/Model/WhatsAppCurrency.md
67+
docs/Model/WhatsAppDatetime.md
68+
docs/Model/WhatsAppLanguage.md
69+
docs/Model/WhatsAppMedia.md
70+
docs/Model/WhatsAppParameter.md
71+
docs/Model/WhatsAppTemplate.md
6472
git_push.sh
6573
lib/Api/BlacklistApi.php
74+
lib/Api/BulkMessagingApi.php
6675
lib/Api/ContactsApi.php
6776
lib/Api/DeliveryReportApi.php
6877
lib/Api/GroupsApi.php
@@ -72,6 +81,9 @@ lib/Api/StatisticsApi.php
7281
lib/ApiException.php
7382
lib/Configuration.php
7483
lib/HeaderSelector.php
84+
lib/Model/BulkOmniMessageCreateSuccessResponse.php
85+
lib/Model/BulkOmniMessageCreateSuccessResponseMessagesInner.php
86+
lib/Model/BulkOmnimessage.php
7587
lib/Model/Channel.php
7688
lib/Model/ContactEnvelope.php
7789
lib/Model/ContactFields.php
@@ -107,6 +119,7 @@ lib/Model/NumberToBlacklist.php
107119
lib/Model/NumbersToInvestigate.php
108120
lib/Model/OmniMessageCreateSuccessResponse.php
109121
lib/Model/Omnimessage.php
122+
lib/Model/OmnimessageMessagesInner.php
110123
lib/Model/Priority.php
111124
lib/Model/SMS.php
112125
lib/Model/StatisticsReport.php
@@ -119,66 +132,12 @@ lib/Model/Telegram.php
119132
lib/Model/TextStore.php
120133
lib/Model/Viber.php
121134
lib/Model/WhatsApp.php
122-
lib/Model/WhatsAppAudio.php
123-
lib/Model/WhatsAppDocument.php
124-
lib/Model/WhatsAppImage.php
125-
lib/Model/WhatsAppText.php
135+
lib/Model/WhatsAppComponent.php
136+
lib/Model/WhatsAppCurrency.php
137+
lib/Model/WhatsAppDatetime.php
138+
lib/Model/WhatsAppLanguage.php
139+
lib/Model/WhatsAppMedia.php
140+
lib/Model/WhatsAppParameter.php
141+
lib/Model/WhatsAppTemplate.php
126142
lib/ObjectSerializer.php
127143
phpunit.xml.dist
128-
test/Api/BlacklistApiTest.php
129-
test/Api/ContactsApiTest.php
130-
test/Api/DeliveryReportApiTest.php
131-
test/Api/GroupsApiTest.php
132-
test/Api/NumberLookupApiTest.php
133-
test/Api/OmnimessageApiTest.php
134-
test/Api/StatisticsApiTest.php
135-
test/Model/ChannelTest.php
136-
test/Model/ContactEnvelopeTest.php
137-
test/Model/ContactFieldsTest.php
138-
test/Model/ContactListEnvelopeTest.php
139-
test/Model/ContactResponseFieldsTest.php
140-
test/Model/ContactUpdateFieldsTest.php
141-
test/Model/DeliveryReportResponseTest.php
142-
test/Model/DeliveryResultTest.php
143-
test/Model/ErrorCodeOmnichannelMachineTest.php
144-
test/Model/ErrorCodeOmnichannelTest.php
145-
test/Model/ErrorCodePhonebookTest.php
146-
test/Model/ErrorCodeStatisticsTest.php
147-
test/Model/ErrorItemNumberLookupErrorTest.php
148-
test/Model/ErrorItemNumberLookupTest.php
149-
test/Model/ErrorItemOmnichannelTest.php
150-
test/Model/ErrorItemPhonebookTest.php
151-
test/Model/ErrorItemStatisticsTest.php
152-
test/Model/ErrorNumberLookupTest.php
153-
test/Model/ErrorOmnichannelTest.php
154-
test/Model/ErrorPhonebookTest.php
155-
test/Model/ErrorStatisticsTest.php
156-
test/Model/ErrorTitleOmnichannelTest.php
157-
test/Model/ErrorTitlePhonebookTest.php
158-
test/Model/FetchBlacklistSuccessTest.php
159-
test/Model/GroupEnvelopeTest.php
160-
test/Model/GroupListEnvelopeTest.php
161-
test/Model/GroupNameTest.php
162-
test/Model/GroupResponseFieldsTest.php
163-
test/Model/MessageResultTest.php
164-
test/Model/MobileNetworkTest.php
165-
test/Model/NumberToBlacklistTest.php
166-
test/Model/NumbersToInvestigateTest.php
167-
test/Model/OmniMessageCreateSuccessResponseTest.php
168-
test/Model/OmnimessageTest.php
169-
test/Model/PriorityTest.php
170-
test/Model/SMSTest.php
171-
test/Model/StatisticsReportSettingsTest.php
172-
test/Model/StatisticsReportSuccessTest.php
173-
test/Model/StatisticsReportTest.php
174-
test/Model/StatusTest.php
175-
test/Model/SyncNumberLookupResultTest.php
176-
test/Model/SyncNumberLookupSuccessTest.php
177-
test/Model/TelegramTest.php
178-
test/Model/TextStoreTest.php
179-
test/Model/ViberTest.php
180-
test/Model/WhatsAppAudioTest.php
181-
test/Model/WhatsAppDocumentTest.php
182-
test/Model/WhatsAppImageTest.php
183-
test/Model/WhatsAppTest.php
184-
test/Model/WhatsAppTextTest.php

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.0
1+
7.6.0

.php-cs-fixer.dist.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
/**
4+
* @generated
5+
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
6+
*/
7+
$finder = PhpCsFixer\Finder::create()
8+
->in(__DIR__)
9+
->exclude('vendor')
10+
->exclude('test')
11+
->exclude('tests')
12+
;
13+
14+
$config = new PhpCsFixer\Config();
15+
return $config->setRules([
16+
'@PSR12' => true,
17+
'phpdoc_order' => true,
18+
'array_syntax' => [ 'syntax' => 'short' ],
19+
'strict_comparison' => true,
20+
'strict_param' => true,
21+
'no_trailing_whitespace' => false,
22+
'no_trailing_whitespace_in_comment' => false,
23+
'braces' => false,
24+
'single_blank_line_at_eof' => false,
25+
'blank_line_after_namespace' => false,
26+
'no_leading_import_slash' => false,
27+
])
28+
->setFinder($finder)
29+
;

.php_cs

Lines changed: 0 additions & 23 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ language: php
33
# https://docs.travis-ci.com/user/reference/bionic/#php-support
44
dist: bionic
55
php:
6-
- 7.3
76
- 7.4
87
before_install: "composer install"
98
script: "vendor/bin/phpunit"

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Messente API Library
22

33
- Messente API version: 2.0.0
4-
- PHP artifact version: 2.1.0
4+
- PHP artifact version: 3.0.0
55

66
[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&#39;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.
77

@@ -25,6 +25,10 @@ Messente API Library provides the operations described below to access the featu
2525
1. Returns all blacklisted phone numbers [`fetchBlacklist`](docs/Api/BlacklistApi.md#fetchblacklist)
2626
1. Checks if a phone number is blacklisted [`isBlacklisted`](docs/Api/BlacklistApi.md#isblacklisted)
2727

28+
### BulkMessagingApi
29+
30+
1. Sends a bulk Omnimessage [`sendBulkOmnimessage`](docs/Api/BulkMessagingApi.md#sendbulkomnimessage)
31+
2832
### ContactsApi
2933

3034
1. Adds a contact to a group [`addContactToGroup`](docs/Api/ContactsApi.md#addcontacttogroup)
@@ -73,13 +77,14 @@ Read the [external getting-started article](https://messente.com/documentation/g
7377
<?php
7478
require_once(__DIR__ . '/../vendor/autoload.php');
7579

76-
use \Messente\Api\Api\OmnimessageApi;
77-
use \Messente\Api\Configuration;
78-
use \Messente\Api\Model\Omnimessage;
79-
use \Messente\Api\Model\Viber;
80-
use \Messente\Api\Model\SMS;
81-
use \Messente\Api\Model\WhatsApp;
82-
use \Messente\Api\Model\WhatsAppText;
80+
use Messente\Api\Api\OmnimessageApi;
81+
use Messente\Api\Model\Omnimessage;
82+
use Messente\Api\Configuration;
83+
use Messente\Api\Model\WhatsApp;
84+
use Messente\Api\Model\WhatsAppParameter;
85+
use Messente\Api\Model\WhatsAppComponent;
86+
use Messente\Api\Model\WhatsAppLanguage;
87+
use Messente\Api\Model\WhatsAppTemplate;
8388

8489

8590
// Configure HTTP basic authorization: basicAuth
@@ -104,11 +109,22 @@ $sms = new SMS(
104109
["text" => "Hello SMS!", "sender" => "MySmsSender"]
105110
);
106111

107-
108-
$whatsAppText = new WhatsAppText(["body" => "Hello WhatsApp!"]);
112+
$whatsAppParameters = [new WhatsAppParameter(['type' => 'text', 'text' => 'hello whatsapp'])];
113+
$whatsAppComponent = new WhatsAppComponent(['type' => 'body', 'parameters' => $whatsAppParameters]);
114+
$whatsAppLanguage = new WhatsAppLanguage(['code' => '<language_code>']);
115+
$whatsAppTemplate = new WhatsAppTemplate(
116+
[
117+
'name'=> '<template_name>',
118+
'language'=> $whatsAppLanguage,
119+
'components' => [$whatsAppComponent]
120+
]
121+
);
109122

110123
$whatsapp = new WhatsApp(
111-
['text' => $whatsAppText, "sender" => "MyWhatsAppSender"]
124+
[
125+
'sender' => '<sender name (optional)>',
126+
'template' => $whatsAppTemplate,
127+
]
112128
);
113129

114130
$omnimessage->setMessages([$whatsapp, $viber, $sms]);

composer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "messente/messente-api-php",
3-
"version": "2.1.0",
3+
"version": "3.0.0",
44
"description": "[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.",
55
"keywords": ["viber", "telegram", "sms", "whatsapp", "phonebook", "openapitools",
66
"openapi-generator",
@@ -26,10 +26,6 @@
2626
"guzzlehttp/guzzle": "^6.2 || ^7.0",
2727
"guzzlehttp/psr7": "^1.8 || ^2.0"
2828
},
29-
"require-dev": {
30-
"phpunit/phpunit": "^7.4",
31-
"friendsofphp/php-cs-fixer": "^2.12"
32-
},
3329
"autoload": {
3430
"psr-4": { "Messente\\Api\\" : "lib/" }
3531
},

docs/Api/BlacklistApi.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Messente\Api\BlacklistApi
22

3-
All URIs are relative to https://api.messente.com/v1.
3+
All URIs are relative to https://api.messente.com/v1, except if the operation defines another base path.
44

5-
Method | HTTP request | Description
6-
------------- | ------------- | -------------
7-
[**addToBlacklist()**](BlacklistApi.md#addToBlacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist
8-
[**deleteFromBlacklist()**](BlacklistApi.md#deleteFromBlacklist) | **DELETE** /phonebook/blacklist/{phone} | Deletes a phone number from the blacklist
9-
[**fetchBlacklist()**](BlacklistApi.md#fetchBlacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers
10-
[**isBlacklisted()**](BlacklistApi.md#isBlacklisted) | **GET** /phonebook/blacklist/{phone} | Checks if a phone number is blacklisted
5+
| Method | HTTP request | Description |
6+
| ------------- | ------------- | ------------- |
7+
| [**addToBlacklist()**](BlacklistApi.md#addToBlacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist |
8+
| [**deleteFromBlacklist()**](BlacklistApi.md#deleteFromBlacklist) | **DELETE** /phonebook/blacklist/{phone} | Deletes a phone number from the blacklist |
9+
| [**fetchBlacklist()**](BlacklistApi.md#fetchBlacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers |
10+
| [**isBlacklisted()**](BlacklistApi.md#isBlacklisted) | **GET** /phonebook/blacklist/{phone} | Checks if a phone number is blacklisted |
1111

1212

1313
## `addToBlacklist()`
@@ -48,9 +48,9 @@ try {
4848

4949
### Parameters
5050

51-
Name | Type | Description | Notes
52-
------------- | ------------- | ------------- | -------------
53-
**numberToBlacklist** | [**\Messente\Api\Model\NumberToBlacklist**](../Model/NumberToBlacklist.md)| Phone number to be blacklisted |
51+
| Name | Type | Description | Notes |
52+
| ------------- | ------------- | ------------- | ------------- |
53+
| **numberToBlacklist** | [**\Messente\Api\Model\NumberToBlacklist**](../Model/NumberToBlacklist.md)| Phone number to be blacklisted | |
5454

5555
### Return type
5656

@@ -107,9 +107,9 @@ try {
107107

108108
### Parameters
109109

110-
Name | Type | Description | Notes
111-
------------- | ------------- | ------------- | -------------
112-
**phone** | **string**| A phone number |
110+
| Name | Type | Description | Notes |
111+
| ------------- | ------------- | ------------- | ------------- |
112+
| **phone** | **string**| A phone number | |
113113

114114
### Return type
115115

@@ -223,9 +223,9 @@ try {
223223

224224
### Parameters
225225

226-
Name | Type | Description | Notes
227-
------------- | ------------- | ------------- | -------------
228-
**phone** | **string**| A phone number |
226+
| Name | Type | Description | Notes |
227+
| ------------- | ------------- | ------------- | ------------- |
228+
| **phone** | **string**| A phone number | |
229229

230230
### Return type
231231

0 commit comments

Comments
 (0)