Skip to content

Commit 4588167

Browse files
Refactor: Customer and SubAccount Type
Co-authored-by: Asaju Enitan Michael <16443589+tekpriest@users.noreply.github.com>
1 parent 19d8a5d commit 4588167

1 file changed

Lines changed: 23 additions & 22 deletions

File tree

src/settlement/interface.ts

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,30 @@ export interface ListSettlementsResponse extends Response {
2626
data: Settlement[];
2727
meta: Meta;
2828
}
29-
type CustomerResponse = Omit<Customer,
30-
'transactions' |
31-
'subscriptions' |
32-
'authorizations' |
33-
'domain' |
34-
'international_format_phone' |
35-
'integration' |
36-
'createdAt' |
37-
'updatedAt' |
38-
'identified' |
39-
'identifications' |
40-
'dedicated_account'
29+
type CustomerType = Pick<
30+
Customer,
31+
| 'id'
32+
| 'first_name'
33+
| 'last_name'
34+
| 'email'
35+
| 'phone'
36+
| 'metadata'
37+
| 'customer_code'
38+
| 'risk_action'
4139
>;
42-
type SubAccountResponse = Omit<SubAccount,
43-
'domain' |
44-
'is_verified' |
45-
'settlement_schedule' |
46-
'active' |
47-
'migrate' |
48-
'integration' |
49-
'createdAt' |
50-
'updatedAt' |
51-
'currency'
40+
type SubAccountType = Pick<
41+
SubAccount,
42+
| 'id'
43+
| 'subaccount_code'
44+
| 'business_name'
45+
| 'description'
46+
| 'primary_contact_name'
47+
| 'primary_contact_email'
48+
| 'primary_contact_phone'
49+
| 'metadata'
50+
| 'percentage_charge'
51+
| 'settlement_bank'
52+
| 'account_number'
5253
>;
5354
export interface SettlementTransaction {
5455
id: number;

0 commit comments

Comments
 (0)