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

Method constructor

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

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

(data = [], includesLabel = true)

Source from the content-addressed store, hash-verified

410 * @param {boolean=} includesLabel
411 */
412 constructor(data = [], includesLabel = true) {
413 const base = includesLabel ? 1 : 0;
414
415 /** @private {?string} */
416 this.embedderOrigin_ = data[base] == null ? null : data[base];
417
418 /** @private {?string} */
419 this.transactionId_ = data[1 + base] == null ? null : data[1 + base];
420
421 /** @private {?string} */
422 this.referringOrigin_ = data[2 + base] == null ? null : data[2 + base];
423
424 /** @private {?string} */
425 this.utmSource_ = data[3 + base] == null ? null : data[3 + base];
426
427 /** @private {?string} */
428 this.utmCampaign_ = data[4 + base] == null ? null : data[4 + base];
429
430 /** @private {?string} */
431 this.utmMedium_ = data[5 + base] == null ? null : data[5 + base];
432
433 /** @private {?string} */
434 this.sku_ = data[6 + base] == null ? null : data[6 + base];
435
436 /** @private {?boolean} */
437 this.readyToPay_ = data[7 + base] == null ? null : data[7 + base];
438
439 /** @private {!Array<string>} */
440 this.label_ = data[8 + base] || [];
441
442 /** @private {?string} */
443 this.clientVersion_ = data[9 + base] == null ? null : data[9 + base];
444
445 /** @private {?string} */
446 this.url_ = data[10 + base] == null ? null : data[10 + base];
447
448 /** @private {?Timestamp} */
449 this.clientTimestamp_ =
450 data[11 + base] == null || data[11 + base] == undefined
451 ? null
452 : new Timestamp(data[11 + base], includesLabel);
453
454 /** @private {?ReaderSurfaceType} */
455 this.readerSurfaceType_ = data[12 + base] == null ? null : data[12 + base];
456
457 /** @private {?string} */
458 this.integrationVersion_ = data[13 + base] == null ? null : data[13 + base];
459 }
460
461 /**
462 * @return {?string}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected