From 13d191bf3f8f9d622b9748af697b5e79ef932a93 Mon Sep 17 00:00:00 2001 From: Shugo Tanaka Date: Thu, 31 Mar 2016 17:59:17 -0500 Subject: [PATCH] Update deleting contact properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently doesn’t work. new_execute_delete_request() doesn’t exist in the HubSpot_Baseclient. Returns fatal error. This updates the call to the current v2 API spec. --- class.properties.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/class.properties.php b/class.properties.php index bb9c7b9..3a52f62 100644 --- a/class.properties.php +++ b/class.properties.php @@ -21,7 +21,7 @@ class HubSpot_Properties extends HubSpot_Baseclient{ protected $API_PATH = 'contacts'; - protected $API_VERSION = 'v1'; + protected $API_VERSION = 'v2'; /** * Get all Properties @@ -117,10 +117,10 @@ public function update_property($name,$params){ * @throws HubSpot_Exception **/ public function delete_property($name){ - $endpoint = 'properties/'.$name; + $endpoint = 'properties/named/'.$name; try{ - return $this->new_execute_delete_request($this->get_request_url($endpoint,null)); + return $this->execute_delete_request($this->get_request_url($endpoint,null)); } catch(HubSpot_Exception $e){ print_r('Unable to delete property: '.$e); @@ -241,4 +241,5 @@ public function delete_property_group($name){ } -?> \ No newline at end of file +?> +