From 69435371551c7735f3263f274d204359a4bea6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimantas=20Ri=C4=8Dkus?= Date: Tue, 4 Jun 2024 14:10:06 +0300 Subject: [PATCH] change quantity to int --- src/Nodes/Invoice/Item.php | 4 ++-- src/Nodes/Order/Item.php | 4 ++-- src/Nodes/OrderResponse/Item.php | 4 ++-- tests/Nodes/OrderChangeTest.php | 4 ++-- tests/assets/minimal_valid_invoice.xml | 2 +- tests/assets/minimal_valid_invoice_with_delivery_date.xml | 2 +- tests/assets/minimal_valid_order.xml | 2 +- tests/assets/minimal_valid_order_with_address.xml | 2 +- tests/assets/minimal_valid_order_with_contactdetails.xml | 2 +- tests/assets/minimal_valid_order_with_delivery_date.xml | 2 +- .../minimal_valid_order_with_delivery_date_in_order_item.xml | 2 +- tests/assets/minimal_valid_order_with_payment_account.xml | 2 +- tests/assets/minimal_valid_order_with_payment_card_amex.xml | 2 +- tests/assets/minimal_valid_order_with_payment_cash.xml | 2 +- tests/assets/minimal_valid_order_with_payment_check.xml | 2 +- tests/assets/minimal_valid_order_with_payment_debit.xml | 2 +- tests/assets/minimal_valid_order_with_udx.xml | 2 +- tests/assets/minimal_valid_order_with_udx_header.xml | 2 +- tests/assets/minimal_valid_orderchange.xml | 2 +- tests/assets/minimal_valid_orderresponse.xml | 2 +- 20 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Nodes/Invoice/Item.php b/src/Nodes/Invoice/Item.php index 79fff72..cd4ddb3 100644 --- a/src/Nodes/Invoice/Item.php +++ b/src/Nodes/Invoice/Item.php @@ -39,10 +39,10 @@ class Item implements NodeInterface /** * @Serializer\Expose - * @Serializer\Type("float") + * @Serializer\Type("int") * @Serializer\SerializedName("QUANTITY") * - * @var float + * @var int */ protected $quantity; diff --git a/src/Nodes/Order/Item.php b/src/Nodes/Order/Item.php index 251ade3..4f1608a 100644 --- a/src/Nodes/Order/Item.php +++ b/src/Nodes/Order/Item.php @@ -33,10 +33,10 @@ class Item implements NodeInterface /** * @Serializer\Expose - * @Serializer\Type("float") + * @Serializer\Type("int") * @Serializer\SerializedName("QUANTITY") * - * @var float + * @var int */ protected $quantity; diff --git a/src/Nodes/OrderResponse/Item.php b/src/Nodes/OrderResponse/Item.php index e2a271e..21e2720 100644 --- a/src/Nodes/OrderResponse/Item.php +++ b/src/Nodes/OrderResponse/Item.php @@ -29,10 +29,10 @@ class Item implements NodeInterface /** * @Serializer\Expose - * @Serializer\Type("float") + * @Serializer\Type("int") * @Serializer\SerializedName("QUANTITY") * - * @var float + * @var int */ protected $quantity; diff --git a/tests/Nodes/OrderChangeTest.php b/tests/Nodes/OrderChangeTest.php index dbc2641..d1a6e03 100644 --- a/tests/Nodes/OrderChangeTest.php +++ b/tests/Nodes/OrderChangeTest.php @@ -56,7 +56,7 @@ public function testMinimalInvoice() 'value' => 'product-number-1' ] ], - 'quantity' => -5, + 'quantity' => 5, 'orderUnit' => 'C62', ] ], @@ -68,7 +68,7 @@ public function testMinimalInvoice() $xml = $this->serializer->serialize($node, 'xml'); - $this->assertEquals(file_get_contents(__DIR__.'/../assets/minimal_valid_orderchange.xml'), $xml); + $this->assertEquals(file_get_contents(__DIR__ . '/../assets/minimal_valid_orderchange.xml'), $xml); $this->assertTrue(SchemaValidator::isValid($xml, '2.1')); } diff --git a/tests/assets/minimal_valid_invoice.xml b/tests/assets/minimal_valid_invoice.xml index 6a551a9..3e92a7a 100644 --- a/tests/assets/minimal_valid_invoice.xml +++ b/tests/assets/minimal_valid_invoice.xml @@ -21,7 +21,7 @@ - 10.0 + 10 123.0 diff --git a/tests/assets/minimal_valid_invoice_with_delivery_date.xml b/tests/assets/minimal_valid_invoice_with_delivery_date.xml index 8a6430e..6b07d22 100644 --- a/tests/assets/minimal_valid_invoice_with_delivery_date.xml +++ b/tests/assets/minimal_valid_invoice_with_delivery_date.xml @@ -25,7 +25,7 @@ - 10.0 + 10 123.0 diff --git a/tests/assets/minimal_valid_order.xml b/tests/assets/minimal_valid_order.xml index 5c15849..0ee0bec 100644 --- a/tests/assets/minimal_valid_order.xml +++ b/tests/assets/minimal_valid_order.xml @@ -24,7 +24,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_address.xml b/tests/assets/minimal_valid_order_with_address.xml index 6de65f7..0c2823f 100644 --- a/tests/assets/minimal_valid_order_with_address.xml +++ b/tests/assets/minimal_valid_order_with_address.xml @@ -42,7 +42,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_contactdetails.xml b/tests/assets/minimal_valid_order_with_contactdetails.xml index 972c86d..c7cc62c 100644 --- a/tests/assets/minimal_valid_order_with_contactdetails.xml +++ b/tests/assets/minimal_valid_order_with_contactdetails.xml @@ -40,7 +40,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_delivery_date.xml b/tests/assets/minimal_valid_order_with_delivery_date.xml index df95025..ed1eb80 100644 --- a/tests/assets/minimal_valid_order_with_delivery_date.xml +++ b/tests/assets/minimal_valid_order_with_delivery_date.xml @@ -28,7 +28,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_delivery_date_in_order_item.xml b/tests/assets/minimal_valid_order_with_delivery_date_in_order_item.xml index c7b6d88..22d105f 100644 --- a/tests/assets/minimal_valid_order_with_delivery_date_in_order_item.xml +++ b/tests/assets/minimal_valid_order_with_delivery_date_in_order_item.xml @@ -24,7 +24,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_payment_account.xml b/tests/assets/minimal_valid_order_with_payment_account.xml index 7cac0dd..23e0696 100644 --- a/tests/assets/minimal_valid_order_with_payment_account.xml +++ b/tests/assets/minimal_valid_order_with_payment_account.xml @@ -33,7 +33,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_payment_card_amex.xml b/tests/assets/minimal_valid_order_with_payment_card_amex.xml index 170f35f..024328b 100644 --- a/tests/assets/minimal_valid_order_with_payment_card_amex.xml +++ b/tests/assets/minimal_valid_order_with_payment_card_amex.xml @@ -31,7 +31,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_payment_cash.xml b/tests/assets/minimal_valid_order_with_payment_cash.xml index da32f50..9fca574 100644 --- a/tests/assets/minimal_valid_order_with_payment_cash.xml +++ b/tests/assets/minimal_valid_order_with_payment_cash.xml @@ -27,7 +27,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_payment_check.xml b/tests/assets/minimal_valid_order_with_payment_check.xml index 256a325..7c8add5 100644 --- a/tests/assets/minimal_valid_order_with_payment_check.xml +++ b/tests/assets/minimal_valid_order_with_payment_check.xml @@ -27,7 +27,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_payment_debit.xml b/tests/assets/minimal_valid_order_with_payment_debit.xml index e422fb5..dc33029 100644 --- a/tests/assets/minimal_valid_order_with_payment_debit.xml +++ b/tests/assets/minimal_valid_order_with_payment_debit.xml @@ -27,7 +27,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_udx.xml b/tests/assets/minimal_valid_order_with_udx.xml index e02e31c..485d516 100644 --- a/tests/assets/minimal_valid_order_with_udx.xml +++ b/tests/assets/minimal_valid_order_with_udx.xml @@ -25,7 +25,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_order_with_udx_header.xml b/tests/assets/minimal_valid_order_with_udx_header.xml index 19cb3a8..0ea4a13 100644 --- a/tests/assets/minimal_valid_order_with_udx_header.xml +++ b/tests/assets/minimal_valid_order_with_udx_header.xml @@ -29,7 +29,7 @@ - 10.0 + 10 diff --git a/tests/assets/minimal_valid_orderchange.xml b/tests/assets/minimal_valid_orderchange.xml index 5897aea..5dbef69 100644 --- a/tests/assets/minimal_valid_orderchange.xml +++ b/tests/assets/minimal_valid_orderchange.xml @@ -25,7 +25,7 @@ - -5.0 + 5 diff --git a/tests/assets/minimal_valid_orderresponse.xml b/tests/assets/minimal_valid_orderresponse.xml index d4a2ae6..1fb81fa 100644 --- a/tests/assets/minimal_valid_orderresponse.xml +++ b/tests/assets/minimal_valid_orderresponse.xml @@ -25,7 +25,7 @@ - 5.0 + 5