From 361f8fb8025cdf96d4cfee8a695fda0e71908396 Mon Sep 17 00:00:00 2001 From: steve Date: Thu, 10 Jan 2019 15:10:10 -0800 Subject: [PATCH] Allow for the update of customer statuses. --- src/PleskX/Api/Operator/Customer.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/PleskX/Api/Operator/Customer.php b/src/PleskX/Api/Operator/Customer.php index 16824539..288cfe27 100644 --- a/src/PleskX/Api/Operator/Customer.php +++ b/src/PleskX/Api/Operator/Customer.php @@ -24,6 +24,22 @@ public function create($properties) return new Struct\Info($response); } + public function set_status($plesk_customer_id,$status) + { + $packet = $this->_client->getPacket(); + + $get = $packet->addChild($this->_wrapperTag)->addChild('set'); + + $filter = $get->addChild('filter'); + $filter->addChild('id',$plesk_customer_id); + $values = $get->addChild('values'); + $gen_info = $values->addChild('gen_info'); + $gen_info->addChild('status',$status); + $response = $this->_client->request($packet,$this->_client::RESPONSE_FULL); + + return new Struct\Info($response); + } + /** * @param string $field * @param integer|string $value