Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "method-node",
"version": "1.1.9",
"version": "1.1.10",
"description": "Node.js library for the Method API",
"main": "dist/index.ts",
"module": "dist/index.mjs",
Expand Down
1 change: 1 addition & 0 deletions src/resources/Account/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ export interface IAccountUpdate {
insurance?: IAccountLiabilityInsurance;
medical?: IAccountLiabilityMedical;
utility?: IAccountLiabilityUtility;
data_as_of: string | null;
error: IResourceError | null;
created_at: string;
updated_at: string;
Expand Down
9 changes: 9 additions & 0 deletions src/resources/Payment/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const PaymentStatuses = {
reversal_required: 'reversal_required',
reversal_processing: 'reversal_processing',
settled: 'settled',
cashed: 'cashed',
} as const;

export type TPaymentStatuses = keyof typeof PaymentStatuses;
Expand Down Expand Up @@ -42,6 +43,13 @@ export const PaymentFeeTypes = {

export type TPaymentFeeTypes = keyof typeof PaymentFeeTypes;

export const PaymentDestinationPaymentMethods = {
paper: 'paper',
electronic: 'electronic',
} as const;

export type TPaymentDestinationPaymentMethods = keyof typeof PaymentDestinationPaymentMethods;

export interface IPaymentFee {
type: TPaymentFeeTypes;
amount: number;
Expand All @@ -65,6 +73,7 @@ export interface IPayment {
destination_settlement_date: string | null;
source_status: TPaymentStatuses;
destination_status: TPaymentStatuses;
destination_payment_method?: TPaymentDestinationPaymentMethods | null;
fee: IPaymentFee | null
type: TPaymentTypes;
created_at: string;
Expand Down
7 changes: 6 additions & 1 deletion test/resources/Account.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ describe('Accounts - core methods tests', () => {
holder_id: holder_1_response.id,
"liability.type": 'credit_card',
"liability.mch_id": "mch_302086",
"status": "active",
}))[0];

test_auto_loan_account = (await client.accounts.list({
holder_id: holder_1_response.id,
"liability.type": 'auto_loan',
"liability.mch_id": "mch_2347",
"status": "active",
}))[0];
});

Expand Down Expand Up @@ -850,6 +852,7 @@ describe('Accounts - core methods tests', () => {
credit_limit: null,
usage_pattern: null
},
data_as_of: null,
error: null,
created_at: create_updates_response.created_at,
updated_at: create_updates_response.updated_at
Expand Down Expand Up @@ -890,6 +893,7 @@ describe('Accounts - core methods tests', () => {
credit_limit: 2800000,
usage_pattern: null
},
data_as_of: null,
error: null,
created_at: retrieve_updates_response.created_at,
updated_at: retrieve_updates_response.updated_at
Expand Down Expand Up @@ -925,6 +929,7 @@ describe('Accounts - core methods tests', () => {
credit_limit: 2800000,
usage_pattern: null
},
data_as_of: null,
error: null,
created_at: update_to_check?.created_at || '',
updated_at: update_to_check?.updated_at || ''
Expand Down