Skip to content

Commit ac1290d

Browse files
authored
Merge pull request #24 from messente/travis
Release 3.3.0
2 parents 47ec33f + 60195e4 commit ac1290d

11 files changed

Lines changed: 591 additions & 10 deletions

File tree

.github/workflows/packagist.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Publish package to Packagist
2+
on:
3+
push:
4+
tags:
5+
- *
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Publish Artifact
12+
run: curl -XPOST -H 'content-type:application/json' "https://packagist.org/api/update-package?username=messente.developers&apiToken=${API_TOKEN}" -d '{"repository":{"url":"https://packagist.org/packages/messente/messente-api-php"}}'
13+
env:
14+
API_TOKEN: ${{ secrets.API_TOKEN }}
15+
16+

.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ docs/Model/WhatsAppLanguage.md
7171
docs/Model/WhatsAppMedia.md
7272
docs/Model/WhatsAppParameter.md
7373
docs/Model/WhatsAppTemplate.md
74+
docs/Model/WhatsAppText.md
7475
git_push.sh
7576
lib/Api/BlacklistApi.php
7677
lib/Api/BulkMessagingApi.php
@@ -143,5 +144,6 @@ lib/Model/WhatsAppLanguage.php
143144
lib/Model/WhatsAppMedia.php
144145
lib/Model/WhatsAppParameter.php
145146
lib/Model/WhatsAppTemplate.php
147+
lib/Model/WhatsAppText.php
146148
lib/ObjectSerializer.php
147149
phpunit.xml.dist

README.md

Lines changed: 1 addition & 1 deletion
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: 3.2.0
4+
- PHP artifact version: 3.3.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'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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "messente/messente-api-php",
3-
"version": "3.2.0",
3+
"version": "3.3.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",

docs/Model/WhatsApp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
**validity** | **int** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional]
99
**ttl** | **int** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. | [optional]
1010
**template** | [**\Messente\Api\Model\WhatsAppTemplate**](WhatsAppTemplate.md) | | [optional]
11+
**text** | [**\Messente\Api\Model\WhatsAppText**](WhatsAppText.md) | | [optional]
1112
**channel** | **string** | The channel used to deliver the message | [optional] [default to 'whatsapp']
1213

1314
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/WhatsAppParameter.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ Name | Type | Description | Notes
1111
**image** | [**\Messente\Api\Model\WhatsAppMedia**](WhatsAppMedia.md) | | [optional]
1212
**document** | [**\Messente\Api\Model\WhatsAppMedia**](WhatsAppMedia.md) | | [optional]
1313
**video** | [**\Messente\Api\Model\WhatsAppMedia**](WhatsAppMedia.md) | | [optional]
14+
**couponCode** | **string** | A coupon code. | [optional]
15+
**payload** | **string** | A payload. | [optional]
1416

1517
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/WhatsAppText.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # WhatsAppText
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**previewUrl** | **bool** | Whether to display link preview if the message contains a hyperlink | [optional] [default to true]
8+
**body** | **string** | Plaintext content for WhatsApp, can contain URLs, emojis and formatting |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

lib/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Configuration
101101
*
102102
* @var string
103103
*/
104-
protected $userAgent = 'OpenAPI-Generator/3.2.0/PHP';
104+
protected $userAgent = 'OpenAPI-Generator/3.3.0/PHP';
105105

