/** @return Subscription[] */
 public function subscriptions()
 {
     $subscriptions = array();
     $response = $this->getClient()->get(sprintf('%s/subscriptions', $this->topic));
     foreach ($response->getBody()->items as $item) {
         $subscription = new Subscription();
         $subscription->setParent($this);
         $subscription->unserialize($item);
         $endpoint = Endpoint::endpointByType($subscription->getEndpointType());
         $endpoint->setParent($subscription);
         $endpoint->unserialize($subscription->getEndpoint());
         $subscription->setEndpoint($endpoint);
         $subscriptions[] = $subscription;
     }
     return $subscriptions;
 }
 public function subscriptions()
 {
     $subscriptions = array();
     $response = $this->getClient()->get("/topics/" . $this->getName() . "/subscriptions");
     foreach ($response->getBody()->items as $item) {
         $subscription = new \SoftLayer\Messaging\Subscription();
         $subscription->setParent($this);
         $subscription->unserialize($item);
         $endpoint = \SoftLayer\Messaging\Endpoint::endpointByType($subscription->getEndpointType());
         $endpoint->setParent($subscription);
         $endpoint->unserialize($subscription->getEndpoint());
         $subscription->setEndpoint($endpoint);
         $subscriptions[] = $subscription;
     }
     return $subscriptions;
 }