Skip to main content
Vindicia Knowledge Center

Account.revokeEntitlement

Account.revokeEntitlement

Account.revokeEntitlement

The revokeEntitlement method revokes entitlement from an Account.

Note This method will revoke only those Entitlements granted using the grantEntitlement method; it will not revoke entitlements acquired through an AutoBill.   

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

account: the Account to which this revocation applies.

entitlement: the Entitlement object to be revoked.

merchantEntitlementId: the merchant's unique ID for this entitlement. This may be specified in lieu of the full Entitlement object. Note that either the Entitlement or the merchantEntitlementId must be specified.

note: an optional memo regarding the entitlement revocation.

Output

account: the Account with entitlements revoked.

return: an object of type Return that indicates the success or failure of the call.

Returns

In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String

400

One of the following:

  • Entitlement not specified.
  • Base Account not specified.
  • Account not found.
  • Entitlement revocation failed: Could not find active entitlement for revocation.
  • Entitlement revocation failed: error-description.
  • Failed to save Account after revoking entitlement: error-description.
  • Failed to reload account after entitlement revocation: error-description.

Example

// to revoke an entitlement from an account

$acct = new Account();
$acct->setMerchantAccountId('xyz123');

$response = $acct->revokeEntitlement(

null,
'bac', // the Id for playing Scrabble
'You can play no more'

);

if ($response['returnCode'] == 200) {

$entitlements = $response['data']->account->entitlements;
foreach ($entitlements as $ent) {

if ($ent->merchantEntitlementId == 'bac') {

if ($ent->endTimeStamp < $now) {
// yes, properly revoked
}
else {
print "Failed to revoke 'bac' after $now\n";
}

}

}

}

else {

print "Failed to revoke 'bac'\n";

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top