Skip to content

Commit 8375d9f

Browse files
wip
1 parent 40b2c21 commit 8375d9f

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/StaticMappers/Orders/LineItemMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public static function map(stdClass $data): LineItem
2323
$data->price,
2424
$data->discount_amount,
2525
$data->total_amount,
26-
$data->created_at,
27-
$data->updated_at,
26+
$data->created_at ?? '',
27+
$data->updated_at ?? '',
2828
$product,
2929
$data->sub_line_items
3030
);

src/StaticMappers/Orders/OrderMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ public static function map(stdClass $data): Order
2929
return new Order(
3030
$data->uuid,
3131
$data->external_identifier,
32-
$contact,
33-
$shop,
3432
$data->currency,
3533
$data->reference ?? null,
3634
$data->status,
@@ -43,6 +41,8 @@ public static function map(stdClass $data): Order
4341
$data->paid_at ?? null,
4442
$data->created_at,
4543
$data->updated_at,
44+
$contact,
45+
$shop,
4646
$lineItems
4747
);
4848
}

src/StaticMappers/Orders/SubLineItemMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public static function map(stdClass $data): SubLineItem
2828
$data->price,
2929
$data->discount_amount,
3030
$data->total_amount,
31-
$data->created_at,
32-
$data->updated_at,
31+
$data->created_at ?? '',
32+
$data->updated_at ?? '',
3333
$lineItem,
3434
$product
3535
);

src/StaticMappers/Products/ProductMapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ public static function map(stdClass $data): Product
1717
}
1818

1919
return new Product(
20-
$data->uuid,
20+
$data->uuid ?? '',
2121
$data->external_identifier,
2222
$data->name,
23-
$data->description,
24-
$categories
23+
$data->description ?? null,
24+
$categories ?? null
2525
);
2626
}
2727
}

0 commit comments

Comments
 (0)