diff --git a/lib/recurly/event.js b/lib/recurly/event.js index 83d79c3a7..6b31612fc 100644 --- a/lib/recurly/event.js +++ b/lib/recurly/event.js @@ -28,5 +28,6 @@ export class EventDispatcher { * @param {String} options.name event name */ function payload ({ name }) { - return { name }; + const initiatedAt = new Date().toISOString(); + return { name, initiatedAt }; } diff --git a/test/support/helpers.js b/test/support/helpers.js index 304c17a0e..30d7d8c50 100644 --- a/test/support/helpers.js +++ b/test/support/helpers.js @@ -59,8 +59,3 @@ export function isUuidv4 (example) { const matcher = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; return matcher.test(example); } - -export function isUuidv4 (example) { - const matcher = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; - return matcher.test(example); -}