added type property to Product and ProductBatchModel
This commit is contained in:
commit
72636563ff
23
src/Enum/Payments/PaymentObjectType.php
Normal file
23
src/Enum/Payments/PaymentObjectType.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHP 7.3
|
||||||
|
*
|
||||||
|
* @category PaymentInvoiceType
|
||||||
|
* @package RetailCrm\Api\Enum\Payments
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace RetailCrm\Api\Enum\Payments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class PaymentInvoiceType
|
||||||
|
*
|
||||||
|
* @category PaymentInvoiceType
|
||||||
|
* @package RetailCrm\Api\Enum\Payments
|
||||||
|
*/
|
||||||
|
final class PaymentObjectType
|
||||||
|
{
|
||||||
|
public const COMMODITY = 'commodity';
|
||||||
|
public const SERVICE = 'service';
|
||||||
|
public const PAYMENT = 'payment';
|
||||||
|
}
|
22
src/Enum/Product/ProductType.php
Normal file
22
src/Enum/Product/ProductType.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHP version 7.3
|
||||||
|
*
|
||||||
|
* @category CallEventType
|
||||||
|
* @package RetailCrm\Api\Enum\Telephony
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace RetailCrm\Api\Enum\Product;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class CallEventType
|
||||||
|
*
|
||||||
|
* @category CallEventType
|
||||||
|
* @package RetailCrm\Api\Enum\Telephony
|
||||||
|
*/
|
||||||
|
final class ProductType
|
||||||
|
{
|
||||||
|
public const PRODUCT = 'product';
|
||||||
|
public const SERVICE = 'service';
|
||||||
|
}
|
@ -187,4 +187,12 @@ class Product
|
|||||||
* @JMS\SerializedName("updatedAt")
|
* @JMS\SerializedName("updatedAt")
|
||||||
*/
|
*/
|
||||||
public $updatedAt;
|
public $updatedAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @JMS\Type("string")
|
||||||
|
* @JMS\SerializedName("type")
|
||||||
|
*/
|
||||||
|
public $type;
|
||||||
}
|
}
|
||||||
|
@ -130,4 +130,12 @@ abstract class ProductBatchBase
|
|||||||
* @JMS\SerializedName("catalogId")
|
* @JMS\SerializedName("catalogId")
|
||||||
*/
|
*/
|
||||||
public $catalogId;
|
public $catalogId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @JMS\Type("string")
|
||||||
|
* @JMS\SerializedName("type")
|
||||||
|
*/
|
||||||
|
public $type;
|
||||||
}
|
}
|
||||||
|
@ -629,6 +629,7 @@ class Store extends AbstractApiResourceGroup
|
|||||||
* use RetailCrm\Api\Model\Request\Store\ProductsBatchCreateRequest;
|
* use RetailCrm\Api\Model\Request\Store\ProductsBatchCreateRequest;
|
||||||
* use RetailCrm\Api\Factory\SimpleClientFactory;
|
* use RetailCrm\Api\Factory\SimpleClientFactory;
|
||||||
* use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
* use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||||||
|
* use RetailCrm\Api\Enum\Product\ProductType;
|
||||||
*
|
*
|
||||||
* $client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
* $client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||||||
*
|
*
|
||||||
@ -646,6 +647,7 @@ class Store extends AbstractApiResourceGroup
|
|||||||
* $productInput->popular = true;
|
* $productInput->popular = true;
|
||||||
* $productInput->recommended = true;
|
* $productInput->recommended = true;
|
||||||
* $productInput->stock = true;
|
* $productInput->stock = true;
|
||||||
|
* $productInput->type = ProductType::PRODUCT;
|
||||||
* $productEditGroupInput = new ProductEditGroupInput();
|
* $productEditGroupInput = new ProductEditGroupInput();
|
||||||
* $productEditGroupInput->externalId = 'testExternalId';
|
* $productEditGroupInput->externalId = 'testExternalId';
|
||||||
* $productEditGroupInput->id = 10;
|
* $productEditGroupInput->id = 10;
|
||||||
|
@ -11,6 +11,7 @@ namespace RetailCrm\Tests\ResourceGroup;
|
|||||||
|
|
||||||
use RetailCrm\Api\Component\Transformer\DateTimeTransformer;
|
use RetailCrm\Api\Component\Transformer\DateTimeTransformer;
|
||||||
use RetailCrm\Api\Enum\NumericBoolean;
|
use RetailCrm\Api\Enum\NumericBoolean;
|
||||||
|
use RetailCrm\Api\Enum\Product\ProductType;
|
||||||
use RetailCrm\Api\Enum\RequestMethod;
|
use RetailCrm\Api\Enum\RequestMethod;
|
||||||
use RetailCrm\Api\Model\Entity\Store\Inventory;
|
use RetailCrm\Api\Model\Entity\Store\Inventory;
|
||||||
use RetailCrm\Api\Model\Entity\Store\Offer;
|
use RetailCrm\Api\Model\Entity\Store\Offer;
|
||||||
@ -375,6 +376,7 @@ EOF;
|
|||||||
"maxPrice": 624,
|
"maxPrice": 624,
|
||||||
"id": 828272,
|
"id": 828272,
|
||||||
"article": "38311",
|
"article": "38311",
|
||||||
|
"type": "product",
|
||||||
"name": "Test Product",
|
"name": "Test Product",
|
||||||
"url": "https://example.com",
|
"url": "https://example.com",
|
||||||
"imageUrl": "https://example.com/image.jpg",
|
"imageUrl": "https://example.com/image.jpg",
|
||||||
@ -699,6 +701,7 @@ EOF;
|
|||||||
$productInput->popular = true;
|
$productInput->popular = true;
|
||||||
$productInput->recommended = true;
|
$productInput->recommended = true;
|
||||||
$productInput->stock = true;
|
$productInput->stock = true;
|
||||||
|
$productInput->type = ProductType::PRODUCT;
|
||||||
|
|
||||||
$productEditGroupInput = new ProductEditGroupInput();
|
$productEditGroupInput = new ProductEditGroupInput();
|
||||||
$productEditGroupInput->id = 9717;
|
$productEditGroupInput->id = 9717;
|
||||||
|
Loading…
Reference in New Issue
Block a user