printu/customerio

View on GitHub
src/Endpoint/Events.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Customerio\Endpoint;

use GuzzleHttp\Exception\GuzzleException;

class Events extends Base
{
    /**
     * Add anonymous event
     * @see http://customer.io/docs/invitation-emails.html
     * @param array $options
     * @return mixed
     * @throws GuzzleException
     */
    public function anonymous(array $options)
    {
        if (!isset($options['name'])) {
            $this->mockException('Name is required!', 'POST');
        } // @codeCoverageIgnore

        return $this->client->post("events", $options);
    }
}