Skip to content

Commit 492de43

Browse files
authored
LoyaltyEventId field for Order model
1 parent 65473b8 commit 492de43

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/Model/Entity/Orders/Order.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ class Order
200200
*/
201201
public $loyaltyLevel;
202202

203+
/**
204+
* @var int
205+
*
206+
* @JMS\Type("int")
207+
* @JMS\SerializedName("loyaltyEventDiscountId")
208+
*/
209+
public $loyaltyEventDiscountId;
210+
203211
/**
204212
* @var \RetailCrm\Api\Model\Entity\Loyalty\LoyaltyEventDiscount
205213
*

tests/src/ResourceGroup/OrdersTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,7 @@ public function testCreate(): void
967967
$order->shipmentStore = 'main12';
968968
$order->shipmentDate = (new DateTime())->add(new DateInterval('P7D'));
969969
$order->shipped = false;
970+
$order->loyaltyEventDiscountId = 7;
970971
$order->customFields = [
971972
"galka" => false,
972973
"test_number" => 0,
@@ -988,6 +989,7 @@ public function testCreate(): void
988989
],
989990
$encodedOrder['items'][0]['markingObjects']
990991
);
992+
self::assertSame(7, $encodedOrder['loyaltyEventDiscountId']);
991993
self::assertArrayNotHasKey('markingCodes', $encodedOrder['items'][0]);
992994

993995
$mock = static::createApiMockBuilder('orders/create');

0 commit comments

Comments
 (0)