Return the voucher

@param array $options
@return float the current balance
497462
public static function balance(array $options = array())
    {
        $api = new Api\Balance();

        if (isset($options['cardNumber'])) {
            $api->setCardNumber($options['cardNumber']);
        }
        if (isset($options['pincode'])) {
            $api->setPincode($options['pincode']);
        }
        $result = $api->doRequest();

        return $result['balance'] / 100;
    }
1166764
public function getFVoucherDiscountValue()
    {
        if ($oVoucherDiscount = $this->getVoucherDiscount()) {
            if ($oVoucherDiscount->getBruttoPrice()) {
                return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($oVoucherDiscount->getBruttoPrice(), $this->getBasketCurrency());
            }
        }

        return false;
    }
1041264
public function getPk($options = '')
    {
        if (!empty($this->pk)) {
            $pk = $this->pk;
        } else {
            $pk = $this->connection->getPk(is_array($options) && isset($options['table']) ? $options['table'] : $this->getTable());
        }

        return $pk;
    }
1057675
public function get(array $options = [])
    {
        $pagination = '';

        if (isset($options['page']) && is_int($options['page'])) {
            $pagination = '?page='.$options['page'];
        }

        if (isset($options['key'])) {
            return $this->client->get('plugin-licenses/'.$options['key'].$pagination);
        }

        return $this->client->get('plugin-licenses'.$pagination);
    }
929924
public function getClient(array $options = [])
    {
        if ($this->client) {
            return $this->client;
        }

        $this->client = new Client(
            [
                'base_url' => $this->baseUrl,
                'defaults' => [
                    'headers' => [
                        'Authorization' => 'Bearer ' . $this->accessToken,
                    ]
                ]
            ]
        );

        return $this->client;
    }
1312317
public function getVoucherList()
    {
        $oVoucherList = oxNew(\OxidEsales\Eshop\Application\Model\VoucherList::class);
        $sSelect = 'select * from oxvouchers where oxvoucherserieid = ' . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($this->getId());
        $oVoucherList->selectString($sSelect);

        return $oVoucherList;
    }
103850
protected function getMigrationsForRollback(array $options)
    {
        if (($steps = $options['step'] ?? 0) > 0) {
            return $this->repository->getMigrations($steps);
        }

        return $this->repository->getLast();
    }
1247212
public function GetBasketQuantityForVoucher(TdbShopVoucher &$oVoucher)
    {
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();
        $iAmount = 0;
        while ($oItem = &$this->Next()) {
            $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem);
            if ($bIncludeProduct) {
                $iAmount = $iAmount + $oItem->dAmount;
            }
        }
        $this->setItemPointer($iCurrentPosition);

        return $iAmount;
    }
416855
public function report(array $options)
    {
        $pay = new Order($this->config->get());
        return $pay->report($options);
    }
147535
protected function secure(array $options)
    {
        $option = $options[self::OPTION_SECURE];

        if (is_array($option))
        {
            $key = $this->helper()->json()->encode($option);

            if (!isset($this->secure[$key]))
            {
                $secure = new Secure();

                if (isset($option[self::SECURE_ALGORITHM]))
                {
                    $secure->algorithm($option[self::SECURE_ALGORITHM]);
                }

                if (isset($option[self::SECURE_SECRET]))
                {
                    $secure->secret($option[self::SECURE_SECRET]);
                }

                if (isset($option[self::SECURE_IV]))
                {
                    $secure->iv($option[self::SECURE_IV]);
                }

                $this->secure[$key] = $secure;
            }

            return $this->secure[$key];
        }

        if (!$this->secureDefault)
        {
            $this->secureDefault = new SecureDefault();
        }

        return $this->secureDefault;
    }
424754
public function getSimpleVoucher()
    {
        $oVoucher = new stdClass();
        $oVoucher->sVoucherId = $this->getId();
        $oVoucher->sVoucherNr = null;
        if ($this->oxvouchers__oxvouchernr) {
            $oVoucher->sVoucherNr = $this->oxvouchers__oxvouchernr->value;
        }

        // R. set in oxBasket : $oVoucher->fVoucherdiscount = \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency( $this->oxvouchers__oxdiscount->value );

        return $oVoucher;
    }
1052645
protected function GetVoucherSeriesOriginalValue()
    {
        $oVoucherSeries = &$this->GetFieldShopVoucherSeries();
        $dValue = $oVoucherSeries->fieldValue;
        if ('absolut' == $oVoucherSeries->fieldValueType) {
            $oCurrency = TdbPkgShopCurrency::GetBaseCurrency();
            $oActive = TdbPkgShopCurrency::GetActiveInstance();
            if ($oCurrency && $oActive && $oActive->id != $oCurrency->id) {
                $dValue = round($oCurrency->Convert($dValue, $oActive), 2);
            }
        }

        return $dValue;
    }
309119
private function prepareOptions($options)
    {
        $opts = array_change_key_case($options, CASE_UPPER);
        $finalizedOpts = array();

        if (isset($opts['WEIGHTS']) && is_array($opts['WEIGHTS'])) {
            $finalizedOpts[] = 'WEIGHTS';

            foreach ($opts['WEIGHTS'] as $weight) {
                $finalizedOpts[] = $weight;
            }
        }

        if (isset($opts['AGGREGATE'])) {
            $finalizedOpts[] = 'AGGREGATE';
            $finalizedOpts[] = $opts['AGGREGATE'];
        }

        return $finalizedOpts;
    }
925843
public function getDiscountSumPayPalBasket()
    {
        // collect discounts
        $discount = 0.0;

        $totalDiscount = $this->getTotalDiscount();

        if ($totalDiscount) {
            $discount += $totalDiscount->getBruttoPrice();
        }

        //if payment costs are negative, adding them to discount
        if (($costs = $this->getPaymentCosts()) < 0) {
            $discount += ($costs * -1);
        }

        // vouchers..
        $vouchers = (array) $this->getVouchers();
        foreach ($vouchers as $voucher) {
            $discount += round($voucher->dVoucherdiscount, 2);
        }

        return $discount;
    }
554493
public function getUcpaas(array $options = [])
    {
        if (!$this->ucpaas) {
            $this->ucpaas = new \Ucpaas($options);
        }

        return $this->ucpaas;
    }
1180383
public function foreignCurrencies($options = []) {
		$defaults = ['conditions' => [$this->getAlias() . '.base' => 0]];
		$options = Hash::merge($defaults, $options);
		return $this->find('all', $options);
	}
978170
public function bitGet($name, array $options)
  {
    $arr = array();

    foreach ($options as $b) {
      if ($this->bitCheck($name, $b)) {
        $arr[] = $b;
      }
    }

    return $arr;
  }