Skip to content

Commit d6dd0bd

Browse files
committed
PaymentToken + PCard
1 parent eeb2da4 commit d6dd0bd

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

src/CXml/Model/PCard.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace CXml\Model;
6+
7+
use CXml\Model\ExtrinsicsTrait;
8+
use CXml\Model\IdReferencesTrait;
9+
use CXml\Model\PaymentInterface;
10+
use JMS\Serializer\Annotation as Serializer;
11+
12+
readonly class PCard implements PaymentInterface
13+
{
14+
15+
public function __construct(
16+
#[Serializer\XmlAttribute]
17+
public string $number,
18+
#[Serializer\XmlAttribute]
19+
public string $expiration,
20+
#[Serializer\XmlAttribute]
21+
public ?string $name = null,
22+
#[Serializer\SerializedName('PostalAddress')]
23+
public ?PostalAddress $postalAddress = null,
24+
) {}
25+
26+
}

src/CXml/Model/PaymentToken.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace CXml\Model;
6+
7+
use CXml\Model\ExtrinsicsTrait;
8+
use CXml\Model\IdReferencesTrait;
9+
use CXml\Model\PaymentInterface;
10+
use JMS\Serializer\Annotation as Serializer;
11+
12+
readonly class PaymentToken implements PaymentInterface
13+
{
14+
15+
public function __construct(
16+
#[Serializer\XmlAttribute]
17+
public string $number,
18+
#[Serializer\XmlAttribute]
19+
public string $expiration,
20+
#[Serializer\XmlAttribute]
21+
public ?string $name,
22+
#[Serializer\XmlAttribute]
23+
public string $token,
24+
) {}
25+
26+
}

0 commit comments

Comments
 (0)