*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'schedule_id' => $this->schedule_id, 'client_id' => $this->client_id, 'provider_id' => $this->provider_id, 'client_payment_method_id' => $this->client_payment_method_id, 'gateway_provider' => $this->gateway_provider, 'gateway_entity_reference' => $this->gateway_entity_reference, 'gateway_entity_label' => $this->gateway_entity_label, 'gateway_operation_reference' => $this->gateway_operation_reference, 'gateway_operation_label' => $this->gateway_operation_label, 'payment_method' => $this->payment_method, 'status' => $this->status, 'gross_amount' => $this->gross_amount, 'gateway_fee_amount' => $this->gateway_fee_amount, 'platform_fee_amount' => $this->platform_fee_amount, 'net_amount' => $this->net_amount, 'currency' => $this->currency, 'installments' => $this->installments, 'authorized_at' => $this->authorized_at?->toISOString(), 'paid_at' => $this->paid_at?->toISOString(), 'failed_at' => $this->failed_at?->toISOString(), 'cancelled_at' => $this->cancelled_at?->toISOString(), 'expires_at' => $this->expires_at?->toISOString(), 'failure_code' => $this->failure_code, 'failure_message' => $this->failure_message, 'gateway_payload' => $this->gateway_payload, 'metadata' => $this->metadata, 'created_at' => $this->created_at?->toISOString(), 'updated_at' => $this->updated_at?->toISOString(), ]; } /** * @param \Illuminate\Database\Eloquent\Collection $resource * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection */ public static function collection($resource): AnonymousResourceCollection { return parent::collection($resource); } }