Skip to content

Commit

Permalink
Adds Event initiatedAt property
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
  • Loading branch information
chrissrogers committed Apr 27, 2018
1 parent 2c87aad commit 20e7c76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 2 additions & 1 deletion lib/recurly/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
5 changes: 0 additions & 5 deletions test/support/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 20e7c76

Please sign in to comment.