Skip to content

Commit a4cf642

Browse files
committed
Deprecated order.* sources and introduced purchase.* sources to replace them
1 parent 1d006eb commit a4cf642

File tree

9 files changed

+1711
-6
lines changed

9 files changed

+1711
-6
lines changed

components/xola/sources/new-order-created-instant/new-order-created-instant.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export default {
55
...common,
66
key: "xola-new-order-created-instant",
77
name: "New Order Created (Instant)",
8-
description: "Emit new event when a new order is created. [See the documentation](https://developers.xola.com/reference/webhook-introduction)",
9-
version: "0.0.1",
8+
description: "Emit new event when a new order is created. [See the documentation](https://developers.xola.com/reference/webhook-introduction). **This source has been deprecated. Please use the 'New Purchase Created (Instant)' source instead.**",
9+
version: "0.0.2",
1010
type: "source",
1111
dedupe: "unique",
1212
methods: {

components/xola/sources/order-deleted-instant/order-deleted-instant.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export default {
55
...common,
66
key: "xola-order-deleted-instant",
77
name: "Order Deleted (Instant)",
8-
description: "Emit new event when an order is deleted. [See the documentation](https://developers.xola.com/reference/webhook-introduction)",
9-
version: "0.0.1",
8+
description: "Emit new event when an order is deleted. [See the documentation](https://developers.xola.com/reference/webhook-introduction). **This source has been deprecated. Please use the 'Purchase Canceled (Instant)' source instead.**",
9+
version: "0.0.2",
1010
type: "source",
1111
dedupe: "unique",
1212
methods: {

components/xola/sources/order-updated-instant/order-updated-instant.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export default {
55
...common,
66
key: "xola-order-updated-instant",
77
name: "Order Updated (Instant)",
8-
description: "Emit new event when an order is updated. [See the documentation](https://developers.xola.com/reference/webhook-introduction)",
9-
version: "0.0.1",
8+
description: "Emit new event when an order is updated. [See the documentation](https://developers.xola.com/reference/webhook-introduction). **This source has been deprecated. Please use the 'Purchase Updated (Instant)' source instead.**",
9+
version: "0.0.2",
1010
type: "source",
1111
dedupe: "unique",
1212
methods: {
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import common from "../common/webhook.mjs";
2+
import sampleEmit from "./test-event.mjs";
3+
4+
export 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+
},
26+
},
27+
sampleEmit,
28+
};

0 commit comments

Comments
 (0)