paystack-sdk 2.5.24 → 2.5.27
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,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Authorization } from '../charge/interface';
|
|
2
|
+
import { Customer, CustomerSubAccount } from '../customer/interface';
|
|
2
3
|
import { Meta, QueryParams, Response } from '../interface';
|
|
4
|
+
import { SubAccount } from '../subaccounts/interface';
|
|
3
5
|
export interface SettlementQueryParams extends QueryParams {
|
|
4
6
|
subaccount?: string;
|
|
5
7
|
}
|
|
@@ -9,6 +11,8 @@ export interface Settlement {
|
|
|
9
11
|
settlement_date: Date;
|
|
10
12
|
domain: string;
|
|
11
13
|
total_amount: number;
|
|
14
|
+
total_processed: number;
|
|
15
|
+
total_fees: number;
|
|
12
16
|
status: string;
|
|
13
17
|
id: number;
|
|
14
18
|
createdAt: Date;
|
|
@@ -19,6 +23,8 @@ export interface ListSettlementsResponse extends Response {
|
|
|
19
23
|
data: Settlement[];
|
|
20
24
|
meta: Meta;
|
|
21
25
|
}
|
|
26
|
+
declare type CustomerType = Pick<Customer, 'id' | 'first_name' | 'last_name' | 'email' | 'phone' | 'metadata' | 'customer_code' | 'risk_action'>;
|
|
27
|
+
declare type SubAccountType = Pick<SubAccount, 'id' | 'subaccount_code' | 'business_name' | 'description' | 'primary_contact_name' | 'primary_contact_email' | 'primary_contact_phone' | 'metadata' | 'percentage_charge' | 'settlement_bank' | 'account_number'>;
|
|
22
28
|
export interface SettlementTransaction {
|
|
23
29
|
id: number;
|
|
24
30
|
reference: string;
|
|
@@ -31,6 +37,10 @@ export interface SettlementTransaction {
|
|
|
31
37
|
message?: string;
|
|
32
38
|
gateway_response: string;
|
|
33
39
|
fees: number;
|
|
40
|
+
metadata: Record<string, unknown>;
|
|
41
|
+
customer: CustomerType;
|
|
42
|
+
authorization: Authorization;
|
|
43
|
+
subaccount: SubAccountType;
|
|
34
44
|
}
|
|
35
45
|
export interface ListSettlementTransactionsResponse extends Response {
|
|
36
46
|
data: SettlementTransaction[];
|
|
@@ -38,3 +48,4 @@ export interface ListSettlementTransactionsResponse extends Response {
|
|
|
38
48
|
total_volume: number;
|
|
39
49
|
};
|
|
40
50
|
}
|
|
51
|
+
export {};
|
|
@@ -21,7 +21,7 @@ class Settlement {
|
|
|
21
21
|
}
|
|
22
22
|
transactions(id, queryParams) {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
return yield this.http.get(`/settlement/$
|
|
24
|
+
return yield this.http.get(`/settlement/${id}/transactions`, {
|
|
25
25
|
params: Object.assign({}, queryParams),
|
|
26
26
|
});
|
|
27
27
|
});
|
|
@@ -53,7 +53,7 @@ export interface CreateUpdateSubAccount {
|
|
|
53
53
|
*/
|
|
54
54
|
metadata?: string;
|
|
55
55
|
}
|
|
56
|
-
interface SubAccount {
|
|
56
|
+
export interface SubAccount {
|
|
57
57
|
id: number;
|
|
58
58
|
domain: string;
|
|
59
59
|
subaccount_code: string;
|
|
@@ -84,4 +84,3 @@ export interface ListSubAccountsResponse extends Response {
|
|
|
84
84
|
export interface FetchSubAccountResponse extends Response {
|
|
85
85
|
data: SubAccount;
|
|
86
86
|
}
|
|
87
|
-
export {};
|