Skip to content

Commit

Permalink
PaymentToken + PCard
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielen committed Jan 29, 2025
1 parent eeb2da4 commit d6dd0bd
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/CXml/Model/PCard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

namespace CXml\Model;

use CXml\Model\ExtrinsicsTrait;
use CXml\Model\IdReferencesTrait;
use CXml\Model\PaymentInterface;
use JMS\Serializer\Annotation as Serializer;

readonly class PCard implements PaymentInterface
{

public function __construct(
#[Serializer\XmlAttribute]
public string $number,
#[Serializer\XmlAttribute]
public string $expiration,
#[Serializer\XmlAttribute]
public ?string $name = null,
#[Serializer\SerializedName('PostalAddress')]
public ?PostalAddress $postalAddress = null,
) {}

}
26 changes: 26 additions & 0 deletions src/CXml/Model/PaymentToken.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

namespace CXml\Model;

use CXml\Model\ExtrinsicsTrait;
use CXml\Model\IdReferencesTrait;
use CXml\Model\PaymentInterface;
use JMS\Serializer\Annotation as Serializer;

readonly class PaymentToken implements PaymentInterface
{

public function __construct(
#[Serializer\XmlAttribute]
public string $number,
#[Serializer\XmlAttribute]
public string $expiration,
#[Serializer\XmlAttribute]
public ?string $name,
#[Serializer\XmlAttribute]
public string $token,
) {}

}

0 comments on commit d6dd0bd

Please sign in to comment.