paystack-sdk 3.6.1 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Axios } from 'axios';
|
|
2
|
-
import { CreateDedicatedVirtualAccount, DeactivateDedicatedAccountResponse, DedicatedAccountCreatedResponse, FetchBankProvidersResponse, FetchDedicatedVirtualAccountResponse, ListDedicatedVirtualAccountsQueryParams, ListDedicatedVirtualAccountsResponse, RemoveSplitDedicatedAccountResponse, SplitDedicatedAccountTransaction, SplitDedicatedAccountTransactionResponse } from './interface';
|
|
2
|
+
import { AssignDedicatedVirtualAccount, CreateDedicatedVirtualAccount, DeactivateDedicatedAccountResponse, DedicatedAccountAssignedResponse, DedicatedAccountCreatedResponse, FetchBankProvidersResponse, FetchDedicatedVirtualAccountResponse, ListDedicatedVirtualAccountsQueryParams, ListDedicatedVirtualAccountsResponse, RemoveSplitDedicatedAccountResponse, SplitDedicatedAccountTransaction, SplitDedicatedAccountTransactionResponse } from './interface';
|
|
3
3
|
interface BadRequest {
|
|
4
4
|
status: boolean;
|
|
5
5
|
message: string;
|
|
@@ -8,6 +8,7 @@ export declare class DedicatedAccount {
|
|
|
8
8
|
http: Axios;
|
|
9
9
|
constructor(http: Axios);
|
|
10
10
|
create(data: CreateDedicatedVirtualAccount): Promise<DedicatedAccountCreatedResponse | BadRequest>;
|
|
11
|
+
assign(data: AssignDedicatedVirtualAccount): Promise<DedicatedAccountAssignedResponse | BadRequest>;
|
|
11
12
|
list(queryParams: ListDedicatedVirtualAccountsQueryParams): Promise<ListDedicatedVirtualAccountsResponse | BadRequest>;
|
|
12
13
|
fetch(dedicatedAccountId: string): Promise<FetchDedicatedVirtualAccountResponse | BadRequest>;
|
|
13
14
|
deactivate(dedicatedAccountId: string): Promise<DeactivateDedicatedAccountResponse | BadRequest>;
|
|
@@ -8,6 +8,9 @@ class DedicatedAccount {
|
|
|
8
8
|
async create(data) {
|
|
9
9
|
return await this.http.post('/dedicated_account', JSON.stringify(data));
|
|
10
10
|
}
|
|
11
|
+
async assign(data) {
|
|
12
|
+
return await this.http.post('/dedicated_account/assign', JSON.stringify(data));
|
|
13
|
+
}
|
|
11
14
|
async list(queryParams) {
|
|
12
15
|
return await this.http.get('/dedicated_account', {
|
|
13
16
|
params: { ...queryParams },
|
|
@@ -29,6 +29,22 @@ export interface CreateDedicatedVirtualAccount {
|
|
|
29
29
|
last_name?: string;
|
|
30
30
|
phone?: string;
|
|
31
31
|
}
|
|
32
|
+
export interface AssignDedicatedVirtualAccount {
|
|
33
|
+
email: string;
|
|
34
|
+
first_name: string;
|
|
35
|
+
last_name: string;
|
|
36
|
+
phone: string;
|
|
37
|
+
preferred_bank: string;
|
|
38
|
+
country: 'NG' | 'GH';
|
|
39
|
+
account_number?: string;
|
|
40
|
+
bvn?: string;
|
|
41
|
+
bank_code?: string;
|
|
42
|
+
subaccount?: string;
|
|
43
|
+
split_code?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface DedicatedAccountAssignedResponse extends Response {
|
|
46
|
+
data: AssignDedicatedVirtualAccount;
|
|
47
|
+
}
|
|
32
48
|
export interface ListDedicatedVirtualAccountsQueryParams {
|
|
33
49
|
active: boolean;
|
|
34
50
|
currency: string;
|
package/dist/misc/interface.d.ts
CHANGED