public function customFieldsGet($entity, $code)
    {
        if (empty($code)) {
            throw new \InvalidArgumentException(
                'Parameter `code` must be not empty'
            );
        }

        if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
            throw new \InvalidArgumentException(
                'Parameter `entity` must contain a data & value must be `order` or `customer`'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            "/custom-fields/$entity/$code",
            "GET"
        );
    }
public function customFieldsGet($entity, $code)
    {
        if (empty($code)) {
            throw new \InvalidArgumentException(
                'Parameter `code` must be not empty'
            );
        }

        if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
            throw new \InvalidArgumentException(
                'Parameter `entity` must contain a data & value must be `order` or `customer`'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            "/custom-fields/$entity/$code",
            "GET"
        );
    }
public function customFieldsGet ( $ entity , $ code ) { if ( empty ( $ code ) ) { throw new \ InvalidArgumentException ( 'Parameter `code` must be not empty' ) ; } if ( empty ( $ entity ) || ! in_array ( $ entity , [ 'customer' , 'order' ] ) ) { throw new \ InvalidArgumentException ( 'Parameter `entity` must contain a data & value must be `order` or `customer`' ) ; } /* @noinspection PhpUndefinedMethodInspection */ return $ this -> client -> makeRequest ( "/custom-fields/$entity/$code" , "GET" ) ; }
Get custom field

@param $entity
@param $code

@return \RetailCrm\Response\ApiResponse
Get custom field