MCPcopy Create free account
hub / github.com/ampproject/amphtml / parseEntitlements

Function parseEntitlements

third_party/subscriptions-project/swg.js:6228–6233  ·  view source on GitHub ↗

* @param {!./deps.DepsDef} deps * @param {!Object} swgData * @return {?../api/entitlements.Entitlements} * @package Visible for testing.

(deps, swgData)

Source from the content-addressed store, hash-verified

6226 * @package Visible for testing.
6227 */
6228function parseEntitlements(deps, swgData) {
6229 if (swgData['signedEntitlements']) {
6230 return deps.entitlementsManager().parseEntitlements(swgData);
6231 }
6232 return null;
6233}
6234
6235/**
6236 * @param {!PurchaseData} purchaseData

Callers 1

Calls 2

parseEntitlementsMethod · 0.80
entitlementsManagerMethod · 0.80

Tested by

no test coverage detected