Skip to content

Commit af45750

Browse files
committed
Travis update: Jan 2025 (Build 812)
[skip ci]
1 parent b9beef5 commit af45750

151 files changed

Lines changed: 40894 additions & 0 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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore
2+
3+
composer.phar
4+
/vendor/
5+
6+
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
7+
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
8+
# composer.lock
9+
10+
# php-cs-fixer cache
11+
.php_cs.cache
12+
.php-cs-fixer.cache
13+
14+
# PHPUnit cache
15+
.phpunit.result.cache

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/FILES

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.gitignore
2+
.openapi-generator-ignore
3+
.php-cs-fixer.dist.php
4+
.travis.yml
5+
README.md
6+
composer.json
7+
docs/Api/BlacklistApi.md
8+
docs/Api/BulkMessagingApi.md
9+
docs/Api/ContactsApi.md
10+
docs/Api/DeliveryReportApi.md
11+
docs/Api/GroupsApi.md
12+
docs/Api/NumberLookupApi.md
13+
docs/Api/OmnimessageApi.md
14+
docs/Api/StatisticsApi.md
15+
docs/Model/BulkOmniMessageCreateSuccessResponse.md
16+
docs/Model/BulkOmniMessageCreateSuccessResponseMessagesInner.md
17+
docs/Model/BulkOmnimessage.md
18+
docs/Model/Channel.md
19+
docs/Model/ContactEnvelope.md
20+
docs/Model/ContactFields.md
21+
docs/Model/ContactListEnvelope.md
22+
docs/Model/ContactResponseFields.md
23+
docs/Model/ContactUpdateFields.md
24+
docs/Model/DeliveryReportResponse.md
25+
docs/Model/DeliveryResult.md
26+
docs/Model/ErrorCodeOmnichannel.md
27+
docs/Model/ErrorCodeOmnichannelMachine.md
28+
docs/Model/ErrorCodePhonebook.md
29+
docs/Model/ErrorCodeStatistics.md
30+
docs/Model/ErrorItemNumberLookup.md
31+
docs/Model/ErrorItemNumberLookupError.md
32+
docs/Model/ErrorItemOmnichannel.md
33+
docs/Model/ErrorItemPhonebook.md
34+
docs/Model/ErrorItemStatistics.md
35+
docs/Model/ErrorNumberLookup.md
36+
docs/Model/ErrorOmnichannel.md
37+
docs/Model/ErrorPhonebook.md
38+
docs/Model/ErrorStatistics.md
39+
docs/Model/ErrorTitleOmnichannel.md
40+
docs/Model/ErrorTitlePhonebook.md
41+
docs/Model/FetchBlacklistSuccess.md
42+
docs/Model/GroupEnvelope.md
43+
docs/Model/GroupListEnvelope.md
44+
docs/Model/GroupName.md
45+
docs/Model/GroupResponseFields.md
46+
docs/Model/MessageResult.md
47+
docs/Model/MobileNetwork.md
48+
docs/Model/NumberToBlacklist.md
49+
docs/Model/NumbersToInvestigate.md
50+
docs/Model/OmniMessageCreateSuccessResponse.md
51+
docs/Model/Omnimessage.md
52+
docs/Model/OmnimessageMessagesInner.md
53+
docs/Model/PriceInfo.md
54+
docs/Model/Priority.md
55+
docs/Model/SMS.md
56+
docs/Model/StatisticsReport.md
57+
docs/Model/StatisticsReportSettings.md
58+
docs/Model/StatisticsReportSuccess.md
59+
docs/Model/Status.md
60+
docs/Model/SyncNumberLookupResult.md
61+
docs/Model/SyncNumberLookupSuccess.md
62+
docs/Model/Telegram.md
63+
docs/Model/TextStore.md
64+
docs/Model/Viber.md
65+
docs/Model/ViberVideo.md
66+
docs/Model/WhatsApp.md
67+
docs/Model/WhatsAppComponent.md
68+
docs/Model/WhatsAppCurrency.md
69+
docs/Model/WhatsAppDatetime.md
70+
docs/Model/WhatsAppLanguage.md
71+
docs/Model/WhatsAppMedia.md
72+
docs/Model/WhatsAppParameter.md
73+
docs/Model/WhatsAppTemplate.md
74+
docs/Model/WhatsAppText.md
75+
git_push.sh
76+
lib/Api/BlacklistApi.php
77+
lib/Api/BulkMessagingApi.php
78+
lib/Api/ContactsApi.php
79+
lib/Api/DeliveryReportApi.php
80+
lib/Api/GroupsApi.php
81+
lib/Api/NumberLookupApi.php
82+
lib/Api/OmnimessageApi.php
83+
lib/Api/StatisticsApi.php
84+
lib/ApiException.php
85+
lib/Configuration.php
86+
lib/HeaderSelector.php
87+
lib/Model/BulkOmniMessageCreateSuccessResponse.php
88+
lib/Model/BulkOmniMessageCreateSuccessResponseMessagesInner.php
89+
lib/Model/BulkOmnimessage.php
90+
lib/Model/Channel.php
91+
lib/Model/ContactEnvelope.php
92+
lib/Model/ContactFields.php
93+
lib/Model/ContactListEnvelope.php
94+
lib/Model/ContactResponseFields.php
95+
lib/Model/ContactUpdateFields.php
96+
lib/Model/DeliveryReportResponse.php
97+
lib/Model/DeliveryResult.php
98+
lib/Model/ErrorCodeOmnichannel.php
99+
lib/Model/ErrorCodeOmnichannelMachine.php
100+
lib/Model/ErrorCodePhonebook.php
101+
lib/Model/ErrorCodeStatistics.php
102+
lib/Model/ErrorItemNumberLookup.php
103+
lib/Model/ErrorItemNumberLookupError.php
104+
lib/Model/ErrorItemOmnichannel.php
105+
lib/Model/ErrorItemPhonebook.php
106+
lib/Model/ErrorItemStatistics.php
107+
lib/Model/ErrorNumberLookup.php
108+
lib/Model/ErrorOmnichannel.php
109+
lib/Model/ErrorPhonebook.php
110+
lib/Model/ErrorStatistics.php
111+
lib/Model/ErrorTitleOmnichannel.php
112+
lib/Model/ErrorTitlePhonebook.php
113+
lib/Model/FetchBlacklistSuccess.php
114+
lib/Model/GroupEnvelope.php
115+
lib/Model/GroupListEnvelope.php
116+
lib/Model/GroupName.php
117+
lib/Model/GroupResponseFields.php
118+
lib/Model/MessageResult.php
119+
lib/Model/MobileNetwork.php
120+
lib/Model/ModelInterface.php
121+
lib/Model/NumberToBlacklist.php
122+
lib/Model/NumbersToInvestigate.php
123+
lib/Model/OmniMessageCreateSuccessResponse.php
124+
lib/Model/Omnimessage.php
125+
lib/Model/OmnimessageMessagesInner.php
126+
lib/Model/PriceInfo.php
127+
lib/Model/Priority.php
128+
lib/Model/SMS.php
129+
lib/Model/StatisticsReport.php
130+
lib/Model/StatisticsReportSettings.php
131+
lib/Model/StatisticsReportSuccess.php
132+
lib/Model/Status.php
133+
lib/Model/SyncNumberLookupResult.php
134+
lib/Model/SyncNumberLookupSuccess.php
135+
lib/Model/Telegram.php
136+
lib/Model/TextStore.php
137+
lib/Model/Viber.php
138+
lib/Model/ViberVideo.php
139+
lib/Model/WhatsApp.php
140+
lib/Model/WhatsAppComponent.php
141+
lib/Model/WhatsAppCurrency.php
142+
lib/Model/WhatsAppDatetime.php
143+
lib/Model/WhatsAppLanguage.php
144+
lib/Model/WhatsAppMedia.php
145+
lib/Model/WhatsAppParameter.php
146+
lib/Model/WhatsAppTemplate.php
147+
lib/Model/WhatsAppText.php
148+
lib/ObjectSerializer.php
149+
phpunit.xml.dist

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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+
;

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: php
2+
# Bionic environment has preinstalled PHP from 7.1 to 7.4
3+
# https://docs.travis-ci.com/user/reference/bionic/#php-support
4+
dist: bionic
5+
php:
6+
- 7.4
7+
before_install: "composer install"
8+
script: "vendor/bin/phpunit"

