Skip to content

Commit 17dd6a4

Browse files
Merging pull request #16551
* add export transaction action * update package.json version and run linter * fix component versions * add missing await * updates * pnpm-lock.yaml --------- Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
1 parent 3d80910 commit 17dd6a4

File tree

8 files changed

+60
-6
lines changed

8 files changed

+60
-6
lines changed

components/paystack/actions/charge-authorization/charge-authorization.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "paystack-charge-authorization",
55
name: "Charge Authorization",
66
description: "Charge a reusable authorization. [See the documentation](https://paystack.com/docs/api/transaction/#charge-authorization)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
props: {
1010
paystack,
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import paystack from "../../paystack.app.mjs";
2+
3+
export default {
4+
key: "paystack-export-transactions",
5+
name: "Export Transactions",
6+
description: "Export transactions from Paystack. See the documentation (https://paystack.com/docs/api/transaction/#export)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
paystack,
11+
from: {
12+
propDefinition: [
13+
paystack,
14+
"from",
15+
],
16+
optional: true,
17+
},
18+
to: {
19+
propDefinition: [
20+
paystack,
21+
"to",
22+
],
23+
optional: true,
24+
},
25+
status: {
26+
propDefinition: [
27+
paystack,
28+
"status",
29+
],
30+
optional: true,
31+
},
32+
},
33+
async run({ $ }) {
34+
const params = {
35+
from: this.from,
36+
to: this.to,
37+
status: this.status,
38+
};
39+
40+
const response = await this.paystack.exportTransactions({
41+
$,
42+
params,
43+
});
44+
45+
$.export("$summary", "Successfully requested transaction export");
46+
return response;
47+
},
48+
};

components/paystack/actions/fetch-transaction/fetch-transaction.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "paystack-fetch-transaction",
55
name: "Fetch Transaction",
66
description: "Fetch a single transaction. [See the documentation](https://paystack.com/docs/api/transaction/#fetch)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
paystack,

components/paystack/actions/initialize-transaction/initialize-transaction.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "paystack-initialize-transaction",
55
name: "Initialize Transaction",
66
description: "Initializes a new transaction on Paystack. [See the documentation](https://paystack.com/docs/api/transaction/#initialize)",
7-
version: "0.1.1",
7+
version: "0.1.2",
88
type: "action",
99
props: {
1010
paystack,

components/paystack/actions/list-transactions/list-transactions.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "paystack-list-transactions",
55
name: "List Transactions",
66
description: "List transactions carried out on your integration. [See the documentation](https://paystack.com/docs/api/transaction/#list)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
paystack,

components/paystack/actions/verify-transaction/verify-transaction.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "paystack-verify-transaction",
55
name: "Verify Transaction",
66
description: "Confirm the status of a transaction. [See the documentation](https://paystack.com/docs/api/transaction/#verify)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
paystack,

components/paystack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/paystack",
3-
"version": "0.2.1",
3+
"version": "0.3.0",
44
"description": "Pipedream Paystack Components",
55
"main": "paystack.app.mjs",
66
"keywords": [

components/paystack/paystack.app.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,12 @@ export default {
240240
...args,
241241
});
242242
},
243+
exportTransactions(args = {}) {
244+
return this._makeRequest({
245+
path: "/transaction/export",
246+
...args,
247+
});
248+
},
243249
async *paginate({
244250
resourceFn, args, max,
245251
}) {

0 commit comments

Comments
 (0)