Get a single subscription

Example URL: /subscriptions/:identity

@param  string        $identity Unique identifier, beginning with "SB".
@param  string[mixed] $params   An associative array for any params
@return Subscription
974276
public function get($identity, $params = array())
    {
        $path = Util::subUrl(
            '/subscriptions/:identity',
            array(
                
                'identity' => $identity
            )
        );
        if(isset($params['params'])) { $params['query'] = $params['params'];
            unset($params['params']);
        }

        
        $response = $this->api_client->get($path, $params);
        

        return $this->getResourceForResponse($response);
    }
377546
public function get($identifier, $params = [])
    {
        if (!isset($this->dependencies[$identifier])) {
            throw new \Exception("Dependency identified by '$identifier' does not exist", 500);
        }

        return $this->dependencies[$identifier]->get($params);
    }
738076
public function byIdentity($identity = null)
    {
        if (!$identity) {
            $identity = Yii::$app->user->identity;
        }
        if (method_exists($identity, 'canGetProperty') && !$identity->canGetProperty('guid')) {
            return $this;
        }
        return $this->createdBy($identity->getGUID());
    }
930494
public function buildIdentity($identityData)
    {
        $class = $this->getConfig('identityClass');

        if (is_callable($class)) {
            $identity = $class($identityData);
        } else {
            $identity = new $class($identityData);
        }

        if (!($identity instanceof IdentityInterface)) {
            throw new RuntimeException(sprintf(
                'Object `%s` does not implement `%s`',
                get_class($identity),
                IdentityInterface::class
            ));
        }

        return $identity;
    }
960833
protected function _fetchAll(Identity $identity)
    {
        $this->_rawData = $this->_db->fetchAll($this->_getSelectWithLimit($identity));
        return $this;
    }
1299224
function getIdentity()
        {
        
            if( $this->container->get('session')->has('identity'))
            {
           
                $obj = unserialize( $this->container->get('session')->get('identity'));
                return $obj;
            }
            else
            {
                return null;
            }
   
        }
376944
public function singleton($params = [])
    {
        static $instances = [];

        $signature = serialize($params);
        if (!isset($instances[$signature])) {
            $instances[$signature] = idna_convert::getInstance($params);
        }

        return $instances[$signature];
    }
410511
protected function getAuthorizationInfo(IdentityInterface $identity): AuthorizationInfoInterface
    {
        foreach ($this->getRealms() as $realm) {
            $info = $realm->getAuthorizationInfo($identity);
            if ($info instanceof AuthorizationInfoInterface) {
                return $info;
            }
        }

        return new AuthorizationInfo();
    }
724022
public function deleteIdentity($identity)
    {
        $this->_action = 'DeleteIdentity';
        $this->_method = 'GET';
        $this->_refreshDate();

        if (!(filter_var($identity, FILTER_VALIDATE_EMAIL) || preg_match('/^([a-z\d]+(-[a-z\d]+)*\.)+[a-z]{2,}$/', $identity))) {
            throw new Exception('Identity must be EmailAddress or Domain');
            return;
        }

        $parameters = array(
            'Identity' => $identity
        );

        $this->_generateSignature($parameters);
        $res = $this->_request();
        if ($res['code'] == 200) {
            return (string) $res['body']->ResponseMetadata->RequestId;
        } else {
            return new SimpleEmailServiceError((string) $res['body']->Error->Code);
        }
    }
864551
function Client(identity) {
  if (!(this instanceof Client)) {
    return new Client(identity);
  }

  assert(identity instanceof Identity, 'Invalid identity supplied');

  this._identity = identity;
  this._podhost = utils.getPodHostFromUserID(this._identity.userID);
  this._baseUrl = 'https://' + this._podhost;
  this._pubkey = this._identity._publicKeyArmored;
}
1026202
public function handle($identity, $params = array())
    {
        $path = Util::subUrl(
            '/customer_notifications/:identity/actions/handle',
            array(
                
                'identity' => $identity
            )
        );
        if(isset($params['params'])) { 
            $params['body'] = json_encode(array("data" => (object)$params['params']));
        
            unset($params['params']);
        }

        
        $response = $this->api_client->post($path, $params);
        

        return $this->getResourceForResponse($response);
    }
682637
public function getIdentity($spec = null, $default = null)
    {
        if ($spec !== null) {
            return isset($this->identity[$spec]) ? $this->identity[$spec] : $default;
        } else {
            return $this->identity;
        }
    }
1219023
public function findStandardIdentityByIdentifier(string $identifier): Entity\StandardIdentity
    {
        $identity = new Entity\StandardIdentity;
        $identity->setIdentifier($identifier);

        $this->repository->load($identity);

        if ($identity->getId() === null) {
            $this->logger->notice('identity not found', [
                'input' => [
                    'identifier' => $identifier,
                ],
            ]);

            throw new IdentityNotFound;
        }

        return $identity;
    }
3704
public function update($identity, $label = null, $master = null, $status = null)
    {

        $params = array();
        if (! is_null($label)) {
            $params['label'] = $label;
        }
        if (! is_null($master)) {
            $params['master'] = $master;
        }
        if (! is_null($status)) {
            $params['status'] = $status;
        }

        return $this->_user->put('account/identity/' . $identity, $params);
    }
765135
public function getIdentityMap(string $entityType) : IdentityMap
    {
        if (!isset($this->identityMaps[$entityType])) {
            $this->identityMaps[$entityType] = new IdentityMap($entityType);
        }

        return $this->identityMaps[$entityType];
    }
927634
public function setIdentity(IIdentity $identity = NULL)
	{
		if ($identity !== NULL) {
			$class = get_class($identity);

			// we want to convert identity entities into fake identity
			// so only the identifier fields are stored,
			// but we are only interested in identities which are correctly
			// mapped as doctrine entities
			if ($this->entityManager->getMetadataFactory()->hasMetadataFor($class)) {
				$cm = $this->entityManager->getClassMetadata($class);
				$identifier = $cm->getIdentifierValues($identity);
				$identity = new FakeIdentity($identifier, $class);
			}
		}

		return parent::setIdentity($identity);
	}
909963
public Object getObjectByIdentity(Identity id)
            throws PersistenceBrokerException
    {
        checkOpen();
        ObjectEnvelope envelope = objectEnvelopeTable.getByIdentity(id);
        if (envelope != null)
        {
            return (envelope.needsDelete() ? null : envelope.getObject());
        }
        else
        {
            return getBroker().getObjectByIdentity(id);
        }
    }