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

Method constructor

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

* @param {string} service * @param {string} raw * @param {!Array<!Entitlement>} entitlements * @param {?string} currentProduct * @param {function(!Entitlements)} ackHandler * @param {function(!Entitlements, ?Function=)} consumeHandler * @param {?boolean|undefined} isReadyToPay *

(
    service,
    raw,
    entitlements,
    currentProduct,
    ackHandler,
    consumeHandler,
    isReadyToPay,
    decryptedDocumentKey
  )

Source from the content-addressed store, hash-verified

4254 * @param {?string|undefined} decryptedDocumentKey
4255 */
4256 constructor(
4257 service,
4258 raw,
4259 entitlements,
4260 currentProduct,
4261 ackHandler,
4262 consumeHandler,
4263 isReadyToPay,
4264 decryptedDocumentKey
4265 ) {
4266 /** @const {string} */
4267 this.service = service;
4268 /** @const {string} */
4269 this.raw = raw;
4270 /** @const {!Array<!Entitlement>} */
4271 this.entitlements = entitlements;
4272 /** @const {boolean} */
4273 this.isReadyToPay = isReadyToPay || false;
4274 /** @const {?string} */
4275 this.decryptedDocumentKey = decryptedDocumentKey || null;
4276
4277 /** @private @const {?string} */
4278 this.product_ = currentProduct;
4279 /** @private @const {function(!Entitlements)} */
4280 this.ackHandler_ = ackHandler;
4281 /** @private @const {function(!Entitlements, ?Function=)} */
4282 this.consumeHandler_ = consumeHandler;
4283 }
4284
4285 /**
4286 * @return {!Entitlements}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected