Helper/Discount.php
public function getAmastyGiftCardCodesCurrentValue($giftCardCodes)
    {
        $data = $this->amastyAccountCollection
            ->getInstance()
            ->joinCode()
            ->addFieldToFilter('gift_code', ['in'=>$giftCardCodes])
            ->getData();

        return array_sum(array_column($data, 'current_value'));
    }
public function getAmastyGiftCardCodesCurrentValue($giftCardCodes)
    {
        $data = $this->amastyAccountCollection
            ->getInstance()
            ->joinCode()
            ->addFieldToFilter('gift_code', ['in'=>$giftCardCodes])
            ->getData();

        return array_sum(array_column($data, 'current_value'));
    }
public function getAmastyGiftCardCodesCurrentValue ( $ giftCardCodes ) { $ data = $ this -> amastyAccountCollection -> getInstance ( ) -> joinCode ( ) -> addFieldToFilter ( 'gift_code' , [ 'in' => $ giftCardCodes ] ) -> getData ( ) ; return array_sum ( array_column ( $ data , 'current_value' ) ) ; }
Get accumulated unused balance of all Amasty Gift Cards corresponding to passed gift card coupons array

@param array $giftCardCodes
@return float|int|mixed
Get accumulated unused balance of all Amasty Gift Cards corresponding to passed gift card coupons array