Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions components/payrexx/actions/create-gateway/create-gateway.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import payrexx from "../../payrexx.app.mjs";

export default {
key: "payrexx-create-gateway",
name: "Create Gateway",
description: "Create a new gateway. [See the documentation](https://developers.payrexx.com/reference/create-a-gateway)",
type: "action",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
payrexx,
amount: {
propDefinition: [
payrexx,
"amount",
],
},
currency: {
propDefinition: [
payrexx,
"currency",
],
},
sku: {
propDefinition: [
payrexx,
"sku",
],
},
purpose: {
propDefinition: [
payrexx,
"purpose",
],
},
vatRate: {
propDefinition: [
payrexx,
"vatRate",
],
},
},
async run({ $ }) {
const response = await this.payrexx.createGateway({
$,
data: {
amount: this.amount,
currency: this.currency,
sku: this.sku,
purpose: this.purpose,
vatRate: this.vatRate,
},
});

$.export("$summary", `Successfully created gateway with ID: ${response.data[0]?.id}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import payrexx from "../../payrexx.app.mjs";

export default {
key: "payrexx-create-manual-payout",
name: "Create Manual Payout",
description: "Create a manual payout. [See the documentation](https://developers.payrexx.com/reference/create-manual-payout)",
type: "action",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
payrexx,
amount: {
propDefinition: [
payrexx,
"amount",
],
},
currency: {
propDefinition: [
payrexx,
"currency",
],
},
pspId: {
type: "string",
label: "PSP ID",
description: "ID of the PSP from which the payout is to be triggered. 44 for Swiss Collecting and 36 for Payrexx Direct",
},
statementDescriptor: {
type: "string",
label: "Statement Descriptor",
description: "Statement of the payout. Visible in bank statement.",
optional: true,
},
},
async run({ $ }) {
const response = await this.payrexx.createManualPayout({
$,
data: {
amount: this.amount,
currency: this.currency,
pspId: this.pspId,
statementDescriptor: this.statementDescriptor,
},
});

$.export("$summary", `Successfully created manual payout with ID: ${response.data[0]?.id}`);
return response;
},
};
80 changes: 80 additions & 0 deletions components/payrexx/actions/create-paylink/create-paylink.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import payrexx from "../../payrexx.app.mjs";

export default {
key: "payrexx-create-paylink",
name: "Create Paylink",
description: "Create a paylink. [See the documentation](https://developers.payrexx.com/reference/create-a-paylink)",
type: "action",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
payrexx,
title: {
type: "string",
label: "Title",
description: "This is the page title which will be shown on the payment page",
},
description: {
type: "string",
label: "Description",
description: "This is a description which will be shown on the payment page",
},
referenceId: {
type: "string",
label: "Reference ID",
description: "An internal reference id used by your system",
},
purpose: {
propDefinition: [
payrexx,
"purpose",
],
},
amount: {
propDefinition: [
payrexx,
"amount",
],
},
currency: {
propDefinition: [
payrexx,
"currency",
],
},
vatRate: {
propDefinition: [
payrexx,
"vatRate",
],
},
sku: {
propDefinition: [
payrexx,
"sku",
],
},
},
async run({ $ }) {
const response = await this.payrexx.createPaylink({
$,
data: {
title: this.title,
description: this.description,
referenceId: this.referenceId,
purpose: this.purpose,
amount: this.amount,
currency: this.currency,
vatRate: this.vatRate,
sku: this.sku,
},
});

$.export("$summary", `Successfully created paylink with ID: ${response.data[0]?.id}`);
return response;
},
};
33 changes: 33 additions & 0 deletions components/payrexx/actions/delete-gateway/delete-gateway.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import payrexx from "../../payrexx.app.mjs";

export default {
key: "payrexx-delete-gateway",
name: "Delete Gateway",
description: "Delete a gateway. [See the documentation](https://developers.payrexx.com/reference/delete-a-gateway)",
type: "action",
version: "0.0.1",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
props: {
payrexx,
gatewayId: {
propDefinition: [
payrexx,
"gatewayId",
],
},
},
async run({ $ }) {
const response = await this.payrexx.deleteGateway({
$,
gatewayId: this.gatewayId,
});

$.export("$summary", `Successfully deleted gateway with ID ${this.gatewayId}.`);

return response;
},
};
32 changes: 32 additions & 0 deletions components/payrexx/actions/delete-invoice/delete-invoice.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import payrexx from "../../payrexx.app.mjs";

export default {
key: "payrexx-delete-invoice",
name: "Delete Invoice",
description: "Delete an invoice. [See the documentation](https://payrexxserviceapi.readme.io/reference/delete-an-invoice)",
type: "action",
version: "0.0.1",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
props: {
payrexx,
invoiceId: {
propDefinition: [
payrexx,
"invoiceId",
],
},
},
async run({ $ }) {
const response = await this.payrexx.deleteInvoice({
$,
invoiceId: this.invoiceId,
});

$.export("$summary", `Successfully deleted invoice with ID ${this.invoiceId}.`);
return response;
},
};
26 changes: 26 additions & 0 deletions components/payrexx/actions/list-invoices/list-invoices.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import payrexx from "../../payrexx.app.mjs";

export default {
key: "payrexx-list-invoices",
name: "List Invoices",
description: "List all invoices for a merchant. [See the documentation](https://payrexxserviceapi.readme.io/reference/list-all-invoices)",
type: "action",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
payrexx,
},
async run({ $ }) {
const response = await this.payrexx.listInvoices({
$,
});

$.export("$summary", `Successfully fetched ${response.data?.length} invoices`);

return response;
},
};
32 changes: 32 additions & 0 deletions components/payrexx/actions/remove-paylink/remove-paylink.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import payrexx from "../../payrexx.app.mjs";

export default {
key: "payrexx-remove-paylink",
name: "Remove Paylink",
description: "Remove a paylink. [See the documentation](https://developers.payrexx.com/reference/remove-a-paylink)",
type: "action",
version: "0.0.1",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
props: {
payrexx,
paylinkId: {
propDefinition: [
payrexx,
"paylinkId",
],
},
},
async run({ $ }) {
const response = await this.payrexx.removePaylink({
$,
paylinkId: this.paylinkId,
});

$.export("$summary", `Successfully removed paylink with ID ${this.paylinkId}.`);
return response;
},
};
7 changes: 5 additions & 2 deletions components/payrexx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/payrexx",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream Payrexx Components",
"main": "payrexx.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.1.0"
}
}
}
Loading
Loading