diff --git a/src/Model/Generated/Endpoint/ScheduleInstance.php b/src/Model/Generated/Endpoint/ScheduleInstance.php index ce6d97b1..45105d4c 100644 --- a/src/Model/Generated/Endpoint/ScheduleInstance.php +++ b/src/Model/Generated/Endpoint/ScheduleInstance.php @@ -7,6 +7,8 @@ use bunq\Model\Core\BunqModel; use bunq\Model\Generated\Object\Error; use bunq\Model\Generated\Object\ScheduleAnchorObject; +use bunq\Model\Generated\Object\ScheduleInstanceAnchorObject; +use bunq\Model\Generated\Object\ScheduleInstanceAnchorObject; /** * view for reading, updating and listing the scheduled instance. @@ -72,7 +74,7 @@ class ScheduleInstance extends BunqModel /** * The result object of this schedule instance. (Payment, PaymentBatch) * - * @var ScheduleAnchorObject + * @var ScheduleInstanceAnchorObject */ protected $resultObject; @@ -256,7 +258,7 @@ public function setScheduledObject($scheduledObject) /** * The result object of this schedule instance. (Payment, PaymentBatch) * - * @return ScheduleAnchorObject + * @return ScheduleInstanceAnchorObject */ public function getResultObject() { @@ -264,7 +266,7 @@ public function getResultObject() } /** - * @param ScheduleAnchorObject $resultObject + * @param ScheduleInstanceAnchorObject $resultObject */ public function setResultObject($resultObject) { diff --git a/src/Model/Generated/Object/ScheduleInstanceAnchorObject.php b/src/Model/Generated/Object/ScheduleInstanceAnchorObject.php new file mode 100644 index 00000000..620d799a --- /dev/null +++ b/src/Model/Generated/Object/ScheduleInstanceAnchorObject.php @@ -0,0 +1,77 @@ +payment; + } + + /** + * @param Payment $payment + */ + public function setPayment($payment) + { + $this->payment = $payment; + } + + /** + * @return PaymentBatch + */ + public function getPaymentBatch() + { + return $this->paymentBatch; + } + + /** + * @param PaymentBatch $paymentBatch + */ + public function setPaymentBatch($paymentBatch) + { + $this->paymentBatch = $paymentBatch; + } + + /** + * @return BunqModel + * @throws BunqException + */ + public function getReferencedObject() + { + if (!is_null($this->payment)) { + return $this->payment; + } + + if (!is_null($this->paymentBatch)) { + return $this->paymentBatch; + } + + throw new BunqException(self::ERROR_NULL_FIELDS); + } +}