public function fill($item) { parent::fill($item); $this->id = $item->getFullCode(); $this->price = 0; $this->fillStatus($item); foreach ($item->getPrices()->getValues() as $price) { $this->price += $price->getAmount(); } }
public function fill($payment) { parent::fill($payment); $this->fillStatus($payment); $this->id = $payment->getFullCode(); $this->price = $this->createObject("common.v1/Money"); $this->price->set("amount", $payment->getAmount()); $this->price->set("currency", $payment->getCurrency()->getId()); $timezone = $this->settingService->getValueOf("agit.timezone"); $created = clone $payment->getCreated(); $created->setTimezone(new DateTimeZone($timezone)); $this->created = $this->createObject("common.v1/DateTime", $created); }