private function listPrepaidBalances(\DateTimeImmutable $billingMonth, ?string $currencyCode = null): array
    {
        $query_params = [
            'billingMonth' => strtoupper($billingMonth->format('F')),
            'billingYear' => $billingMonth->format('Y'),
        ];
        if (null !== $currencyCode) {
            $query_params['supportedCurrencyId'] = $currencyCode;
        }

        $balances = [];
        foreach ($this->getRawList($this->getPrepaidBalanceEndpoint()->withQuery(http_build_query($query_params))) as $item) {
            /** @var \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface $balance */
            $balance = $this->prepaidBalanceSerializer->denormalize($item, $this->prepaidBalanceClass);
            $balances[$balance->id()] = $balance;
        }

        return $balances;
    }
private function listPrepaidBalances(\DateTimeImmutable $billingMonth, ?string $currencyCode = null): array
    {
        $query_params = [
            'billingMonth' => strtoupper($billingMonth->format('F')),
            'billingYear' => $billingMonth->format('Y'),
        ];
        if (null !== $currencyCode) {
            $query_params['supportedCurrencyId'] = $currencyCode;
        }

        $balances = [];
        foreach ($this->getRawList($this->getPrepaidBalanceEndpoint()->withQuery(http_build_query($query_params))) as $item) {
            /** @var \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface $balance */
            $balance = $this->prepaidBalanceSerializer->denormalize($item, $this->prepaidBalanceClass);
            $balances[$balance->id()] = $balance;
        }

        return $balances;
    }
private function listPrepaidBalances ( \ DateTimeImmutable $ billingMonth , ? string $ currencyCode = null ) : array { $ query_params = [ 'billingMonth' => strtoupper ( $ billingMonth -> format ( 'F' ) ) , 'billingYear' => $ billingMonth -> format ( 'Y' ) , ] ; if ( null !== $ currencyCode ) { $ query_params [ 'supportedCurrencyId' ] = $ currencyCode ; } $ balances = [ ] ; foreach ( $ this -> getRawList ( $ this -> getPrepaidBalanceEndpoint ( ) -> withQuery ( http_build_query ( $ query_params ) ) ) as $ item ) { /** @var \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface $balance */ $ balance = $ this -> prepaidBalanceSerializer -> denormalize ( $ item , $ this -> prepaidBalanceClass ) ; $ balances [ $ balance -> id ( ) ] = $ balance ; } return $ balances ; }
Helper function which returns prepaid balances..

@param \DateTimeImmutable $billingMonth
@param string|null $currencyCode

@return \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface[]

@psalm-suppress PossiblyNullArrayOffset - id() does not return null here.
Helper function which returns prepaid balances ..