Esempio n. 1
0
 public function decrementCounter($name, $value = 1)
 {
     if (empty($this->_customerFid)) {
         throw new \RuntimeException("You cannot decrement a counter before setting a customer fid");
     }
     $payload = new SetPropertyValuePayload();
     $payload->fid = $this->_customerFid;
     $payload->property = $name;
     $payload->value = ValueAs::int($value, 1);
     $this->_processRequest($this->_getPropertyEndpoint()->decrementCounter($payload));
     return $this;
 }