Skip to content

Commit cff5519

Browse files
Generate version 0.5.1
1 parent 893357b commit cff5519

244 files changed

Lines changed: 21479 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
wwwroot/*.js
2+
node_modules
3+
typings
4+
dist

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/FILES

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.gitignore
2+
.npmignore
3+
README.md
4+
package.json
5+
src/apis/Balance.ts
6+
src/apis/BulkCharge.ts
7+
src/apis/Charge.ts
8+
src/apis/Customer.ts
9+
src/apis/DedicatedNUBAN.ts
10+
src/apis/Dispute.ts
11+
src/apis/Integration.ts
12+
src/apis/Page.ts
13+
src/apis/PaymentRequest.ts
14+
src/apis/Plan.ts
15+
src/apis/Product.ts
16+
src/apis/Refund.ts
17+
src/apis/Settlement.ts
18+
src/apis/Split.ts
19+
src/apis/Subaccount.ts
20+
src/apis/Subscription.ts
21+
src/apis/Transaction.ts
22+
src/apis/Transfer.ts
23+
src/apis/TransferRecipient.ts
24+
src/apis/Verification.ts
25+
src/apis/index.ts
26+
src/index.ts
27+
src/models/Bank.ts
28+
src/models/BulkChargeInitiate.ts
29+
src/models/ChargeCreate.ts
30+
src/models/ChargeSubmitAddress.ts
31+
src/models/ChargeSubmitBirthday.ts
32+
src/models/ChargeSubmitOTP.ts
33+
src/models/ChargeSubmitPhone.ts
34+
src/models/ChargeSubmitPin.ts
35+
src/models/CustomerCreate.ts
36+
src/models/CustomerDeactivateAuthorization.ts
37+
src/models/CustomerRiskAction.ts
38+
src/models/CustomerUpdate.ts
39+
src/models/CustomerValidate.ts
40+
src/models/CustomerValidation.ts
41+
src/models/DedicatedNubanCreate.ts
42+
src/models/DedicatedNubanSplit.ts
43+
src/models/DisputeEvidence.ts
44+
src/models/DisputeResolve.ts
45+
src/models/DisputeUpdate.ts
46+
src/models/EFT.ts
47+
src/models/MobileMoney.ts
48+
src/models/ModelError.ts
49+
src/models/PageCreate.ts
50+
src/models/PageProduct.ts
51+
src/models/PageUpdate.ts
52+
src/models/PaymentRequestCreate.ts
53+
src/models/PaymentRequestUpdate.ts
54+
src/models/PlanCreate.ts
55+
src/models/PlanUpdate.ts
56+
src/models/ProductCreate.ts
57+
src/models/ProductUpdate.ts
58+
src/models/RefundCreate.ts
59+
src/models/Response.ts
60+
src/models/SplitCreate.ts
61+
src/models/SplitSubaccounts.ts
62+
src/models/SplitUpdate.ts
63+
src/models/SubaccountCreate.ts
64+
src/models/SubaccountUpdate.ts
65+
src/models/SubscriptionCreate.ts
66+
src/models/SubscriptionToggle.ts
67+
src/models/TransactionChargeAuthorization.ts
68+
src/models/TransactionCheckAuthorization.ts
69+
src/models/TransactionInitialize.ts
70+
src/models/TransactionPartialDebit.ts
71+
src/models/TransferBulk.ts
72+
src/models/TransferFinalize.ts
73+
src/models/TransferFinalizeDisableOTP.ts
74+
src/models/TransferInitiate.ts
75+
src/models/TransferRecipientBulk.ts
76+
src/models/TransferRecipientCreate.ts
77+
src/models/TransferRecipientUpdate.ts
78+
src/models/TransferResendOTP.ts
79+
src/models/USSD.ts
80+
src/models/VerificationBVNMatch.ts
81+
src/models/index.ts
82+
src/runtime.ts
83+
tsconfig.json

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.2.1

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1-
# paystack-node
1+
## paystack
2+
3+
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4+
5+
Environment
6+
* Node.js
7+
* Webpack
8+
* Browserify
9+
10+
Language level
11+
* ES5 - you must have a Promises/A+ library installed
12+
* ES6
13+
14+
Module system
15+
* CommonJS
16+
* ES6 module system
17+
18+
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
19+
20+
### Building
21+
22+
To build and compile the typescript sources to javascript use:
23+
```
24+
npm install
25+
npm run build
26+
```
27+
28+
### Consuming
29+
30+
navigate to the folder of your consuming project and run one of the following commands.
31+
32+
33+
```
34+
npm install paystack --save
35+
```

lib/apis/Balance.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Paystack
3+
* The OpenAPI specification of the Paystack API that merchants and developers can harness to build financial solutions in Africa.
4+
*
5+
* The version of the Paystack Node library: 1.0.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
import { BaseAPI } from '../runtime';
13+
import { Response } from '../models';
14+
export interface LedgerRequest {
15+
perPage?: number;
16+
page?: number;
17+
from?: Date;
18+
to?: Date;
19+
}
20+
/**
21+
*
22+
*/
23+
export declare class Balance extends BaseAPI {
24+
/**
25+
* You can only transfer from what you have
26+
* Fetch Balance
27+
*/
28+
fetch(): Promise<Response>;
29+
/**
30+
* Balance Ledger
31+
*/
32+
ledger(requestParameters: LedgerRequest): Promise<Response>;
33+
}

