File tree Expand file tree Collapse file tree 3 files changed +21
-24
lines changed
purchase-canceled-instant Expand file tree Collapse file tree 3 files changed +21
-24
lines changed Original file line number Diff line number Diff line change @@ -2,27 +2,26 @@ import common from "../common/webhook.mjs";
22import sampleEmit from "./test-event.mjs" ;
33
44export default {
5- ...common ,
6- key : "xola-purchase-canceled-instant" ,
7- name : "Purchase Canceled (Instant)" ,
8- description : "Emit new event when a purchase is canceled." ,
9- version : "0.0.1" ,
10- type : "source" ,
11- dedupe : "unique" ,
12- methods : {
13- ...common . methods ,
14- getEventName ( ) {
15- return "purchase.cancel" ;
16- } ,
17- generateMeta ( body ) {
18- const { data } = body ;
19- const ts = Date . now ( ) ;
20- return {
21- id : `${ data . id } -${ ts } ` ,
22- summary : `Purchase Canceled ${ data . id } ` ,
23- ts,
24- } ;
25- } ,
5+ ...common ,
6+ key : "xola-purchase-canceled-instant" ,
7+ name : "Purchase Canceled (Instant)" ,
8+ description : "Emit new event when a purchase is canceled." ,
9+ version : "0.0.1" ,
10+ type : "source" ,
11+ methods : {
12+ ...common . methods ,
13+ getEventName ( ) {
14+ return "purchase.cancel" ;
2615 } ,
27- sampleEmit,
16+ generateMeta ( body ) {
17+ const { data } = body ;
18+ const ts = Date . now ( ) ;
19+ return {
20+ id : `${ data . id } -${ ts } ` ,
21+ summary : `Purchase Canceled ${ data . id } ` ,
22+ ts,
23+ } ;
24+ } ,
25+ } ,
26+ sampleEmit,
2827} ;
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ export default {
88 description : "Emit new event when a new purchase is created." ,
99 version : "0.0.1" ,
1010 type : "source" ,
11- dedupe : "unique" ,
1211 methods : {
1312 ...common . methods ,
1413 getEventName ( ) {
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ export default {
88 description : "Emit new event when a purchase is updated." ,
99 version : "0.0.1" ,
1010 type : "source" ,
11- dedupe : "unique" ,
1211 methods : {
1312 ...common . methods ,
1413 getEventName ( ) {
You can’t perform that action at this time.
0 commit comments