Intercom\IntercomTags::tag PHP Method

tag() public method

Creates a Tag.
See also: https://developers.intercom.io/reference#create-and-update-tags
public tag ( array $options ) : mixed
$options array
return mixed
    public function tag($options)
    {
        return $this->client->post("tags", $options);
    }

Usage Example

 public function testTagUsers()
 {
     $stub = $this->getMockBuilder('Intercom\\IntercomClient')->disableOriginalConstructor()->getMock();
     $stub->method('post')->willReturn('foo');
     $tags = new IntercomTags($stub);
     $this->assertEquals('foo', $tags->tag([]));
 }