-
Couldn't load subscription status.
- Fork 5.5k
Payrexx - new components #18622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Payrexx - new components #18622
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
components/payrexx/actions/create-gateway/create-gateway.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| }, | ||
| }; |
54 changes: 54 additions & 0 deletions
54
components/payrexx/actions/create-manual-payout/create-manual-payout.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
80
components/payrexx/actions/create-paylink/create-paylink.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
33
components/payrexx/actions/delete-gateway/delete-gateway.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| }, | ||
| }; |
35 changes: 35 additions & 0 deletions
35
components/payrexx/actions/delete-invoice/delete-invoice.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| 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", | ||
| (c) => ({ | ||
| merchantId: c.merchantId, | ||
| }), | ||
| ], | ||
| }, | ||
| }, | ||
| 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
26
components/payrexx/actions/list-invoices/list-invoices.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
32
components/payrexx/actions/remove-paylink/remove-paylink.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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": [ | ||
|
|
@@ -11,5 +11,8 @@ | |
| "author": "Pipedream <[email protected]> (https://pipedream.com/)", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "@pipedream/platform": "^3.1.0" | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.