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

Method constructor

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

* @param {!Array<*>=} data * @param {boolean=} includesLabel

(data = [], includesLabel = true)

Source from the content-addressed store, hash-verified

1359 * @param {boolean=} includesLabel
1360 */
1361 constructor(data = [], includesLabel = true) {
1362 const base = includesLabel ? 1 : 0;
1363
1364 /** @private {?string} */
1365 this.smartboxMessage_ = data[base] == null ? null : data[base];
1366
1367 /** @private {?string} */
1368 this.gpayTransactionId_ = data[1 + base] == null ? null : data[1 + base];
1369
1370 /** @private {?boolean} */
1371 this.hadLogged_ = data[2 + base] == null ? null : data[2 + base];
1372
1373 /** @private {?string} */
1374 this.sku_ = data[3 + base] == null ? null : data[3 + base];
1375
1376 /** @private {?string} */
1377 this.oldTransactionId_ = data[4 + base] == null ? null : data[4 + base];
1378
1379 /** @private {?boolean} */
1380 this.isUserRegistered_ = data[5 + base] == null ? null : data[5 + base];
1381
1382 /** @private {?string} */
1383 this.subscriptionFlow_ = data[6 + base] == null ? null : data[6 + base];
1384
1385 /** @private {?Timestamp} */
1386 this.subscriptionTimestamp_ =
1387 data[7 + base] == null || data[7 + base] == undefined
1388 ? null
1389 : new Timestamp(data[7 + base], includesLabel);
1390 }
1391
1392 /**
1393 * @return {?string}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected