diff --git a/samples/settlementReporting/SearchSettlementPayoutCompletedTransactions.js b/samples/settlementReporting/SearchSettlementPayoutCompletedTransactions.js index 5f6aba4..0565c00 100644 --- a/samples/settlementReporting/SearchSettlementPayoutCompletedTransactions.js +++ b/samples/settlementReporting/SearchSettlementPayoutCompletedTransactions.js @@ -19,7 +19,9 @@ function createDate(days, hours, minutes, seconds) { const request = { settlementType: Craftgate.Model.SettlementType.SETTLEMENT, startDate: createDate(-1, 0, 0, 0), - endDate: createDate(-1, 23, 59, 59) + endDate: createDate(-1, 23, 59, 59), + page: 0, + size: 10 }; craftgate.settlementReporting().searchPayoutCompletedTransactions(request) diff --git a/src/adapter/SettlementReportingAdapter.ts b/src/adapter/SettlementReportingAdapter.ts index ba2383b..0780152 100644 --- a/src/adapter/SettlementReportingAdapter.ts +++ b/src/adapter/SettlementReportingAdapter.ts @@ -17,7 +17,7 @@ export default class SettlementReportingAdapter extends BaseAdapter { } async searchPayoutCompletedTransactions(request: SearchPayoutCompletedTransactionsRequest): Promise { - return this._client.get('/settlement-reporting/v1/settlement-file/payout-completed-transactions', request); + return this._client.get('/settlement-reporting/v2/settlement-file/payout-completed-transactions', request); } async searchBouncedPayoutTransactions(request: SearchPayoutBouncedTransactionsRequest): Promise { diff --git a/src/request/SearchPayoutCompletedTransactionsRequest.ts b/src/request/SearchPayoutCompletedTransactionsRequest.ts index 2c2d5fd..7f7060d 100644 --- a/src/request/SearchPayoutCompletedTransactionsRequest.ts +++ b/src/request/SearchPayoutCompletedTransactionsRequest.ts @@ -5,6 +5,8 @@ type SearchPayoutCompletedTransactionsRequest = { settlementType?: SettlementType; endDate: Date; startDate: Date; + page?: number; + size?: number; }; export default SearchPayoutCompletedTransactionsRequest; diff --git a/src/response/PayoutCompletedTransactionListResponse.ts b/src/response/PayoutCompletedTransactionListResponse.ts index 2580c3f..eb7f8de 100644 --- a/src/response/PayoutCompletedTransactionListResponse.ts +++ b/src/response/PayoutCompletedTransactionListResponse.ts @@ -2,6 +2,9 @@ import PayoutCompletedTransaction from './dto/PayoutCompletedTransaction'; type PayoutCompletedTransactionListResponse = { items: PayoutCompletedTransaction[]; + page: number; + size: number; + totalSize: number; }; export default PayoutCompletedTransactionListResponse;