Skip to content

Commit

Permalink
change quantity to int
Browse files Browse the repository at this point in the history
  • Loading branch information
Rimantas Ričkus committed Jun 4, 2024
1 parent 7c05a4e commit 6943537
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/Nodes/Invoice/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Nodes/Order/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Nodes/OrderResponse/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions tests/Nodes/OrderChangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testMinimalInvoice()
'value' => 'product-number-1'
]
],
'quantity' => -5,
'quantity' => 5,
'orderUnit' => 'C62',
]
],
Expand All @@ -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'));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<INVOICE_ITEM>
<LINE_ITEM_ID><![CDATA[line-item-id-1]]></LINE_ITEM_ID>
<PRODUCT_ID/>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
<PRODUCT_PRICE_FIX>
<bmecat:PRICE_AMOUNT>123.0</bmecat:PRICE_AMOUNT>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_invoice_with_delivery_date.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<INVOICE_ITEM>
<LINE_ITEM_ID><![CDATA[line-item-id-1]]></LINE_ITEM_ID>
<PRODUCT_ID/>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
<PRODUCT_PRICE_FIX>
<bmecat:PRICE_AMOUNT>123.0</bmecat:PRICE_AMOUNT>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_address.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_contactdetails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_delivery_date.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
<DELIVERY_DATE>
<DELIVERY_START_DATE><![CDATA[2020-02-27]]></DELIVERY_START_DATE>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_payment_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_payment_cash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_payment_check.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_payment_debit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_udx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
<ITEM_UDX>
<UDX.acme.abc><![CDATA[123]]></UDX.acme.abc>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_order_with_udx_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>10.0</QUANTITY>
<QUANTITY>10</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDER_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_orderchange.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>-5.0</QUANTITY>
<QUANTITY>5</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDER_ITEM>
</ORDERCHANGE_ITEM_LIST>
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/minimal_valid_orderresponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PRODUCT_ID>
<bmecat:SUPPLIER_PID><![CDATA[product-number-1]]></bmecat:SUPPLIER_PID>
</PRODUCT_ID>
<QUANTITY>5.0</QUANTITY>
<QUANTITY>5</QUANTITY>
<bmecat:ORDER_UNIT><![CDATA[C62]]></bmecat:ORDER_UNIT>
</ORDERRESPONSE_ITEM>
</ORDERRESPONSE_ITEM_LIST>
Expand Down

0 comments on commit 6943537

Please sign in to comment.