PagarmeOrderTransactionResponseData.php 802 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Data\Pagarme\Response\PagarmeOrderResponseData\PagarmeOrderChargeResponseData;
  3. final readonly class PagarmeOrderTransactionResponseData
  4. {
  5. public function __construct(
  6. public ?string $id,
  7. public ?string $status,
  8. public ?int $amount,
  9. public ?string $createdAt,
  10. public ?string $acquirerMessage,
  11. public array $gatewayResponse,
  12. ) {}
  13. public function toArray(): array
  14. {
  15. return [
  16. 'id' => $this->id,
  17. 'status' => $this->status,
  18. 'amount' => $this->amount,
  19. 'created_at' => $this->createdAt,
  20. 'acquirer_message' => $this->acquirerMessage,
  21. 'gateway_response' => $this->gatewayResponse,
  22. ];
  23. }
  24. }