Skip to content

Commit

Permalink
Add increment id to order output (#11)
Browse files Browse the repository at this point in the history
* Add increment id to order output

* Bump up version in module.xml
  • Loading branch information
joeyfromspace authored and deatheragetr committed Oct 15, 2018
1 parent befcecc commit e127219
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public function normalizeOrder($order)
$paymentData = $quote->getPayment();
$orderArray = array(
'id' => $order->getEntityId(),
'increment_id' => $order->getIncrementId(),
'items' => $this->normalizeOrderItems($order->getItems()),
'state' => $order->getState(),
'status' => $order->getStatus(),
Expand Down
6 changes: 6 additions & 0 deletions Test/Unit/Helper/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ public function testNormalizeOrderReturnArray(
->disableOriginalConstructor()
->getMock();

$order
->expects($this->once())
->method('getIncrementId')
->willReturn($fixture['increment_id']);

$order
->expects($this->once())
->method('getEntityId')
Expand Down Expand Up @@ -378,6 +383,7 @@ public function dataProviderNormalizeOrderReturnArray()
[
'fixture' => [
'id' => 3,
'increment_id' => 1249920111,
'items' => [
[
'name' => 'foo',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "kustomer/kustomer-integration",
"description": "Integrate Magento eCommerce site with Kustomer service",
"type": "magento2-module",
"version": "1.1.3",
"version": "1.1.4",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Kustomer_KustomerIntegration" setup_version="1.1.3">
<module name="Kustomer_KustomerIntegration" setup_version="1.1.4">
<sequence>
<module name="Magento_Store"/>
</sequence>
Expand Down

0 comments on commit e127219

Please sign in to comment.