106106
/**
107107
* Debug switch (default set to false)
@@ -434,7 +434,7 @@ public static function toDebugReport()
434434
$report .= ' OS: ' . php_uname() . PHP_EOL;
435435
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
436436
$report .= ' The version of the OpenAPI document: 2.0.0' . PHP_EOL;
437-
$report .= ' SDK Package Version: 3.2.0' . PHP_EOL;
437+
$report .= ' SDK Package Version: 3.3.0' . PHP_EOL;
438438
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
439439

440440
return $report;

lib/Model/WhatsApp.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class WhatsApp implements ModelInterface, ArrayAccess, \JsonSerializable
6363
'validity' => 'int',
6464
'ttl' => 'int',
6565
'template' => '\Messente\Api\Model\WhatsAppTemplate',
66+
'text' => '\Messente\Api\Model\WhatsAppText',
6667
'channel' => 'string'
6768
];
6869

@@ -78,6 +79,7 @@ class WhatsApp implements ModelInterface, ArrayAccess, \JsonSerializable
7879
'validity' => null,
7980
'ttl' => null,
8081
'template' => null,
82+
'text' => null,
8183
'channel' => null
8284
];
8385

@@ -91,6 +93,7 @@ class WhatsApp implements ModelInterface, ArrayAccess, \JsonSerializable
9193
'validity' => false,
9294
'ttl' => false,
9395
'template' => false,
96+
'text' => false,
9497
'channel' => false
9598
];
9699

@@ -184,6 +187,7 @@ public function isNullableSetToNull(string $property): bool
184187
'validity' => 'validity',
185188
'ttl' => 'ttl',
186189
'template' => 'template',
190+
'text' => 'text',
187191
'channel' => 'channel'
188192
];
189193

@@ -197,6 +201,7 @@ public function isNullableSetToNull(string $property): bool
197201
'validity' => 'setValidity',
198202
'ttl' => 'setTtl',
199203
'template' => 'setTemplate',
204+
'text' => 'setText',
200205
'channel' => 'setChannel'
201206
];
202207

@@ -210,6 +215,7 @@ public function isNullableSetToNull(string $property): bool
210215
'validity' => 'getValidity',
211216
'ttl' => 'getTtl',
212217
'template' => 'getTemplate',
218+
'text' => 'getText',
213219
'channel' => 'getChannel'
214220
];
215221

@@ -287,6 +293,7 @@ public function __construct(array $data = null)
287293
$this->setIfExists('validity', $data ?? [], null);
288294
$this->setIfExists('ttl', $data ?? [], null);
289295
$this->setIfExists('template', $data ?? [], null);
296+
$this->setIfExists('text', $data ?? [], null);
290297
$this->setIfExists('channel', $data ?? [], 'whatsapp');
291298
}
292299

@@ -449,6 +456,33 @@ public function setTemplate($template)
449456
return $this;
450457
}
451458

459+
/**
460+
* Gets text
461+
*
462+
* @return \Messente\Api\Model\WhatsAppText|null
463+
*/
464+
public function getText()
465+
{
466+
return $this->container['text'];
467+
}
468+
469+
/**
470+
* Sets text
471+
*
472+
* @param \Messente\Api\Model\WhatsAppText|null $text text
473+
*
474+
* @return self
475+
*/
476+
public function setText($text)
477+
{
478+
if (is_null($text)) {
479+
throw new \InvalidArgumentException('non-nullable text cannot be null');
480+
}
481+
$this->container['text'] = $text;
482+
483+
return $this;
484+
}
485+
452486
/**
453487
* Gets channel
454488
*

lib/Model/WhatsAppParameter.php

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class WhatsAppParameter implements ModelInterface, ArrayAccess, \JsonSerializabl
6565
'dateTime' => '\Messente\Api\Model\WhatsAppDatetime',
6666
'image' => '\Messente\Api\Model\WhatsAppMedia',
6767
'document' => '\Messente\Api\Model\WhatsAppMedia',
68-
'video' => '\Messente\Api\Model\WhatsAppMedia'
68+
'video' => '\Messente\Api\Model\WhatsAppMedia',
69+
'couponCode' => 'string',
70+
'payload' => 'string'
6971
];
7072

7173
/**
@@ -82,7 +84,9 @@ class WhatsAppParameter implements ModelInterface, ArrayAccess, \JsonSerializabl
8284
'dateTime' => null,
8385
'image' => null,
8486
'document' => null,
85-
'video' => null
87+
'video' => null,
88+
'couponCode' => null,
89+
'payload' => null
8690
];
8791

8892
/**
@@ -97,7 +101,9 @@ class WhatsAppParameter implements ModelInterface, ArrayAccess, \JsonSerializabl
97101
'dateTime' => false,
98102
'image' => false,
99103
'document' => false,
100-
'video' => false
104+
'video' => false,
105+
'couponCode' => false,
106+
'payload' => false
101107
];
102108

103109
/**
@@ -192,7 +198,9 @@ public function isNullableSetToNull(string $property): bool
192198
'dateTime' => 'date_time',
193199
'image' => 'image',
194200
'document' => 'document',
195-
'video' => 'video'
201+
'video' => 'video',
202+
'couponCode' => 'coupon_code',
203+
'payload' => 'payload'
196204
];
197205

198206
/**
@@ -207,7 +215,9 @@ public function isNullableSetToNull(string $property): bool
207215
'dateTime' => 'setDateTime',
208216
'image' => 'setImage',
209217
'document' => 'setDocument',
210-
'video' => 'setVideo'
218+
'video' => 'setVideo',
219+
'couponCode' => 'setCouponCode',
220+
'payload' => 'setPayload'
211221
];
212222

213223
/**
@@ -222,7 +232,9 @@ public function isNullableSetToNull(string $property): bool
222232
'dateTime' => 'getDateTime',
223233
'image' => 'getImage',
224234
'document' => 'getDocument',
225-
'video' => 'getVideo'
235+
'video' => 'getVideo',
236+
'couponCode' => 'getCouponCode',
237+
'payload' => 'getPayload'
226238
];
227239

228240
/**
@@ -289,6 +301,8 @@ public function __construct(array $data = null)
289301
$this->setIfExists('image', $data ?? [], null);
290302
$this->setIfExists('document', $data ?? [], null);
291303
$this->setIfExists('video', $data ?? [], null);
304+
$this->setIfExists('couponCode', $data ?? [], null);
305+
$this->setIfExists('payload', $data ?? [], null);
292306
}
293307

294308
/**
@@ -524,6 +538,60 @@ public function setVideo($video)
524538

525539
return $this;
526540
}
541+
542+
/**
543+
* Gets couponCode
544+
*
545+
* @return string|null
546+
*/
547+
public function getCouponCode()
548+
{
549+
return $this->container['couponCode'];
550+
}
551+
552+
/**
553+
* Sets couponCode
554+
*
555+
* @param string|null $couponCode A coupon code.
556+
*
557+
* @return self
558+
*/
559+
public function setCouponCode($couponCode)
560+
{
561+
if (is_null($couponCode)) {
562+
throw new \InvalidArgumentException('non-nullable couponCode cannot be null');
563+
}
564+
$this->container['couponCode'] = $couponCode;
565+
566+
return $this;
567+
}
568+
569+
/**
570+
* Gets payload
571+
*
572+
* @return string|null
573+
*/
574+
public function getPayload()
575+
{
576+
return $this->container['payload'];
577+
}
578+
579+
/**
580+
* Sets payload
581+
*
582+
* @param string|null $payload A payload.
583+
*
584+
* @return self
585+
*/
586+
public function setPayload($payload)
587+
{
588+
if (is_null($payload)) {
589+
throw new \InvalidArgumentException('non-nullable payload cannot be null');
590+
}
591+
$this->container['payload'] = $payload;
592+
593+
return $this;
594+
}
527595
/**
528596
* Returns true if offset exists. False otherwise.
529597
*

0 commit comments

Comments
 (0)