setId(empty($options['id']) ? null : $options['id']); $this->setPaymentId(empty($options['payment_id']) ? null : $options['payment_id']); $this->setStatus(empty($options['status']) ? null : $options['status']); $this->setCreatedAt(empty($options['created_at']) ? null : $options['created_at']); $this->setAmount(new MonetaryAmount($options['amount']['value'], $options['amount']['currency'])); if (!empty($options['requestor'])) { $this->setRequestor($options['requestor']); } if (!empty($options['sources'])) { $this->setSources($options['sources']); } if (!empty($options['receipt_registration'])) { $this->setReceiptRegistration($options['receipt_registration']); } if (!empty($options['description'])) { $this->setDescription($options['description']); } } }