From d07ec14b1f401974d90e69e48e7b94b8de502fbe Mon Sep 17 00:00:00 2001 From: Matteo Bertoldi Date: Thu, 16 May 2024 12:39:11 +0200 Subject: [PATCH] valore nullable saldo contabile --- src/Models/Balance.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Balance.php b/src/Models/Balance.php index 0354f4a..308d145 100644 --- a/src/Models/Balance.php +++ b/src/Models/Balance.php @@ -16,7 +16,7 @@ class Balance extends GenericModel { private $AvailableBalance; /** - * @var float + * @var float|null */ private $AccountingBalance; @@ -36,7 +36,7 @@ protected function hydrateData( stdClass $data ) { $this->Currency = is_null( $payload->currency ) ? null : (string)$payload->currency; $this->AvailableBalance = is_null( $payload->availableBalance ) ? null : (float)$payload->availableBalance; - $this->AccountingBalance = (float)$payload->accountingBalance; + $this->AccountingBalance = is_null( $payload->accountingBalance ) ? null : (float)$payload->accountingBalance; $this->CreditLine = is_null( $payload->creditLine ) ? null : (float)$payload->creditLine; }