Skip to content

Commit f6ef061

Browse files
authored
Merging pull request #18622
* new components * pnpm-lock.yaml * updates
1 parent abd10ce commit f6ef061

File tree

10 files changed

+477
-11
lines changed

10 files changed

+477
-11
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import payrexx from "../../payrexx.app.mjs";
2+
3+
export default {
4+
key: "payrexx-create-gateway",
5+
name: "Create Gateway",
6+
description: "Create a new gateway. [See the documentation](https://developers.payrexx.com/reference/create-a-gateway)",
7+
type: "action",
8+
version: "0.0.1",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
payrexx,
16+
amount: {
17+
propDefinition: [
18+
payrexx,
19+
"amount",
20+
],
21+
},
22+
currency: {
23+
propDefinition: [
24+
payrexx,
25+
"currency",
26+
],
27+
},
28+
sku: {
29+
propDefinition: [
30+
payrexx,
31+
"sku",
32+
],
33+
},
34+
purpose: {
35+
propDefinition: [
36+
payrexx,
37+
"purpose",
38+
],
39+
},
40+
vatRate: {
41+
propDefinition: [
42+
payrexx,
43+
"vatRate",
44+
],
45+
},
46+
},
47+
async run({ $ }) {
48+
const response = await this.payrexx.createGateway({
49+
$,
50+
data: {
51+
amount: this.amount,
52+
currency: this.currency,
53+
sku: this.sku,
54+
purpose: this.purpose,
55+
vatRate: this.vatRate,
56+
},
57+
});
58+
59+
$.export("$summary", `Successfully created gateway with ID: ${response.data[0]?.id}`);
60+
return response;
61+
},
62+
};
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import payrexx from "../../payrexx.app.mjs";
2+
3+
export default {
4+
key: "payrexx-create-manual-payout",
5+
name: "Create Manual Payout",
6+
description: "Create a manual payout. [See the documentation](https://developers.payrexx.com/reference/create-manual-payout)",
7+
type: "action",
8+
version: "0.0.1",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
payrexx,
16+
amount: {
17+
propDefinition: [
18+
payrexx,
19+
"amount",
20+
],
21+
},
22+
currency: {
23+
propDefinition: [
24+
payrexx,
25+
"currency",
26+
],
27+
},
28+
pspId: {
29+
type: "string",
30+
label: "PSP ID",
31+
description: "ID of the PSP from which the payout is to be triggered. 44 for Swiss Collecting and 36 for Payrexx Direct",
32+
},
33+
statementDescriptor: {
34+
type: "string",
35+
label: "Statement Descriptor",
36+
description: "Statement of the payout. Visible in bank statement.",
37+
optional: true,
38+
},
39+
},
40+
async run({ $ }) {
41+
const response = await this.payrexx.createManualPayout({
42+
$,
43+
data: {
44+
amount: this.amount,
45+
currency: this.currency,
46+
pspId: this.pspId,
47+
statementDescriptor: this.statementDescriptor,
48+
},
49+
});
50+
51+
$.export("$summary", `Successfully created manual payout with ID: ${response.data[0]?.id}`);
52+
return response;
53+
},
54+
};
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import payrexx from "../../payrexx.app.mjs";
2+
3+
export default {
4+
key: "payrexx-create-paylink",
5+
name: "Create Paylink",
6+
description: "Create a paylink. [See the documentation](https://developers.payrexx.com/reference/create-a-paylink)",
7+
type: "action",
8+
version: "0.0.1",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
payrexx,
16+
title: {
17+
type: "string",
18+
label: "Title",
19+
description: "This is the page title which will be shown on the payment page",
20+
},
21+
description: {
22+
type: "string",
23+
label: "Description",
24+
description: "This is a description which will be shown on the payment page",
25+
},
26+
referenceId: {
27+
type: "string",
28+
label: "Reference ID",
29+
description: "An internal reference id used by your system",
30+
},
31+
purpose: {
32+
propDefinition: [
33+
payrexx,
34+
"purpose",
35+
],
36+
},
37+
amount: {
38+
propDefinition: [
39+
payrexx,
40+
"amount",
41+
],
42+
},
43+
currency: {
44+
propDefinition: [
45+
payrexx,
46+
"currency",
47+
],
48+
},
49+
vatRate: {
50+
propDefinition: [
51+
payrexx,
52+
"vatRate",
53+
],
54+
},
55+
sku: {
56+
propDefinition: [
57+
payrexx,
58+
"sku",
59+
],
60+
},
61+
},
62+
async run({ $ }) {
63+
const response = await this.payrexx.createPaylink({
64+
$,
65+
data: {
66+
title: this.title,
67+
description: this.description,
68+
referenceId: this.referenceId,
69+
purpose: this.purpose,
70+
amount: this.amount,
71+
currency: this.currency,
72+
vatRate: this.vatRate,
73+
sku: this.sku,
74+
},
75+
});
76+
77+
$.export("$summary", `Successfully created paylink with ID: ${response.data[0]?.id}`);
78+
return response;
79+
},
80+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import payrexx from "../../payrexx.app.mjs";
2+
3+
export default {
4+
key: "payrexx-delete-gateway",
5+
name: "Delete Gateway",
6+
description: "Delete a gateway. [See the documentation](https://developers.payrexx.com/reference/delete-a-gateway)",
7+
type: "action",
8+
version: "0.0.1",
9+
annotations: {
10+
destructiveHint: true,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
payrexx,
16+
gatewayId: {
17+
propDefinition: [
18+
payrexx,
19+
"gatewayId",
20+
],
21+
},
22+
},
23+
async run({ $ }) {
24+
const response = await this.payrexx.deleteGateway({
25+
$,
26+
gatewayId: this.gatewayId,
27+
});
28+
29+
$.export("$summary", `Successfully deleted gateway with ID ${this.gatewayId}.`);
30+
31+
return response;
32+
},
33+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import payrexx from "../../payrexx.app.mjs";
2+
3+
export default {
4+
key: "payrexx-delete-invoice",
5+
name: "Delete Invoice",
6+
description: "Delete an invoice. [See the documentation](https://payrexxserviceapi.readme.io/reference/delete-an-invoice)",
7+
type: "action",
8+
version: "0.0.1",
9+
annotations: {
10+
destructiveHint: true,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
payrexx,
16+
invoiceId: {
17+
propDefinition: [
18+
payrexx,
19+
"invoiceId",
20+
],
21+
},
22+
},
23+
async run({ $ }) {
24+
const response = await this.payrexx.deleteInvoice({
25+
$,
26+
invoiceId: this.invoiceId,
27+
});
28+
29+
$.export("$summary", `Successfully deleted invoice with ID ${this.invoiceId}.`);
30+
return response;
31+
},
32+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import payrexx from "../../payrexx.app.mjs";
2+
3+
export default {
4+
key: "payrexx-list-invoices",
5+
name: "List Invoices",
6+
description: "List all invoices for a merchant. [See the documentation](https://payrexxserviceapi.readme.io/reference/list-all-invoices)",
7+
type: "action",
8+
version: "0.0.1",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: true,
13+
},
14+
props: {
15+
payrexx,
16+
},
17+
async run({ $ }) {
18+
const response = await this.payrexx.listInvoices({
19+
$,
20+
});
21+
22+
$.export("$summary", `Successfully fetched ${response.data?.length} invoices`);
23+
24+
return response;
25+
},
26+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import payrexx from "../../payrexx.app.mjs";
2+
3+
export default {
4+
key: "payrexx-remove-paylink",
5+
name: "Remove Paylink",
6+
description: "Remove a paylink. [See the documentation](https://developers.payrexx.com/reference/remove-a-paylink)",
7+
type: "action",
8+
version: "0.0.1",
9+
annotations: {
10+
destructiveHint: true,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
payrexx,
16+
paylinkId: {
17+
propDefinition: [
18+
payrexx,
19+
"paylinkId",
20+
],
21+
},
22+
},
23+
async run({ $ }) {
24+
const response = await this.payrexx.removePaylink({
25+
$,
26+
paylinkId: this.paylinkId,
27+
});
28+
29+
$.export("$summary", `Successfully removed paylink with ID ${this.paylinkId}.`);
30+
return response;
31+
},
32+
};

components/payrexx/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/payrexx",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Payrexx Components",
55
"main": "payrexx.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.1.0"
1417
}
15-
}
18+
}

0 commit comments

Comments
 (0)