id = (int)$subscriptionNoteQueryObject->id; $self->content = $subscriptionNoteQueryObject->content; $self->subscriptionId = (int)$subscriptionNoteQueryObject->subscriptionId; $self->type = $subscriptionNoteQueryObject->type ? new SubscriptionNoteType($subscriptionNoteQueryObject->type) : SubscriptionNoteType::ADMIN(); $self->createdAt = Temporal::toDateTime($subscriptionNoteQueryObject->createdAt); return $self; } /** * Convert DTO to Subscription Note * * @since 4.8.0 */ public function toSubscriptionNote(): SubscriptionNote { $attributes = get_object_vars($this); return new SubscriptionNote($attributes); } }