Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
Do filter out null-value fields in responses and requests
  • Loading branch information
Erik Räni authored Jul 24, 2019
1 parent 49e80a3 commit f9987c2
Show file tree
Hide file tree
Showing 46 changed files with 27 additions and 3,919 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Messente API Library

- Messente API version: 1.0.2
- PHP artifact version: 1.0.2
- PHP artifact version: 1.0.3

[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.

Expand Down Expand Up @@ -118,7 +118,7 @@ try {

## License

[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)

## Terms

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "messente/messente-api-php",
"version": "1.0.2",
"version": "1.0.3",
"description": "[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.",
"keywords": ["viber", "sms", "whatsapp", "phonebook", "openapitools",
"openapi-generator",
Expand Down
6 changes: 3 additions & 3 deletions docs/Api/BlacklistApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $apiInstance = new Messente\Api\Api\BlacklistApi(
new GuzzleHttp\Client(),
$config
);
$numberToBlacklist = new \Messente\Api\Model\NumberToBlacklist(); // \Messente\Api\Model\NumberToBlacklist | Phone number to be blacklisted
$numberToBlacklist = {"phoneNumber":"+37251000000"}; // \Messente\Api\Model\NumberToBlacklist | Phone number to be blacklisted

try {
$apiInstance->addToBlacklist($numberToBlacklist);
Expand Down Expand Up @@ -96,7 +96,7 @@ $apiInstance = new Messente\Api\Api\BlacklistApi(
new GuzzleHttp\Client(),
$config
);
$phone = 'phone_example'; // string | A phone number
$phone = +37251000000; // string | A phone number

try {
$apiInstance->deleteFromBlacklist($phone);
Expand Down Expand Up @@ -213,7 +213,7 @@ $apiInstance = new Messente\Api\Api\BlacklistApi(
new GuzzleHttp\Client(),
$config
);
$phone = 'phone_example'; // string | A phone number
$phone = +37251000000; // string | A phone number

try {
$apiInstance->isBlacklisted($phone);
Expand Down
22 changes: 11 additions & 11 deletions docs/Api/ContactsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$groupId = 'groupId_example'; // string | String in UUID format
$phone = 'phone_example'; // string | A phone number
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format
$phone = +37251000000; // string | A phone number

try {
$result = $apiInstance->addContactToGroup($groupId, $phone);
Expand Down Expand Up @@ -103,7 +103,7 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$contactFields = new \Messente\Api\Model\ContactFields(); // \Messente\Api\Model\ContactFields |
$contactFields = {"phoneNumber":"+37251000000","email":"[email protected]","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"}; // \Messente\Api\Model\ContactFields |

try {
$result = $apiInstance->createContact($contactFields);
Expand Down Expand Up @@ -164,7 +164,7 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$phone = 'phone_example'; // string | A phone number
$phone = +37251000000; // string | A phone number

try {
$apiInstance->deleteContact($phone);
Expand Down Expand Up @@ -224,7 +224,7 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$phone = 'phone_example'; // string | A phone number
$phone = +37251000000; // string | A phone number

try {
$result = $apiInstance->fetchContact($phone);
Expand Down Expand Up @@ -285,7 +285,7 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$phone = 'phone_example'; // string | A phone number
$phone = +37251000000; // string | A phone number

try {
$result = $apiInstance->fetchContactGroups($phone);
Expand Down Expand Up @@ -346,7 +346,7 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$groupIds = array('groupIds_example'); // string[] | Optional one or many group id strings in UUID format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\"
$groupIds = ["5792a02a-e5c2-422b-a0a0-0ae65d814663","4792a02a-e5c2-422b-a0a0-0ae65d814662"]; // string[] | Optional one or many group id strings in UUID format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\"

try {
$result = $apiInstance->fetchContacts($groupIds);
Expand Down Expand Up @@ -407,8 +407,8 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$groupId = 'groupId_example'; // string | String in UUID format
$phone = 'phone_example'; // string | A phone number
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format
$phone = +37251000000; // string | A phone number

try {
$apiInstance->removeContactFromGroup($groupId, $phone);
Expand Down Expand Up @@ -469,8 +469,8 @@ $apiInstance = new Messente\Api\Api\ContactsApi(
new GuzzleHttp\Client(),
$config
);
$phone = 'phone_example'; // string | A phone number
$contactUpdateFields = new \Messente\Api\Model\ContactUpdateFields(); // \Messente\Api\Model\ContactUpdateFields |
$phone = +37251000000; // string | A phone number
$contactUpdateFields = {"email":"[email protected]","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"}; // \Messente\Api\Model\ContactUpdateFields |

try {
$result = $apiInstance->updateContact($phone, $contactUpdateFields);
Expand Down
10 changes: 5 additions & 5 deletions docs/Api/GroupsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $apiInstance = new Messente\Api\Api\GroupsApi(
new GuzzleHttp\Client(),
$config
);
$groupName = new \Messente\Api\Model\GroupName(); // \Messente\Api\Model\GroupName |
$groupName = {"name":"Any group name"}; // \Messente\Api\Model\GroupName |

try {
$result = $apiInstance->createGroup($groupName);
Expand Down Expand Up @@ -98,7 +98,7 @@ $apiInstance = new Messente\Api\Api\GroupsApi(
new GuzzleHttp\Client(),
$config
);
$groupId = 'groupId_example'; // string | String in UUID format
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format

try {
$apiInstance->deleteGroup($groupId);
Expand Down Expand Up @@ -158,7 +158,7 @@ $apiInstance = new Messente\Api\Api\GroupsApi(
new GuzzleHttp\Client(),
$config
);
$groupId = 'groupId_example'; // string | String in UUID format
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format

try {
$result = $apiInstance->fetchGroup($groupId);
Expand Down Expand Up @@ -276,8 +276,8 @@ $apiInstance = new Messente\Api\Api\GroupsApi(
new GuzzleHttp\Client(),
$config
);
$groupId = 'groupId_example'; // string | String in UUID format
$groupName = new \Messente\Api\Model\GroupName(); // \Messente\Api\Model\GroupName |
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format
$groupName = {"name":"Any group name"}; // \Messente\Api\Model\GroupName |

try {
$result = $apiInstance->updateGroup($groupId, $groupName);
Expand Down
4 changes: 2 additions & 2 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'OpenAPI-Generator/1.0.2/PHP';
protected $userAgent = 'OpenAPI-Generator/1.0.3/PHP';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -397,7 +397,7 @@ public static function toDebugReport()
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 1.0.2' . PHP_EOL;
$report .= ' SDK Package Version: 1.0.2' . PHP_EOL;
$report .= ' SDK Package Version: 1.0.3' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
6 changes: 3 additions & 3 deletions lib/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
$imploded = implode("', '", $openAPIType::getAllowableEnumValues());
throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'");
}

$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]);

if ($value !== null) {
$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]);
}
}
} else {
foreach($data as $property => $value) {
Expand Down
114 changes: 0 additions & 114 deletions test/Api/BlacklistApiTest.php

This file was deleted.

Loading

0 comments on commit f9987c2

Please sign in to comment.