public function updateTags(int $conversationId, $tags): void
    {
        if ($tags instanceof TagsCollection) {
            $tagsCollection = $tags;
        } else {
            if ($tags instanceof Collection) {
                $tagNames = [];
                foreach ($tags as $tag) {
                    $tagNames[] = $tag->getName();
                }
                $tags = $tagNames;
            }

            $tagsCollection = new TagsCollection();
            $tagsCollection->setTags($tags);
        }

        $this->restClient->updateResource(
            $tagsCollection,
            sprintf('/v2/conversations/%d/tags', $conversationId)
        );
    }
public function updateTags(int $conversationId, $tags): void
    {
        if ($tags instanceof TagsCollection) {
            $tagsCollection = $tags;
        } else {
            if ($tags instanceof Collection) {
                $tagNames = [];
                foreach ($tags as $tag) {
                    $tagNames[] = $tag->getName();
                }
                $tags = $tagNames;
            }

            $tagsCollection = new TagsCollection();
            $tagsCollection->setTags($tags);
        }

        $this->restClient->updateResource(
            $tagsCollection,
            sprintf('/v2/conversations/%d/tags', $conversationId)
        );
    }
public function updateTags ( int $ conversationId , $ tags ) : void { if ( $ tags instanceof TagsCollection ) { $ tagsCollection = $ tags ; } else { if ( $ tags instanceof Collection ) { $ tagNames = [ ] ; foreach ( $ tags as $ tag ) { $ tagNames [ ] = $ tag -> getName ( ) ; } $ tags = $ tagNames ; } $ tagsCollection = new TagsCollection ( ) ; $ tagsCollection -> setTags ( $ tags ) ; } $ this -> restClient -> updateResource ( $ tagsCollection , sprintf ( '/v2/conversations/%d/tags' , $ conversationId ) ) ; }
Updates the tags for a given conversation.
Omitted tags are removed.

@param int                             $conversationId
@param array|Collection|TagsCollection $tags
Updates the tags for a given conversation . Omitted tags are removed .