persons = $persons; } /** * @return Id */ public function getAppointmentId() { return $this->appointmentId; } /** * @param Id $appointmentId */ public function setAppointmentId(Id $appointmentId) { $this->appointmentId = $appointmentId; } /** * @return IntegerValue */ public function getPersons() { return $this->persons; } /** * @param IntegerValue $persons */ public function setPersons(IntegerValue $persons) { $this->persons = $persons; } /** * @return Collection */ public function getPayments() { return $this->payments; } /** * @param Collection $payments */ public function setPayments(Collection $payments) { $this->payments = $payments; } /** * @return Token */ public function getToken() { return $this->token; } /** * @param Token $token */ public function setToken(Token $token) { $this->token = $token; } /** * @return IntegerValue */ public function getUtcOffset() { return $this->utcOffset; } /** * @param IntegerValue $utcOffset */ public function setUtcOffset(IntegerValue $utcOffset) { $this->utcOffset = $utcOffset; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'appointmentId' => null !== $this->getAppointmentId() ? $this->getAppointmentId()->getValue() : null, 'persons' => $this->getPersons()->getValue(), 'token' => $this->getToken() ? $this->getToken()->getValue() : null, 'payments' => null !== $this->getPayments() ? $this->getPayments()->toArray() : null, 'utcOffset' => null !== $this->getUtcOffset() ? $this->getUtcOffset()->getValue() : null, ] ); } }