forked from tekpriest/paystack-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.ts
More file actions
92 lines (86 loc) · 2.02 KB
/
interface.ts
File metadata and controls
92 lines (86 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { Response } from '../interface';
export interface CreateUpdateSubAccount {
/**
* Name of business for subaccount
*/
business_name: string;
/**
* Bank Code for the bank.
* You can get the list of Bank Codes by calling the List Banks endpoint.
*/
settlement_bank: string;
/**
* Bank Account Number
*/
account_number: string;
/**
* The default percentage charged when
* receiving on behalf of this subaccount
*/
percentage_charge: number;
/**
* A description for this subaccount
*/
description: string;
/**
* A name for the contact person for this subaccoun
*/
primary_contact_name?: string;
/**
* A contact email for the subaccount
*/
primary_contact_email?: string;
/**
* A phone number to call for this subaccount
*/
primary_contact_phone?: string;
/**
* Stringified JSON object.
* Add a custom_fields attribute which has an
* array of objects if you would like the
* fields to be added to your transaction
* when displayed on the dashboard.
* Sample:
* {
* "custom_fields": [
* {
* "display_name":"Cart ID",
* "variable_name": "cart_id",
* "value": "8393"
* }
* ]
* }
*/
metadata?: string;
}
export interface SubAccount {
id: number;
domain: string;
subaccount_code: string;
business_name: string;
description?: string;
primary_contact_name?: string;
primary_contact_email?: string;
primary_contact_phone?: string;
metadata: Record<string, unknown>;
percentage_charge: number;
is_verified: boolean;
settlement_bank: string;
account_number: string;
settlement_schedule: string;
active: boolean;
migrate: boolean;
integration: number;
createdAt: Date;
updatedAt: Date;
currency: string;
}
export interface SubAccountCreatedUpdateResponse extends Response {
data: SubAccount;
}
export interface ListSubAccountsResponse extends Response {
data: SubAccount[];
}
export interface FetchSubAccountResponse extends Response {
data: SubAccount;
}