1
0
mirror of synced 2024-11-21 21:06:07 +03:00

Merge pull request #118 from Neur0toxine/fix-customer-birthday

closes #117 - fix for customer[birthday] date format
This commit is contained in:
Alex Lushpai 2021-09-03 12:38:29 +03:00 committed by GitHub
commit fa93c2bc8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -307,7 +307,7 @@ class Customer implements CustomerInterface
/**
* @var DateTime
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\Type("DateTime<'Y-m-d'>")
* @JMS\SerializedName("birthday")
*/
public $birthday;

View File

@ -9,6 +9,7 @@
namespace RetailCrm\Tests\ResourceGroup;
use RetailCrm\Api\Component\Transformer\DateTimeTransformer;
use RetailCrm\Api\Enum\ByIdentifier;
use RetailCrm\Api\Enum\Customers\ContragentType;
use RetailCrm\Api\Enum\Customers\CustomerType;
@ -262,6 +263,7 @@ EOF;
$customer->phones = [
new CustomerPhone('(603) 292-6810')
];
$customer->birthday = DateTimeTransformer::createDate('1980-01-01');
$request = new CustomersCreateRequest();
$request->site = 'aliexpress';