Skip to content

Commit 2cf7b19

Browse files
committed
Adding Plan Item Price ID filter
1 parent 52a723e commit 2cf7b19

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

components/chargebee/chargebee.app.mjs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@ export default {
1818
},
1919
itemPriceId: {
2020
type: "string",
21-
label: "Item Price ID",
21+
label: "Plan Item Price ID",
2222
description: "The unique identifier of the plan item price.",
2323
async options() {
2424
const itemPrices = await this.getItemPrices();
25-
return itemPrices.list.map(({
26-
item_price: {
27-
name, id,
28-
},
29-
}) => ({
30-
label: name,
31-
value: id,
32-
}));
25+
return itemPrices.list
26+
.filter(({ item_price: { item_type } }) => item_type === "plan")
27+
.map(({ item_price: { name, id } }) => ({
28+
label: name,
29+
value: id,
30+
}));
3331
},
3432
},
3533
},

0 commit comments

Comments
 (0)