コード例 #1
0
ファイル: RefundModel.php プロジェクト: krzysztof-gzocha/payu
 /**
  * @return int|null
  */
 public function getAmountForSerialization()
 {
     if ($this->amount instanceof MoneyInterface) {
         return $this->amount->getValueWithoutSeparation(2);
     }
     return $this->amount;
 }
コード例 #2
0
ファイル: Product.php プロジェクト: krzysztof-gzocha/payu
 /**
  * @return int
  */
 public function getUnitPriceForSerialization()
 {
     return $this->unitPrice->getValueWithoutSeparation(2);
 }
コード例 #3
0
ファイル: Money.php プロジェクト: krzysztof-gzocha/payu
 /**
  * @param MoneyInterface $money
  *
  * @return MoneyInterface
  */
 public function add(MoneyInterface $money)
 {
     return new self((double) ($this->getValue() + $money->getValue()), $this->currency, $this->precision);
 }
コード例 #4
0
ファイル: Order.php プロジェクト: krzysztof-gzocha/payu
 /**
  * @return int
  */
 public function getTotalAmountForSerialization()
 {
     return $this->totalAmount->getValueWithoutSeparation(2);
 }