for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Acquia\Network;
class Subscription extends \ArrayObject
{
/**
* @param string $networkId
* @param string $networkKey
* @param array $response
*
* @return \Acquia\Network\Subscription
*/
public static function loadFromResponse($networkId, $networkKey, array $response)
$subscription = new static($response['body']);
$subscription['id'] = $networkId;
$subscription['key'] = $networkKey;
return $subscription;
}
* @return bool
public function isActive()
return !empty($this['active']);
* @return string
public function getId()
return $this['id'];
public function getKey()
return $this['key'];
public function getUuid()
return $this['uuid'];
public function getDashboardUrl()
return $this['href'];
* @return \DateTime
public function getExpirationDate()
return new \DateTime($this['expiration_date']['value']);
public function getProductName()
return $this['product']['view'];
public function __toString()
return $this->getUuid();