Skip to content

Commit 93c610d

Browse files
committed
pennylane init
1 parent 6b2368a commit 93c610d

File tree

8 files changed

+779
-3
lines changed

8 files changed

+779
-3
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import pennylane from "../../pennylane.app.mjs";
2+
import { axios } from "@pipedream/platform";
3+
4+
export default {
5+
key: "pennylane-create-billing-subscription",
6+
name: "Create Billing Subscription",
7+
description: "Creates a billing subscription for a customer. [See the documentation]().",
8+
version: "0.0.{{ts}}",
9+
type: "action",
10+
props: {
11+
pennylane: {
12+
type: "app",
13+
app: "pennylane",
14+
},
15+
customerId: {
16+
propDefinition: [
17+
pennylane,
18+
"customerId",
19+
],
20+
},
21+
subscriptionPlanId: {
22+
propDefinition: [
23+
pennylane,
24+
"subscriptionPlanId",
25+
],
26+
},
27+
billingFrequency: {
28+
propDefinition: [
29+
pennylane,
30+
"billingFrequency",
31+
],
32+
},
33+
subscriptionDiscounts: {
34+
propDefinition: [
35+
pennylane,
36+
"subscriptionDiscounts",
37+
],
38+
optional: true,
39+
},
40+
subscriptionCustomNotes: {
41+
propDefinition: [
42+
pennylane,
43+
"subscriptionCustomNotes",
44+
],
45+
optional: true,
46+
},
47+
},
48+
async run({ $ }) {
49+
const response = await this.pennylane.createBillingSubscription();
50+
$.export("$summary", `Created billing subscription with ID ${response.billing_subscription.id}`);
51+
return response;
52+
},
53+
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import pennylane from "../../pennylane.app.mjs";
2+
import { axios } from "@pipedream/platform";
3+
4+
export default {
5+
key: "pennylane-create-customer-invoice",
6+
name: "Create Customer Invoice",
7+
description: "Generates a new invoice for a customer using Pennylane. [See the documentation](https://pennylane.readme.io/reference/customer_invoices-post-1)",
8+
version: "0.0.{{ts}}",
9+
type: "action",
10+
props: {
11+
pennylane,
12+
invoiceCustomerId: {
13+
propDefinition: [
14+
pennylane,
15+
"invoiceCustomerId",
16+
],
17+
},
18+
invoiceItems: {
19+
propDefinition: [
20+
pennylane,
21+
"invoiceItems",
22+
],
23+
},
24+
paymentTerms: {
25+
propDefinition: [
26+
pennylane,
27+
"paymentTerms",
28+
],
29+
},
30+
invoiceTaxDetails: {
31+
propDefinition: [
32+
pennylane,
33+
"invoiceTaxDetails",
34+
],
35+
optional: true,
36+
},
37+
invoiceFooterCustomization: {
38+
propDefinition: [
39+
pennylane,
40+
"invoiceFooterCustomization",
41+
],
42+
optional: true,
43+
},
44+
},
45+
async run({ $ }) {
46+
const invoice = await this.pennylane.generateInvoice();
47+
48+
$.export("$summary", `Created invoice with ID ${invoice.invoice.id}`);
49+
return invoice;
50+
},
51+
};
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import pennylane from "../../pennylane.app.mjs";
2+
import { axios } from "@pipedream/platform";
3+
4+
export default {
5+
key: "pennylane-create-customer",
6+
name: "Create Customer",
7+
description: "Creates a new customer in Pennylane. [See the documentation](https://pennylane.readme.io/reference/customers-post-1)",
8+
version: "0.0.{{ts}}",
9+
type: "action",
10+
props: {
11+
pennylane,
12+
customerName: {
13+
propDefinition: [
14+
pennylane,
15+
"customerName",
16+
],
17+
},
18+
customerEmail: {
19+
propDefinition: [
20+
pennylane,
21+
"customerEmail",
22+
],
23+
},
24+
customerContactInfo: {
25+
propDefinition: [
26+
pennylane,
27+
"customerContactInfo",
28+
],
29+
},
30+
customerAddress: {
31+
propDefinition: [
32+
pennylane,
33+
"customerAddress",
34+
],
35+
},
36+
customerMetadata: {
37+
propDefinition: [
38+
pennylane,
39+
"customerMetadata",
40+
],
41+
},
42+
},
43+
async run({ $ }) {
44+
const response = await this.pennylane.createCustomer();
45+
$.export("$summary", `Created customer ${response.customer.name}`);
46+
return response;
47+
},
48+
};

components/pennylane/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"publishConfig": {
1313
"access": "public"
1414
}
15-
}
15+
}

0 commit comments

Comments
 (0)