lib/apis/Balance.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
"use strict";
2+
/* tslint:disable */
3+
/* eslint-disable */
4+
/**
5+
* Paystack
6+
* The OpenAPI specification of the Paystack API that merchants and developers can harness to build financial solutions in Africa.
7+
*
8+
* The version of the Paystack Node library: 1.0.0
9+
*
10+
*
11+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12+
* https://openapi-generator.tech
13+
* Do not edit the class manually.
14+
*/
15+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17+
return new (P || (P = Promise))(function (resolve, reject) {
18+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21+
step((generator = generator.apply(thisArg, _arguments || [])).next());
22+
});
23+
};
24+
Object.defineProperty(exports, "__esModule", { value: true });
25+
exports.Balance = void 0;
26+
const runtime_1 = require("../runtime");
27+
const models_1 = require("../models");
28+
/**
29+
*
30+
*/
31+
class Balance extends runtime_1.BaseAPI {
32+
/**
33+
* You can only transfer from what you have
34+
* Fetch Balance
35+
*/
36+
fetch() {
37+
return __awaiter(this, void 0, void 0, function* () {
38+
const queryParameters = {};
39+
const response = yield this.request({
40+
path: `/balance`,
41+
method: 'GET',
42+
query: queryParameters,
43+
});
44+
return models_1.ResponseFromJSON(response);
45+
});
46+
}
47+
/**
48+
* Balance Ledger
49+
*/
50+
ledger(requestParameters) {
51+
return __awaiter(this, void 0, void 0, function* () {
52+
const queryParameters = {};
53+
if (requestParameters.perPage !== undefined) {
54+
queryParameters['perPage'] = requestParameters.perPage;
55+
}
56+
if (requestParameters.page !== undefined) {
57+
queryParameters['page'] = requestParameters.page;
58+
}
59+
if (requestParameters.from !== undefined) {
60+
queryParameters['from'] = requestParameters.from.toISOString();
61+
}
62+
if (requestParameters.to !== undefined) {
63+
queryParameters['to'] = requestParameters.to.toISOString();
64+
}
65+
const response = yield this.request({
66+
path: `/balance/ledger`,
67+
method: 'GET',
68+
query: queryParameters,
69+
});
70+
return models_1.ResponseFromJSON(response);
71+
});
72+
}
73+
}
74+
exports.Balance = Balance;

lib/apis/BulkCharge.d.ts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Paystack
3+
* The OpenAPI specification of the Paystack API that merchants and developers can harness to build financial solutions in Africa.
4+
*
5+
* The version of the Paystack Node library: 1.0.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
import { BaseAPI } from '../runtime';
13+
import { Response } from '../models';
14+
export interface ChargesRequest {
15+
code: string;
16+
}
17+
export interface FetchRequest {
18+
code: string;
19+
}
20+
export interface ListRequest {
21+
perPage?: number;
22+
page?: number;
23+
from?: Date;
24+
to?: Date;
25+
}
26+
export interface PauseRequest {
27+
code: string;
28+
}
29+
export interface ResumeRequest {
30+
code: string;
31+
}
32+
/**
33+
*
34+
*/
35+
export declare class BulkCharge extends BaseAPI {
36+
/**
37+
* Fetch Charges in a Batch
38+
*/
39+
charges(requestParameters: ChargesRequest): Promise<Response>;
40+
/**
41+
* Fetch Bulk Charge Batch
42+
*/
43+
fetch(requestParameters: FetchRequest): Promise<Response>;
44+
/**
45+
* Initiate Bulk Charge
46+
*/
47+
initiate(): Promise<Response>;
48+
/**
49+
* List Bulk Charge Batches
50+
*/
51+
list(requestParameters: ListRequest): Promise<Response>;
52+
/**
53+
* Pause Bulk Charge Batch
54+
*/
55+
pause(requestParameters: PauseRequest): Promise<Response>;
56+
/**
57+
* Resume Bulk Charge Batch
58+
*/
59+
resume(requestParameters: ResumeRequest): Promise<Response>;
60+
}

0 commit comments

Comments
 (0)