rittenhop-dev/versions/5.94.2/node_modules/@tryghost/member-events/lib/MemberPaidCancellationEvent.js
2024-09-23 19:40:12 -04:00

28 lines
689 B
JavaScript

/**
* @typedef {object} MemberPaidCancellationEventData
* @prop {string} memberId
* @prop {string} memberStatus
* @prop {string} subscriptionId
* @prop {string} entryId
* @prop {string} sourceUrl
*/
module.exports = class MemberPaidCancellationEvent {
/**
* @param {MemberPaidCancellationEventData} data
* @param {Date} timestamp
*/
constructor(data, timestamp) {
this.data = data;
this.timestamp = timestamp;
}
/**
* @param {MemberPaidCancellationEventData} data
* @param {Date} [timestamp]
*/
static create(data, timestamp) {
return new MemberPaidCancellationEvent(data, timestamp || new Date);
}
};