Skip to content

Commit 9f08335

Browse files
committed
Add more properties to service point
1 parent 8820000 commit 9f08335

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Setono\PostNord\Response\ServicePoints;
6+
7+
final class Address
8+
{
9+
public function __construct(
10+
public readonly string $streetName,
11+
public readonly string $streetNumber,
12+
public readonly string $postalCode,
13+
public readonly string $city,
14+
public readonly string $countryCode,
15+
public readonly ?string $additionalDescription,
16+
) {
17+
}
18+
}

src/Response/ServicePoints/ServicePoint.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
final class ServicePoint
88
{
9-
public function __construct(public readonly string $name)
10-
{
9+
public function __construct(
10+
public readonly string $name,
11+
public readonly string $servicePointId,
12+
public readonly int $routeDistance,
13+
public readonly Address $visitingAddress,
14+
) {
1115
}
1216
}

0 commit comments

Comments
 (0)