Skip to content

Commit

Permalink
Miglioramento controlli
Browse files Browse the repository at this point in the history
  • Loading branch information
svdigital-development authored May 16, 2024
1 parent d07ec14 commit f46b6d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Models/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class Balance extends GenericModel {
protected function hydrateData( stdClass $data ) {
$payload = $data->payload;

$this->Currency = is_null( $payload->currency ) ? null : (string)$payload->currency;
$this->AvailableBalance = is_null( $payload->availableBalance ) ? null : (float)$payload->availableBalance;
$this->AccountingBalance = is_null( $payload->accountingBalance ) ? null : (float)$payload->accountingBalance;
$this->CreditLine = is_null( $payload->creditLine ) ? null : (float)$payload->creditLine;
$this->Currency = ( !isset( $payload->currency ) or empty( $payload->currency ) ) ? null : (string)$payload->currency;
$this->AvailableBalance = ( !isset( $payload->availableBalance ) or is_null( $payload->availableBalance ) ) ? null : (float)$payload->availableBalance;
$this->AccountingBalance = ( !isset( $payload->accountingBalance ) or is_null( $payload->accountingBalance ) ) ? null : (float)$payload->accountingBalance;
$this->CreditLine = ( !isset( $payload->creditLine ) or is_null( $payload->creditLine ) ) ? null : (float)$payload->creditLine;
}


Expand Down

0 comments on commit f46b6d4

Please sign in to comment.