public static function create(int $amount, int $avance, string $b2bGroupId, CurrencyInterface $currency, int $specialOfferPrice, int $unitPrice): PriceInterface
    {
        $specialOfferPrice = new Money($specialOfferPrice, new \Money\Currency($currency->getIsoCodeAlpha()));
        $unitPrice = new Money($unitPrice, new \Money\Currency($currency->getIsoCodeAlpha()));

        $price = new self();
        $price
            ->setAmount($amount)
            ->setAvance($avance)
            ->setB2bGroupId($b2bGroupId)
            ->setCurrency($currency)
            ->setSpecialOfferPrice($specialOfferPrice)
            ->setUnitPrice($unitPrice)
        ;

        return $price;
    }
public static function create(int $amount, int $avance, string $b2bGroupId, CurrencyInterface $currency, int $specialOfferPrice, int $unitPrice): PriceInterface
    {
        $specialOfferPrice = new Money($specialOfferPrice, new \Money\Currency($currency->getIsoCodeAlpha()));
        $unitPrice = new Money($unitPrice, new \Money\Currency($currency->getIsoCodeAlpha()));

        $price = new self();
        $price
            ->setAmount($amount)
            ->setAvance($avance)
            ->setB2bGroupId($b2bGroupId)
            ->setCurrency($currency)
            ->setSpecialOfferPrice($specialOfferPrice)
            ->setUnitPrice($unitPrice)
        ;

        return $price;
    }
public static function create ( int $ amount , int $ avance , string $ b2bGroupId , CurrencyInterface $ currency , int $ specialOfferPrice , int $ unitPrice ) : PriceInterface { $ specialOfferPrice = new Money ( $ specialOfferPrice , new \ Money \ Currency ( $ currency -> getIsoCodeAlpha ( ) ) ) ; $ unitPrice = new Money ( $ unitPrice , new \ Money \ Currency ( $ currency -> getIsoCodeAlpha ( ) ) ) ; $ price = new self ( ) ; $ price -> setAmount ( $ amount ) -> setAvance ( $ avance ) -> setB2bGroupId ( $ b2bGroupId ) -> setCurrency ( $ currency ) -> setSpecialOfferPrice ( $ specialOfferPrice ) -> setUnitPrice ( $ unitPrice ) ; return $ price ; }
Creates a valid Price.

@param int               $amount
@param int               $avance
@param string            $b2bGroupId
@param CurrencyInterface $currency
@param int               $specialOfferPrice In cents/ører (in danish)
@param int               $unitPrice         In cents/ører (in danish)

@return PriceInterface
Creates a valid Price .