Test Failed
Push — master ( dd0813...14557d )
by Antony
06:13
created

UnleashedOrderTest   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 259
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 173
dl 0
loc 259
rs 10
c 0
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A testSetBodySalesOrderLinesWithModifiers() 0 30 1
A testSetBodyCustomerCodeAndName() 0 20 1
A testSetBodyDeliveryMethodAndDeliveryName() 0 13 1
A testSetBodySalesOrderLines() 0 17 1
A testSetBodyCurrencyCode() 0 13 1
A testChangeOrderStatus() 0 38 1
A testSetBodySubTotalAndTax() 0 22 1
A setUp() 0 16 1
A testSetBodyAddress() 0 34 1
1
<?php
2
3
namespace AntonyThorpe\SilverShopUnleashed\Tests;
4
5
use SilverStripe\Dev\SapphireTest;
6
use SilverStripe\Core\Config\Config;
7
use SilverShop\Page\Product;
8
use SilverShop\Model\Product\OrderItem;
9
use SilverShop\Model\Modifiers\OrderModifier;
10
use SilverShop\Model\Order;
11
use SilverShop\Checkout\OrderProcessor;
12
use SilverShop\Cart\ShoppingCart;
13
use SilverShop\Tests\ShopTest;
14
use SilverShop\Model\Modifiers\Shipping\Simple;
15
use SilverShop\Model\Modifiers\Tax\FlatTax;
16
use SilverShop\Shipping\Model\DistanceShippingMethod;
17
use AntonyThorpe\SilverShopUnleashed\OrderBulkLoader;
18
use AntonyThorpe\SilverShopUnleashed\Defaults;
19
20
class UnleashedOrderTest extends SapphireTest
21
{
22
    protected static $fixture_file = [
23
        'vendor/silvershop/core/tests/php/Fixtures/ShopMembers.yml',
24
        'vendor/silvershop/core/tests/php/Fixtures/shop.yml',
25
        'vendor/silvershop/shipping/tests/DistanceShippingMethod.yml',
26
        'vendor/silvershop/shipping/tests/Warehouses.yml',
27
        'fixtures/models.yml'
28
    ];
29
30
    public function setUp()
31
    {
32
        Defaults::config()->send_sales_orders_to_unleashed = false;
33
        Defaults::config()->tax_modifier_class_name = 'SilverShop\Model\Modifiers\Tax\FlatTax';
34
        Defaults::config()->shipping_modifier_class_name = 'SilverShop\Model\Modifiers\Shipping\Simple';
35
        parent::setUp();
36
        ShoppingCart::singleton()->clear();
37
        ShopTest::setConfiguration(); //reset config
38
        Config::modify()
39
            ->set(FlatTax::class, 'rate', 0.15)
40
            ->set(FlatTax::class, 'exclusive', true)
41
            ->set(FlatTax::class, 'name', 'GST')
42
            ->set(FlatTax::class, 'tax_code', 'OUTPUT2')
43
            ->set(Simple::class, 'default_charge', 8.95)
44
            ->set(Simple::class, 'product_code', 'Freight')
45
            ->merge(Order::class, 'modifiers', [FlatTax::class, Simple::class]);
46
    }
47
48
    protected $order_status_map = [
49
        'Open' => 'Unpaid',
50
        'Parked' => 'Paid',
51
        'Backordered' => 'Processing',
52
        'Placed' => 'Processing',
53
        'Picking' => 'Processing',
54
        'Picked' => 'Processing',
55
        'Packed' => 'Processing',
56
        'Dispatched' => 'Sent',
57
        'Complete' => 'Complete',
58
        'Deleted' => 'MemberCancelled'
59
    ];
60
61
    public function testChangeOrderStatus()
62
    {
63
        $apidata_array = json_decode($this->jsondata, true);
64
        $apidata_array = reset($apidata_array);
65
        $apidata = $apidata_array['Items'];
66
67
        $loader = OrderBulkLoader::create('SilverShop\Model\Order');
68
        $loader->transforms = [
69
            'Status' => [
70
                'callback' => function ($value, &$placeholder) {
0 ignored issues
show
Unused Code introduced by
The parameter $placeholder is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

70
                'callback' => function ($value, /** @scrutinizer ignore-unused */ &$placeholder) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
71
                    // convert from Unleashed Sales Order status to Silvershop
72
                    return $this->order_status_map[$value];
73
                }
74
            ]
75
        ];
76
        $results = $loader->updateRecords($apidata);
77
78
        // Check Results
79
        $this->assertEquals($results->CreatedCount(), 0);
80
        $this->assertEquals($results->UpdatedCount(), 2);
81
        $this->assertEquals($results->DeletedCount(), 0);
82
        $this->assertEquals($results->SkippedCount(), 0);
83
        $this->assertEquals($results->Count(), 2);
84
85
        // Check Dataobjects
86
        $order1 = Order::get()->find('Reference', 'O1');
87
        //print_r($order1);
88
        $this->assertEquals(
89
            'Processing',
90
            $order1->Status,
91
            'OrderStatus of reference O1 is "Processing"'
92
        );
93
94
        $order2 = Order::get()->find('Reference', 'O2');
95
        $this->assertEquals(
96
            'Sent',
97
            $order2->Status,
98
            'OrderStatus of reference O1 is "Sent"'
99
        );
100
    }
101
102
    public function testSetBodyAddress()
103
    {
104
        $body = [
105
            'Addresses' => []
106
        ];
107
        $order = $this->objFromFixture(Order::class, "payablecart");
108
        OrderProcessor::create($order)->placeOrder();
109
        $body = $order->setBodyAddress($body, $order, 'Postal');
110
        $result = implode('|', array_values($body['Addresses'][0]));
111
        $this->assertSame(
112
            $result,
113
            '12 Foo Street Bar Farmville|Postal|Farmville|United States||New Sandwich|12 Foo Street|Bar',
114
            'Postal Address added to $body["Address"]'
115
        );
116
117
        $body = $order->setBodyAddress($body, $order, 'Physical');
118
        $result = implode('|', array_values($body['Addresses'][1]));
119
        $this->assertSame(
120
            $result,
121
            '12 Foo Street Bar Farmville|Physical|Farmville|United States||New Sandwich|12 Foo Street|Bar',
122
            'Physical Address added to $body["Address"]'
123
        );
124
        $result = implode('|', array_values($body['Addresses'][2]));
125
        $this->assertSame(
126
            $result,
127
            '12 Foo Street Bar Farmville|Shipping|Farmville|United States||New Sandwich|12 Foo Street|Bar',
128
            'Shipping Address added to $body["Address"]'
129
        );
130
131
        $result = $body['DeliveryCity'] . '|' . $body['DeliveryCountry'] . '|' . $body['DeliveryPostCode'] . '|' . $body['DeliveryRegion'] . '|' . $body['DeliveryStreetAddress'] . '|' . $body['DeliveryStreetAddress2'];
132
        $this->assertSame(
133
            $result,
134
            'Farmville|United States||New Sandwich|12 Foo Street|Bar',
135
            'Delivery Address added to $body'
136
        );
137
    }
138
139
    public function testSetBodyCurrencyCode()
140
    {
141
        $body = [
142
            'Currency' => []
143
        ];
144
        $order = $this->objFromFixture(Order::class, "payablecart");
145
        OrderProcessor::create($order)->placeOrder();
146
        $body = $order->setBodyCurrencyCode($body, $order);
147
148
        $this->assertSame(
149
            'NZD',
150
            $body['Currency']['CurrencyCode'],
151
            'Currency Code added to $body'
152
        );
153
    }
154
155
    public function testSetBodyCustomerCodeAndName()
156
    {
157
        $body = [];
158
        $order = $this->objFromFixture(Order::class, "payablecart");
159
        OrderProcessor::create($order)->placeOrder();
160
        $body = $order->setBodyCustomerCodeAndName($body, $order);
161
        $result = implode('|', array_values($body));
162
        $this->assertSame(
163
            $result,
164
            'Payable Smith|Payable Smith',
165
            'Set BodyCustomerCodeAndName'
166
        );
167
168
        $order->BillingAddress()->Company = 'Test Company';
169
        $body = $order->setBodyCustomerCodeAndName($body, $order);
170
        $result = implode('|', array_values($body));
171
        $this->assertSame(
172
            $result,
173
            'Test Company|Test Company',
174
            'Set BodyCustomerCodeAndName with Company name'
175
        );
176
    }
177
178
    public function testSetBodySalesOrderLines()
179
    {
180
        $body = [
181
            'Tax' => [
182
                'TaxCode' => 'OUTPUT2'
183
            ]
184
        ];
185
        $order = $this->objFromFixture(Order::class, "paid1");
186
        OrderProcessor::create($order)->placeOrder();
187
        $order->write();
188
        $order->calculate();
189
        $body = $order->setBodySalesOrderLines($body, $order, 'SilverShop\Model\Modifiers\Tax\FlatTax', 2);
190
        $result = json_encode($body);
191
        $this->assertSame(
192
            $result,
193
            '{"Tax":{"TaxCode":"OUTPUT2"},"SalesOrderLines":[{"DiscountRate":0,"Guid":"G401","LineNumber":1,"LineType":null,"LineTotal":8,"OrderQuantity":1,"Product":{"Guid":"G11"},"UnitPrice":8,"LineTax":1.2,"LineTaxCode":"OUTPUT2"},{"DiscountRate":0,"Guid":"G402","LineNumber":2,"LineType":null,"LineTotal":400,"OrderQuantity":2,"Product":{"Guid":"G15"},"UnitPrice":200,"LineTax":60,"LineTaxCode":"OUTPUT2"}]}',
194
            'Set SetBodySalesOrderLines'
195
        );
196
    }
197
198
    public function testSetBodySalesOrderLinesWithModifiers()
199
    {
200
        $body = [
201
            'Tax' => [
202
                'TaxCode' => 'OUTPUT2'
203
            ]
204
        ];
205
        $order = Order::create();
206
        $urntap = $this->objFromFixture(Product::class, 'urntap');
207
        $urntap->publishSingle();
208
        $order->Items()->add($urntap->createItem(1));
209
        $order->write();
210
        OrderProcessor::create($order)->placeOrder();
211
        $total = $order->calculate();
212
213
        $this->assertEquals(1, $order->Items()->count());
214
        $this->assertEquals(2, $order->Modifiers()->count()); // Shipping & GST
215
        $this->assertEquals(84.45, $total, 'Total equals $84.45');
216
        $body = $order->setBodySalesOrderLines($body, $order, 'SilverShop\Model\Modifiers\Tax\FlatTax', 2);
217
        $freight_modifier = $body['SalesOrderLines'][1];
218
        $result = $freight_modifier['DiscountRate'] . '|' . $freight_modifier['LineNumber'] . '|' . $freight_modifier['LineTotal'] . '|' . $freight_modifier['LineType'] . '|' . $freight_modifier['OrderQuantity'] . '|' . $freight_modifier['UnitPrice'] . '|' . $freight_modifier['LineTax'] . '|' . $freight_modifier['LineTaxCode'];
219
        $this->assertSame(
220
            $result,
221
            '0|2|8.95||1|8.95|1.34|OUTPUT2',
222
            'Modifiers in the SalesOrderLines added to $body'
223
        );
224
        $this->assertSame(
225
            $freight_modifier['Product']['ProductCode'],
226
            'Freight',
227
            'ProductCode of the Freight Modifier in $body is "Freight"'
228
        );
229
    }
230
231
    public function testSetBodySubTotalAndTax()
232
    {
233
        $order = Order::create();
234
        $urntap = $this->objFromFixture(Product::class, 'urntap');
235
        $urntap->publishSingle();
236
        $order->Items()->add($urntap->createItem(1));
237
        $order->write();
238
        OrderProcessor::create($order)->placeOrder();
239
        $total = $order->calculate();
0 ignored issues
show
Unused Code introduced by
The assignment to $total is dead and can be removed.
Loading history...
240
241
        $body = $order->setBodySubTotalAndTax([], $order, 'SilverShop\Model\Modifiers\Tax\FlatTax', 2);
242
        $result = $body['Taxable'] . '|' . $body['TaxTotal'] . '|' . $body['SubTotal'];
243
244
        $this->assertSame(
245
            $result,
246
            '1|9.85|74.60',
247
            'Taxable, TaxTotal & SubTotal added to $body'
248
        );
249
        $this->assertSame(
250
            $body['Tax']['TaxCode'],
251
            'OUTPUT2',
252
            'TaxCode set in $body'
253
        );
254
    }
255
256
    public function testSetBodyDeliveryMethodAndDeliveryName()
257
    {
258
        Defaults::config()->shipping_modifier_class_name = 'SilverShop\Shipping\ShippingFrameworkModifier';
259
        Config::modify()->set('SilverShop\Shipping\ShippingFrameworkModifier', 'product_code', 'Freight');
260
        $body = [];
261
        $defaults = Defaults::config();
262
        $order = $this->objFromFixture(Order::class, "payablecart");
263
        $body = $order->setBodyDeliveryMethodAndDeliveryName($body, $order, $defaults->shipping_modifier_class_name);
264
        $result = implode('|', array_values($body));
265
        $this->assertSame(
266
            $result,
267
            'Freight|Freight',
268
            'Set BodyDeliveryMethodAndDeliveryName'
269
        );
270
    }
271
272
    /**
273
     * JSON data for test
274
     *
275
     * @link (Unleashed Software API Documentation, https://apidocs.unleashedsoftware.com/Products)
276
     * @var string
277
     */
278
    protected $jsondata = '[
279
        {
280
          "Pagination": {
281
            "NumberOfItems": 2,
282
            "PageSize": 200,
283
            "PageNumber": 1,
284
            "NumberOfPages": 1
285
          },
286
          "Items": [
287
            {
288
              "SalesOrderLines": [
289
                {
290
                  "LineNumber": 1,
291
                  "LineType": null,
292
                  "Product": {
293
                    "Guid": "G11",
294
                    "ProductCode": "IIID1",
295
                    "ProductDescription": "Socks"
296
                  },
297
                  "DueDate": "/Date(1473099415000)/",
298
                  "OrderQuantity": 1,
299
                  "UnitPrice": 8,
300
                  "DiscountRate": 0,
301
                  "LineTotal": 8,
302
                  "Volume": null,
303
                  "Weight": null,
304
                  "Comments": null,
305
                  "AverageLandedPriceAtTimeOfSale": 8,
306
                  "TaxRate": 0,
307
                  "LineTax": 0,
308
                  "XeroTaxCode": "G.S.T.",
309
                  "BCUnitPrice": 8,
310
                  "BCLineTotal": 8,
311
                  "BCLineTax": 0,
312
                  "LineTaxCode": "G.S.T.",
313
                  "XeroSalesAccount": null,
314
                  "SerialNumbers": null,
315
                  "BatchNumbers": null,
316
                  "Guid": "G401",
317
                  "LastModifiedOn": "/Date(1473149768263)/"
318
                },
319
                {
320
                  "LineNumber": 2,
321
                  "LineType": null,
322
                  "Product": {
323
                    "Guid": "G15",
324
                    "ProductCode": "IIID5",
325
                    "ProductDescription": "Mp3 Player"
326
                  },
327
                  "DueDate": "/Date(1473099415000)/",
328
                  "OrderQuantity": 2,
329
                  "UnitPrice": 200,
330
                  "DiscountRate": 0,
331
                  "LineTotal": 400,
332
                  "Volume": null,
333
                  "Weight": null,
334
                  "Comments": null,
335
                  "AverageLandedPriceAtTimeOfSale": 200,
336
                  "TaxRate": 0,
337
                  "LineTax": 0,
338
                  "XeroTaxCode": "G.S.T.",
339
                  "BCUnitPrice": 200,
340
                  "BCLineTotal": 400,
341
                  "BCLineTax": 0,
342
                  "LineTaxCode": "G.S.T.",
343
                  "XeroSalesAccount": null,
344
                  "SerialNumbers": null,
345
                  "BatchNumbers": null,
346
                  "Guid": "G402",
347
                  "LastModifiedOn": "/Date(1473149768279)/"
348
                }
349
              ],
350
              "OrderNumber": "O1",
351
              "OrderDate": "/Date(1473116400000)/",
352
              "RequiredDate": "/Date(1473548400000)/",
353
              "OrderStatus": "Placed",
354
              "Customer": {
355
                "CustomerCode": "Jeremy Peremy",
356
                "CustomerName": "Jeremy Peremy",
357
                "CurrencyId": 110,
358
                "Guid": "test",
359
                "LastModifiedOn": "/Date(1472624588017)/"
360
              },
361
              "CustomerRef": null,
362
              "Comments": "Test",
363
              "Warehouse": {
364
                "WarehouseCode": "test",
365
                "WarehouseName": "Queen St",
366
                "IsDefault": true,
367
                "StreetNo": "1",
368
                "AddressLine1": "Queen St",
369
                "AddressLine2": null,
370
                "City": "Invercargill",
371
                "Region": "Southland",
372
                "Country": "New Zealand",
373
                "PostCode": "9999",
374
                "PhoneNumber": "1234 567",
375
                "FaxNumber": null,
376
                "MobileNumber": null,
377
                "DDINumber": null,
378
                "ContactName": "Ed Hillary",
379
                "Obsolete": false,
380
                "Guid": "test",
381
                "LastModifiedOn": "/Date(1471582972964)/"
382
              },
383
              "ReceivedDate": "/Date(1473099415000)/",
384
              "DeliveryName": null,
385
              "DeliveryStreetAddress": "15 Ray St",
386
              "DeliverySuburb": "",
387
              "DeliveryCity": "Kaitaia",
388
              "DeliveryRegion": "Northland",
389
              "DeliveryCountry": "New Zealand",
390
              "DeliveryPostCode": "1111",
391
              "Currency": {
392
                "CurrencyCode": "NZD",
393
                "Description": "New Zealand, Dollars",
394
                "Guid": "test",
395
                "LastModifiedOn": "/Date(1415058050647)/"
396
              },
397
              "ExchangeRate": 1,
398
              "DiscountRate": 0,
399
              "Tax": {
400
                "TaxCode": "G.S.T.",
401
                "Description": null,
402
                "TaxRate": 0,
403
                "CanApplyToExpenses": false,
404
                "CanApplyToRevenue": false,
405
                "Obsolete": false,
406
                "Guid": "00000000-0000-0000-0000-000000000000",
407
                "LastModifiedOn": null
408
              },
409
              "TaxRate": 0,
410
              "XeroTaxCode": "G.S.T.",
411
              "SubTotal": 408,
412
              "TaxTotal": 0,
413
              "Total": 408,
414
              "TotalVolume": 0,
415
              "TotalWeight": 0,
416
              "BCSubTotal": 408,
417
              "BCTaxTotal": 0,
418
              "BCTotal": 408,
419
              "PaymentDueDate": "/Date(1473106568169)/",
420
              "SalesOrderGroup": null,
421
              "DeliveryMethod": null,
422
              "SalesPerson": null,
423
              "SendAccountingJournalOnly": false,
424
              "SourceId": "web",
425
              "CreatedBy": "[email protected]",
426
              "Guid": "G201",
427
              "LastModifiedOn": "/Date(1473149768310)/"
428
            },
429
            {
430
              "SalesOrderLines": [
431
                {
432
                  "LineNumber": 1,
433
                  "LineType": null,
434
                  "Product": {
435
                    "Guid": "G11",
436
                    "ProductCode": "IIID1",
437
                    "ProductDescription": "Socks"
438
                  },
439
                  "DueDate": "/Date(1473099415000)/",
440
                  "OrderQuantity": 1,
441
                  "UnitPrice": 8,
442
                  "DiscountRate": 0,
443
                  "LineTotal": 8,
444
                  "Volume": null,
445
                  "Weight": null,
446
                  "Comments": null,
447
                  "AverageLandedPriceAtTimeOfSale": 8,
448
                  "TaxRate": 0,
449
                  "LineTax": 0,
450
                  "XeroTaxCode": "G.S.T.",
451
                  "BCUnitPrice": 8,
452
                  "BCLineTotal": 8,
453
                  "BCLineTax": 0,
454
                  "LineTaxCode": "G.S.T.",
455
                  "XeroSalesAccount": null,
456
                  "SerialNumbers": null,
457
                  "BatchNumbers": null,
458
                  "Guid": "G403",
459
                  "LastModifiedOn": "/Date(1473149768263)/"
460
                },
461
                {
462
                  "LineNumber": 2,
463
                  "LineType": null,
464
                  "Product": {
465
                    "Guid": "G15",
466
                    "ProductCode": "IIID5",
467
                    "ProductDescription": "Mp3 Player"
468
                  },
469
                  "DueDate": "/Date(1473099415000)/",
470
                  "OrderQuantity": 2,
471
                  "UnitPrice": 200,
472
                  "DiscountRate": 0,
473
                  "LineTotal": 400,
474
                  "Volume": null,
475
                  "Weight": null,
476
                  "Comments": null,
477
                  "AverageLandedPriceAtTimeOfSale": 200,
478
                  "TaxRate": 0,
479
                  "LineTax": 0,
480
                  "XeroTaxCode": "G.S.T.",
481
                  "BCUnitPrice": 200,
482
                  "BCLineTotal": 400,
483
                  "BCLineTax": 0,
484
                  "LineTaxCode": "G.S.T.",
485
                  "XeroSalesAccount": null,
486
                  "SerialNumbers": null,
487
                  "BatchNumbers": null,
488
                  "Guid": "G404",
489
                  "LastModifiedOn": "/Date(1473149768279)/"
490
                }
491
              ],
492
              "OrderNumber": "O2",
493
              "OrderDate": "/Date(1473116400000)/",
494
              "RequiredDate": "/Date(1473548400000)/",
495
              "OrderStatus": "Dispatched",
496
              "Customer": {
497
                "CustomerCode": "Jeremy Peremy",
498
                "CustomerName": "Jeremy Peremy",
499
                "CurrencyId": 110,
500
                "Guid": "test",
501
                "LastModifiedOn": "/Date(1472624588017)/"
502
              },
503
              "CustomerRef": null,
504
              "Comments": "Test",
505
              "Warehouse": {
506
                "WarehouseCode": "test",
507
                "WarehouseName": "Queen St",
508
                "IsDefault": true,
509
                "StreetNo": "1",
510
                "AddressLine1": "Queen St",
511
                "AddressLine2": null,
512
                "City": "Invercargill",
513
                "Region": "Southland",
514
                "Country": "New Zealand",
515
                "PostCode": "9999",
516
                "PhoneNumber": "1234 567",
517
                "FaxNumber": null,
518
                "MobileNumber": null,
519
                "DDINumber": null,
520
                "ContactName": "Ed Hillary",
521
                "Obsolete": false,
522
                "Guid": "test",
523
                "LastModifiedOn": "/Date(1471582972964)/"
524
              },
525
              "ReceivedDate": "/Date(1473099415000)/",
526
              "DeliveryName": null,
527
              "DeliveryStreetAddress": "15 Ray St",
528
              "DeliverySuburb": "",
529
              "DeliveryCity": "Kaitaia",
530
              "DeliveryRegion": "Northland",
531
              "DeliveryCountry": "New Zealand",
532
              "DeliveryPostCode": "1111",
533
              "Currency": {
534
                "CurrencyCode": "NZD",
535
                "Description": "New Zealand, Dollars",
536
                "Guid": "test",
537
                "LastModifiedOn": "/Date(1415058050647)/"
538
              },
539
              "ExchangeRate": 1,
540
              "DiscountRate": 0,
541
              "Tax": {
542
                "TaxCode": "G.S.T.",
543
                "Description": null,
544
                "TaxRate": 0,
545
                "CanApplyToExpenses": false,
546
                "CanApplyToRevenue": false,
547
                "Obsolete": false,
548
                "Guid": "00000000-0000-0000-0000-000000000000",
549
                "LastModifiedOn": null
550
              },
551
              "TaxRate": 0,
552
              "XeroTaxCode": "G.S.T.",
553
              "SubTotal": 408,
554
              "TaxTotal": 0,
555
              "Total": 408,
556
              "TotalVolume": 0,
557
              "TotalWeight": 0,
558
              "BCSubTotal": 408,
559
              "BCTaxTotal": 0,
560
              "BCTotal": 408,
561
              "PaymentDueDate": "/Date(1473106568169)/",
562
              "SalesOrderGroup": null,
563
              "DeliveryMethod": null,
564
              "SalesPerson": null,
565
              "SendAccountingJournalOnly": false,
566
              "SourceId": "web",
567
              "CreatedBy": "[email protected]",
568
              "Guid": "G202",
569
              "LastModifiedOn": "/Date(1473149768310)/"
570
            }
571
          ]
572
        }
573
      ]';
574
}
575