public function createTicket(Ticket $ticket, $author, $authorEmail)
    {
        if (filter_var($authorEmail, FILTER_VALIDATE_EMAIL) === false)
        {
            throw new InvalidArgumentException($authorEmail . " is not a valid email address.");
        }

        $result = $this->httpHelper->post("/tickets", [
            'subject' => $ticket->getSubject(),
            'type' => 'public',
            'inbound_email_account_id' => $ticket->getInboundEmailAccountID(),
            'ticket_group_id' => $ticket->getTicketGroupID(),
            'user_id' => $ticket->getUserID(),
            'assignee' => 'accounts',
            'assignee_id' => $ticket->getAccountID(),
            'email_address' => $ticket->getEmailAddress(),
            'priority' => $ticket->getPriority(),
            'comment' => "Created via the customer portal framework.",
        ]);

        $this->httpHelper->post("/tickets/" . $result->id . "/ticket_replies", [
            'text' => $ticket->getDescription(),
            'incoming' => true,
            'author' => $author,
            'author_email' => $authorEmail,
        ]);

        return $result;
    }