README.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Messente API Library
2+
3+
- Messente API version: 2.0.0
4+
- PHP artifact version: 3.2.0
5+
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&#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.
7+
8+
## Installation
9+
10+
Install Messente API library with `composer require messente/messente-api-php`.
11+
12+
## Features
13+
14+
Messente API has the following features:
15+
16+
- Omnichannel ([external docs](https://messente.com/documentation/omnichannel-api)),
17+
- Phonebook ([external docs](https://messente.com/documentation/phonebook-api)).
18+
19+
Messente API Library provides the operations described below to access the features.
20+
21+
### BlacklistApi
22+
23+
1. Adds a phone number to the blacklist [`addToBlacklist`](docs/Api/BlacklistApi.md#addtoblacklist)
24+
1. Deletes a phone number from the blacklist [`deleteFromBlacklist`](docs/Api/BlacklistApi.md#deletefromblacklist)
25+
1. Returns all blacklisted phone numbers [`fetchBlacklist`](docs/Api/BlacklistApi.md#fetchblacklist)
26+
1. Checks if a phone number is blacklisted [`isBlacklisted`](docs/Api/BlacklistApi.md#isblacklisted)
27+
28+
### BulkMessagingApi
29+
30+
1. Sends a bulk Omnimessage [`sendBulkOmnimessage`](docs/Api/BulkMessagingApi.md#sendbulkomnimessage)
31+
32+
### ContactsApi
33+
34+
1. Adds a contact to a group [`addContactToGroup`](docs/Api/ContactsApi.md#addcontacttogroup)
35+
1. Creates a new contact [`createContact`](docs/Api/ContactsApi.md#createcontact)
36+
1. Deletes a contact [`deleteContact`](docs/Api/ContactsApi.md#deletecontact)
37+
1. Lists a contact [`fetchContact`](docs/Api/ContactsApi.md#fetchcontact)
38+
1. Lists groups of a contact [`fetchContactGroups`](docs/Api/ContactsApi.md#fetchcontactgroups)
39+
1. Returns all contacts [`fetchContacts`](docs/Api/ContactsApi.md#fetchcontacts)
40+
1. Removes a contact from a group [`removeContactFromGroup`](docs/Api/ContactsApi.md#removecontactfromgroup)
41+
1. Updates a contact [`updateContact`](docs/Api/ContactsApi.md#updatecontact)
42+
43+
### DeliveryReportApi
44+
45+
1. Retrieves the delivery report for the Omnimessage [`retrieveDeliveryReport`](docs/Api/DeliveryReportApi.md#retrievedeliveryreport)
46+
47+
### GroupsApi
48+
49+
1. Creates a new group with the provided name [`createGroup`](docs/Api/GroupsApi.md#creategroup)
50+
1. Deletes a group [`deleteGroup`](docs/Api/GroupsApi.md#deletegroup)
51+
1. Lists a group [`fetchGroup`](docs/Api/GroupsApi.md#fetchgroup)
52+
1. Returns all groups [`fetchGroups`](docs/Api/GroupsApi.md#fetchgroups)
53+
1. Updates a group with the provided name [`updateGroup`](docs/Api/GroupsApi.md#updategroup)
54+
55+
### NumberLookupApi
56+
57+
1. Requests info about phone numbers [`fetchInfo`](docs/Api/NumberLookupApi.md#fetchinfo)
58+
59+
### OmnimessageApi
60+
61+
1. Cancels a scheduled Omnimessage [`cancelScheduledMessage`](docs/Api/OmnimessageApi.md#cancelscheduledmessage)
62+
1. Sends an Omnimessage [`sendOmnimessage`](docs/Api/OmnimessageApi.md#sendomnimessage)
63+
64+
### StatisticsApi
65+
66+
1. Requests statistics reports for each country [`createStatisticsReport`](docs/Api/StatisticsApi.md#createstatisticsreport)
67+
68+
## Auth
69+
70+
**Type**: HTTP basic authentication
71+
72+
Read the [external getting-started article](https://messente.com/documentation/getting-started) which explains API keys and Sender ID logic.
73+
74+
## Getting started: sending an omnimessage
75+
76+
```php
77+
<?php
78+
require_once(__DIR__ . '/../vendor/autoload.php');
79+
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;
88+
89+
90+
// Configure HTTP basic authorization: basicAuth
91+
$config = Configuration::getDefaultConfiguration()
92+
->setUsername('<MESSENTE_API_USERNAME>')
93+
->setPassword('<MESSENTE_API_PASSWORD>');
94+
95+
$apiInstance = new OmnimessageApi(
96+
new GuzzleHttp\Client(),
97+
$config
98+
);
99+
100+
$omnimessage = new Omnimessage([
101+
"to" => "<phone number in e.164 format>"
102+
]);
103+
104+
$viber = new Viber(
105+
["text" => "Hello Viber!", "sender" => "MyViberSender"]
106+
);
107+
108+
$sms = new SMS(
109+
["text" => "Hello SMS!", "sender" => "MySmsSender"]
110+
);
111+
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+
);
122+
123+
$whatsapp = new WhatsApp(
124+
[
125+
'sender' => '<sender name (optional)>',
126+
'template' => $whatsAppTemplate,
127+
]
128+
);
129+
130+
$omnimessage->setMessages([$whatsapp, $viber, $sms]);
131+
132+
133+
try {
134+
$result = $apiInstance->sendOmnimessage($omnimessage);
135+
print_r($result);
136+
} catch (Exception $e) {
137+
echo 'Exception when calling sendOmnimessage: ', $e->getMessage(), PHP_EOL;
138+
}
139+
?>
140+
141+
```
142+
143+
## License
144+
145+
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
146+
147+
## Terms
148+
149+
[https://messente.com/terms-and-conditions](https://messente.com/terms-and-conditions)

0 commit comments

Comments
 (0)