Example #1
0
 /**
  * {@inheritDoc}
  */
 public function unregisterDevice(UnregisterDeviceRequest $unregisterDeviceRequest)
 {
     // If the 'application' attribute is not set in the request we try to get a default one from the Pushwoosh
     // client
     if ($unregisterDeviceRequest->getApplication() === null) {
         // The 'application' must be set
         if (!isset($this->application)) {
             throw new PushwooshException('The  \'application\' property is not set !');
         }
         $unregisterDeviceRequest->setApplication($this->application);
     }
     $response = $this->cURLClient->pushwooshCall('unregisterDevice', $unregisterDeviceRequest->jsonSerialize());
     return UnregisterDeviceResponse::create($response);
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function unregisterDevice(UnregisterDeviceRequest $unregisterDeviceRequest)
 {
     $this->pushwhooshRequests[] = $unregisterDeviceRequest;
     return UnregisterDeviceResponse::create(json_decode('{
             "status_code":200,
             "status_message":"OK"
         }', true));
 }
Example #3
0
 /**
  * {@inheritDoc}
  */
 public function unregisterDevice(UnregisterDeviceRequest $unregisterDeviceRequest)
 {
     // If the 'application' attribute is not set in the request we try to get a default one from the Pushwoosh
     // client
     $this->setApplicationIfNotSet($unregisterDeviceRequest);
     $response = $this->cURLClient->pushwooshCall('unregisterDevice', $unregisterDeviceRequest->jsonSerialize());
     return UnregisterDeviceResponse::create($response);
 }