examples/AdWords/v201809/Extensions/AddPrices.php
private static function createPriceTableRow(
        $header,
        $description,
        $finalUrl,
        $priceInMicros,
        $currencyCode,
        $priceUnit,
        $finalMobileUrl = null
    ) {
        $priceTableRow = new PriceTableRow();
        $priceTableRow->setHeader($header);
        $priceTableRow->setDescription($description);
        $priceTableRow->setFinalUrls(new UrlList([$finalUrl]));
        $money = new Money();
        $money->setMicroAmount($priceInMicros);
        $moneyWithCurrency = new MoneyWithCurrency();
        $moneyWithCurrency->setMoney($money);
        $moneyWithCurrency->setCurrencyCode($currencyCode);
        $priceTableRow->setPrice($moneyWithCurrency);
        $priceTableRow->setPriceUnit($priceUnit);

        if ($finalMobileUrl !== null) {
            $priceTableRow->setFinalMobileUrls(new UrlList([$finalMobileUrl]));
        }

        return $priceTableRow;
    }
private static function createPriceTableRow(
        $header,
        $description,
        $finalUrl,
        $priceInMicros,
        $currencyCode,
        $priceUnit,
        $finalMobileUrl = null
    ) {
        $priceTableRow = new PriceTableRow();
        $priceTableRow->setHeader($header);
        $priceTableRow->setDescription($description);
        $priceTableRow->setFinalUrls(new UrlList([$finalUrl]));
        $money = new Money();
        $money->setMicroAmount($priceInMicros);
        $moneyWithCurrency = new MoneyWithCurrency();
        $moneyWithCurrency->setMoney($money);
        $moneyWithCurrency->setCurrencyCode($currencyCode);
        $priceTableRow->setPrice($moneyWithCurrency);
        $priceTableRow->setPriceUnit($priceUnit);

        if ($finalMobileUrl !== null) {
            $priceTableRow->setFinalMobileUrls(new UrlList([$finalMobileUrl]));
        }

        return $priceTableRow;
    }
private static function createPriceTableRow ( $ header , $ description , $ finalUrl , $ priceInMicros , $ currencyCode , $ priceUnit , $ finalMobileUrl = null ) { $ priceTableRow = new PriceTableRow ( ) ; $ priceTableRow -> setHeader ( $ header ) ; $ priceTableRow -> setDescription ( $ description ) ; $ priceTableRow -> setFinalUrls ( new UrlList ( [ $ finalUrl ] ) ) ; $ money = new Money ( ) ; $ money -> setMicroAmount ( $ priceInMicros ) ; $ moneyWithCurrency = new MoneyWithCurrency ( ) ; $ moneyWithCurrency -> setMoney ( $ money ) ; $ moneyWithCurrency -> setCurrencyCode ( $ currencyCode ) ; $ priceTableRow -> setPrice ( $ moneyWithCurrency ) ; $ priceTableRow -> setPriceUnit ( $ priceUnit ) ; if ( $ finalMobileUrl !== null ) { $ priceTableRow -> setFinalMobileUrls ( new UrlList ( [ $ finalMobileUrl ] ) ) ; } return $ priceTableRow ; }
Creates a new price table row with the specified attributes.

@param string $header the header of price table row
@param string $description the description of price table row
@param string $finalUrl the final URL of price table row
@param integer $priceInMicros the price in micro amount
@param string $currencyCode the 3-character currency code
@param string $priceUnit the unit of shown price
@param string|null $finalMobileUrl the mobile final URL of price table row
@return PriceTableRow the created price table row
Creates a new price table row with the specified attributes .