99use Increase \Core \Contracts \BaseModel ;
1010use Increase \DigitalWalletTokens \DigitalWalletToken \Cardholder ;
1111use Increase \DigitalWalletTokens \DigitalWalletToken \Device ;
12+ use Increase \DigitalWalletTokens \DigitalWalletToken \DynamicPrimaryAccountNumber ;
1213use Increase \DigitalWalletTokens \DigitalWalletToken \Status ;
1314use Increase \DigitalWalletTokens \DigitalWalletToken \TokenRequestor ;
1415use Increase \DigitalWalletTokens \DigitalWalletToken \Type ;
1920 *
2021 * @phpstan-import-type CardholderShape from \Increase\DigitalWalletTokens\DigitalWalletToken\Cardholder
2122 * @phpstan-import-type DeviceShape from \Increase\DigitalWalletTokens\DigitalWalletToken\Device
23+ * @phpstan-import-type DynamicPrimaryAccountNumberShape from \Increase\DigitalWalletTokens\DigitalWalletToken\DynamicPrimaryAccountNumber
2224 * @phpstan-import-type UpdateShape from \Increase\DigitalWalletTokens\DigitalWalletToken\Update
2325 *
2426 * @phpstan-type DigitalWalletTokenShape = array{
2729 * cardholder: Cardholder|CardholderShape,
2830 * createdAt: \DateTimeInterface,
2931 * device: Device|DeviceShape,
32+ * dynamicPrimaryAccountNumber: null|DynamicPrimaryAccountNumber|DynamicPrimaryAccountNumberShape,
3033 * status: Status|value-of<Status>,
3134 * tokenRequestor: TokenRequestor|value-of<TokenRequestor>,
3235 * type: Type|value-of<Type>,
@@ -68,6 +71,12 @@ final class DigitalWalletToken implements BaseModel
6871 #[Required]
6972 public Device $ device ;
7073
74+ /**
75+ * The redacted Dynamic Primary Account Number.
76+ */
77+ #[Required('dynamic_primary_account_number ' )]
78+ public ?DynamicPrimaryAccountNumber $ dynamicPrimaryAccountNumber ;
79+
7180 /**
7281 * This indicates if payments can be made with the Digital Wallet Token.
7382 *
@@ -111,6 +120,7 @@ final class DigitalWalletToken implements BaseModel
111120 * cardholder: ...,
112121 * createdAt: ...,
113122 * device: ...,
123+ * dynamicPrimaryAccountNumber: ...,
114124 * status: ...,
115125 * tokenRequestor: ...,
116126 * type: ...,
@@ -127,6 +137,7 @@ final class DigitalWalletToken implements BaseModel
127137 * ->withCardholder(...)
128138 * ->withCreatedAt(...)
129139 * ->withDevice(...)
140+ * ->withDynamicPrimaryAccountNumber(...)
130141 * ->withStatus(...)
131142 * ->withTokenRequestor(...)
132143 * ->withType(...)
@@ -145,6 +156,7 @@ public function __construct()
145156 *
146157 * @param Cardholder|CardholderShape $cardholder
147158 * @param Device|DeviceShape $device
159+ * @param DynamicPrimaryAccountNumber|DynamicPrimaryAccountNumberShape|null $dynamicPrimaryAccountNumber
148160 * @param Status|value-of<Status> $status
149161 * @param TokenRequestor|value-of<TokenRequestor> $tokenRequestor
150162 * @param Type|value-of<Type> $type
@@ -156,6 +168,7 @@ public static function with(
156168 Cardholder |array $ cardholder ,
157169 \DateTimeInterface $ createdAt ,
158170 Device |array $ device ,
171+ DynamicPrimaryAccountNumber |array |null $ dynamicPrimaryAccountNumber ,
159172 Status |string $ status ,
160173 TokenRequestor |string $ tokenRequestor ,
161174 Type |string $ type ,
@@ -168,6 +181,7 @@ public static function with(
168181 $ self ['cardholder ' ] = $ cardholder ;
169182 $ self ['createdAt ' ] = $ createdAt ;
170183 $ self ['device ' ] = $ device ;
184+ $ self ['dynamicPrimaryAccountNumber ' ] = $ dynamicPrimaryAccountNumber ;
171185 $ self ['status ' ] = $ status ;
172186 $ self ['tokenRequestor ' ] = $ tokenRequestor ;
173187 $ self ['type ' ] = $ type ;
@@ -235,6 +249,20 @@ public function withDevice(Device|array $device): self
235249 return $ self ;
236250 }
237251
252+ /**
253+ * The redacted Dynamic Primary Account Number.
254+ *
255+ * @param DynamicPrimaryAccountNumber|DynamicPrimaryAccountNumberShape|null $dynamicPrimaryAccountNumber
256+ */
257+ public function withDynamicPrimaryAccountNumber (
258+ DynamicPrimaryAccountNumber |array |null $ dynamicPrimaryAccountNumber
259+ ): self {
260+ $ self = clone $ this ;
261+ $ self ['dynamicPrimaryAccountNumber ' ] = $ dynamicPrimaryAccountNumber ;
262+
263+ return $ self ;
264+ }
265+
238266 /**
239267 * This indicates if payments can be made with the Digital Wallet Token.
240268 *
0 commit comments