public function updateCustomFields(int $conversationId, $customFields): void
    {
        if ($customFields instanceof CustomFieldsCollection) {
            $customFieldsCollection = $customFields;
        } else {
            if ($customFields instanceof Collection) {
                $customFields = $customFields->toArray();
            }

            $customFieldsCollection = new CustomFieldsCollection();
            $customFieldsCollection->setCustomFields($customFields);
        }

        $this->restClient->updateResource(
            $customFieldsCollection,
            sprintf('/v2/conversations/%d/fields', $conversationId)
        );
    }
public function updateCustomFields(int $conversationId, $customFields): void
    {
        if ($customFields instanceof CustomFieldsCollection) {
            $customFieldsCollection = $customFields;
        } else {
            if ($customFields instanceof Collection) {
                $customFields = $customFields->toArray();
            }

            $customFieldsCollection = new CustomFieldsCollection();
            $customFieldsCollection->setCustomFields($customFields);
        }

        $this->restClient->updateResource(
            $customFieldsCollection,
            sprintf('/v2/conversations/%d/fields', $conversationId)
        );
    }
public function updateCustomFields ( int $ conversationId , $ customFields ) : void { if ( $ customFields instanceof CustomFieldsCollection ) { $ customFieldsCollection = $ customFields ; } else { if ( $ customFields instanceof Collection ) { $ customFields = $ customFields -> toArray ( ) ; } $ customFieldsCollection = new CustomFieldsCollection ( ) ; $ customFieldsCollection -> setCustomFields ( $ customFields ) ; } $ this -> restClient -> updateResource ( $ customFieldsCollection , sprintf ( '/v2/conversations/%d/fields' , $ conversationId ) ) ; }
Updates the custom field values for a given conversation.  Ommitted fields are removed.

@param int                                                   $conversationId
@param CustomField[]|array|Collection|CustomFieldsCollection $customFields
Updates the custom field values for a given conversation . Ommitted fields are removed .