Added non_working_days field to settings. Added attachedTag field to customer
This commit is contained in:
commit
fa0e8a7075
@ -120,6 +120,15 @@ class Customer implements CustomerInterface
|
|||||||
*/
|
*/
|
||||||
public $tags;
|
public $tags;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @JMS\Type("string")
|
||||||
|
* @JMS\SerializedName("attachedTag")
|
||||||
|
*/
|
||||||
|
public $attachedTag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*
|
*
|
||||||
|
37
src/Model/Entity/Settings/NonWorkingDay.php
Normal file
37
src/Model/Entity/Settings/NonWorkingDay.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHP version 7.3
|
||||||
|
*
|
||||||
|
* @category Value
|
||||||
|
* @package RetailCrm\Api\Model\Entity\Settings
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace RetailCrm\Api\Model\Entity\Settings;
|
||||||
|
|
||||||
|
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class NonWorkingDay
|
||||||
|
*
|
||||||
|
* @category NonWorkingDay
|
||||||
|
* @package RetailCrm\Api\Model\Entity\Settings
|
||||||
|
*/
|
||||||
|
class NonWorkingDay
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @JMS\Type("string")
|
||||||
|
* @JMS\SerializedName("start_date")
|
||||||
|
*/
|
||||||
|
public $startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @JMS\Type("string")
|
||||||
|
* @JMS\SerializedName("end_date")
|
||||||
|
*/
|
||||||
|
public $endDate;
|
||||||
|
}
|
@ -44,10 +44,18 @@ class Settings
|
|||||||
public $timezone;
|
public $timezone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \RetailCrm\Api\Model\Entity\Settings\WorkTime
|
* @var \RetailCrm\Api\Model\Entity\Settings\WorkTime[]
|
||||||
*
|
*
|
||||||
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Settings\WorkTime>")
|
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Settings\WorkTime>")
|
||||||
* @JMS\SerializedName("work_times")
|
* @JMS\SerializedName("work_times")
|
||||||
*/
|
*/
|
||||||
public $workTimes;
|
public $workTimes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \RetailCrm\Api\Model\Entity\Settings\NonWorkingDay[]
|
||||||
|
*
|
||||||
|
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Settings\NonWorkingDay>")
|
||||||
|
* @JMS\SerializedName("non_working_days")
|
||||||
|
*/
|
||||||
|
public $nonWorkingDays;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ namespace RetailCrm\Tests\Model\Callback\Entity\Integration;
|
|||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use RetailCrm\Api\Factory\SerializerFactory;
|
use RetailCrm\Api\Factory\SerializerFactory;
|
||||||
|
use RetailCrm\Api\Model\Entity\Settings\NonWorkingDay;
|
||||||
use RetailCrm\Api\Model\Entity\Settings\Settings as SystemSettings;
|
use RetailCrm\Api\Model\Entity\Settings\Settings as SystemSettings;
|
||||||
use RetailCrm\Api\Model\Callback\Entity\Integration\Settings;
|
use RetailCrm\Api\Model\Callback\Entity\Integration\Settings;
|
||||||
use RetailCrm\Api\Model\Entity\Settings\Value;
|
use RetailCrm\Api\Model\Entity\Settings\Value;
|
||||||
@ -44,6 +45,12 @@ class SettingsTest extends TestCase
|
|||||||
"lunch_end_time" => "05:00",
|
"lunch_end_time" => "05:00",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'non_working_days' => [
|
||||||
|
[
|
||||||
|
'start_date' => '05.29',
|
||||||
|
'end_date' => '06.29'
|
||||||
|
]
|
||||||
|
]
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
Settings::class
|
Settings::class
|
||||||
@ -53,5 +60,6 @@ class SettingsTest extends TestCase
|
|||||||
self::assertInstanceOf(SystemSettings::class, $settings->settings);
|
self::assertInstanceOf(SystemSettings::class, $settings->settings);
|
||||||
self::assertInstanceOf(Value::class, $settings->settings->defaultCurrency);
|
self::assertInstanceOf(Value::class, $settings->settings->defaultCurrency);
|
||||||
self::assertInstanceOf(WorkTime::class, $settings->settings->workTimes[0]);
|
self::assertInstanceOf(WorkTime::class, $settings->settings->workTimes[0]);
|
||||||
|
self::assertInstanceOf(NonWorkingDay::class, $settings->settings->nonWorkingDays[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user