mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
28 lines
679 B
JavaScript
28 lines
679 B
JavaScript
|
/**
|
||
|
* @typedef {object} MemberPaidConversionEventData
|
||
|
* @prop {string} memberId
|
||
|
* @prop {string} memberStatus
|
||
|
* @prop {string} subscriptionId
|
||
|
* @prop {string} entryId
|
||
|
* @prop {string} sourceUrl
|
||
|
*/
|
||
|
|
||
|
module.exports = class MemberPaidConversionEvent {
|
||
|
/**
|
||
|
* @param {MemberPaidConversionEventData} data
|
||
|
* @param {Date} timestamp
|
||
|
*/
|
||
|
constructor(data, timestamp) {
|
||
|
this.data = data;
|
||
|
this.timestamp = timestamp;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {MemberPaidConversionEventData} data
|
||
|
* @param {Date} [timestamp]
|
||
|
*/
|
||
|
static create(data, timestamp) {
|
||
|
return new MemberPaidConversionEvent(data, timestamp || new Date);
|
||
|
}
|
||
|
};
|