Skip to content

Commit 73c58d3

Browse files
committed
ESLint fixes
1 parent 940d182 commit 73c58d3

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

components/chargebee/actions/create-subscription/create-subscription.mjs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default {
1818
itemPriceId: {
1919
propDefinition: [
2020
chargebee,
21-
"itemPriceId"
21+
"itemPriceId",
2222
],
2323
},
2424
unitPrice: {
@@ -58,26 +58,26 @@ export default {
5858
},
5959
async run({ $ }) {
6060
try {
61-
const response = await this.chargebee.createSubscription(this.customerId, clearObject({
62-
id: this.id,
63-
net_term_days: this.netTermDays,
64-
start_date: this.startDate && (Date.parse(this.startDate) / 1000),
65-
subscription_items: [
66-
{
67-
item_price_id: this.itemPriceId,
68-
item_type: "plan",
69-
unit_price: this.unitPrice,
70-
quantity: this.quantity,
71-
}
72-
],
73-
...this.additionalFields,
74-
}));
61+
const response = await this.chargebee.createSubscription(this.customerId, clearObject({
62+
id: this.id,
63+
net_term_days: this.netTermDays,
64+
start_date: this.startDate && (Date.parse(this.startDate) / 1000),
65+
subscription_items: [
66+
{
67+
item_price_id: this.itemPriceId,
68+
item_type: "plan",
69+
unit_price: this.unitPrice,
70+
quantity: this.quantity,
71+
},
72+
],
73+
...this.additionalFields,
74+
}));
7575

76-
$.export("$summary", `Successfully created subscription (ID: ${response?.subscription?.id})`);
77-
return response;
78-
} catch (error) {
79-
$.export("debug", error);
80-
throw new Error("Error creating subscription. Check the debug export for more information.")
81-
}
76+
$.export("$summary", `Successfully created subscription (ID: ${response?.subscription?.id})`);
77+
return response;
78+
} catch (error) {
79+
$.export("debug", error);
80+
throw new Error("Error creating subscription. Check the debug export for more information.");
81+
}
8282
},
8383
};

components/chargebee/chargebee.app.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ export default {
2222
description: "The unique identifier of the plan item price.",
2323
async options() {
2424
const itemPrices = await this.getItemPrices();
25-
return itemPrices.list.map(({ item_price: { name, id } }) => ({
25+
return itemPrices.list.map(({
26+
item_price: {
27+
name, id,
28+
},
29+
}) => ({
2630
label: name,
2731
value: id,
2832
}));

0 commit comments

Comments
 (0)