Skip to content

Commit

Permalink
+confirmID
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielen committed Feb 12, 2025
1 parent 7068086 commit 6b3beb1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/CXml/Model/Request/ConfirmationHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ class ConfirmationHeader
final public const TYPE_UNKNOWN = 'unknown';

public function __construct(
#[Serializer\SerializedName('type')]
#[Serializer\XmlAttribute]
public readonly string $type,
#[Serializer\XmlAttribute]
public readonly DateTimeInterface $noticeDate = new DateTime(),
#[Serializer\SerializedName('confirmID')]
#[Serializer\XmlAttribute]
public readonly ?string $confirmId = null,
) {
Assertion::inArray($type, [
self::TYPE_ACCEPT,
Expand All @@ -53,11 +55,12 @@ public function __construct(
]);
}

public static function create(string $type, DateTimeInterface $noticeDate = new DateTime()): self
public static function create(string $type, DateTimeInterface $noticeDate = new DateTime(), ?string $confirmId = null): self
{
return new self(
$type,
$noticeDate,
$confirmId,
);
}
}

0 comments on commit 6b3beb1

Please sign in to comment.