From 980302ca478f512b097d99b28490561290b70dee Mon Sep 17 00:00:00 2001 From: Vitaliy Parhomenko Date: Mon, 21 Aug 2023 23:29:35 +0300 Subject: [PATCH] - add \DTS\eBaySDK\Trading\Types\VideoDetailsType --- .gitignore | 1 + src/Trading/Types/ItemType.php | 7 ++++ src/Trading/Types/VideoDetailsType.php | 50 ++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 src/Trading/Types/VideoDetailsType.php diff --git a/.gitignore b/.gitignore index 947b2cf31d..d3b0976f2c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /build/artifacts /docs/_build /.phpunit.result.cache +/.idea diff --git a/src/Trading/Types/ItemType.php b/src/Trading/Types/ItemType.php index c68fbcbaad..1be2a3c479 100644 --- a/src/Trading/Types/ItemType.php +++ b/src/Trading/Types/ItemType.php @@ -138,6 +138,7 @@ * @property boolean $eBayPlusEligible * @property boolean $eMailDeliveryAvailable * @property boolean $IsSecureDescription + * @property \DTS\eBaySDK\Trading\Types\VideoDetailsType $VideoDetails */ class ItemType extends \DTS\eBaySDK\Types\BaseType { @@ -900,6 +901,12 @@ class ItemType extends \DTS\eBaySDK\Types\BaseType 'repeatable' => false, 'attribute' => false, 'elementName' => 'IsSecureDescription' + ], + 'VideoDetails' => [ + 'type' => 'DTS\eBaySDK\Trading\Types\VideoDetailsType', + 'repeatable' => false, + 'attribute' => false, + 'elementName' => 'VideoDetails' ] ]; diff --git a/src/Trading/Types/VideoDetailsType.php b/src/Trading/Types/VideoDetailsType.php new file mode 100644 index 0000000000..6465ff1045 --- /dev/null +++ b/src/Trading/Types/VideoDetailsType.php @@ -0,0 +1,50 @@ + [ + 'type' => 'string', + 'repeatable' => false, + 'attribute' => false, + 'elementName' => 'VideoID' + ] + ]; + + /** + * @param array $values Optional properties and values to assign to the object. + */ + public function __construct(array $values = []) + { + list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values); + + parent::__construct($parentValues); + + if (!array_key_exists(__CLASS__, self::$properties)) { + self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes); + } + + if (!array_key_exists(__CLASS__, self::$xmlNamespaces)) { + self::$xmlNamespaces[__CLASS__] = 'xmlns="urn:ebay:apis:eBLBaseComponents"'; + } + + $this->setValues(__CLASS__, $childValues); + } +}