Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| StripeCustomerData | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Domain\Stripe\Data; |
| 6 | |
| 7 | /** |
| 8 | * Domain representation of a Stripe Customer. |
| 9 | * |
| 10 | * Insulates callers from the wire-format \Stripe\Customer object so swapping |
| 11 | * the SDK or migrating to a different processor doesn't ripple through |
| 12 | * domain code. Only the fields FlowState actually uses are exposed. |
| 13 | */ |
| 14 | final readonly class StripeCustomerData |
| 15 | { |
| 16 | public function __construct( |
| 17 | public string $id, |
| 18 | public ?string $email, |
| 19 | public ?string $name, |
| 20 | public int $createdAt, |
| 21 | ) {} |
| 22 | } |