Skip to content

Commit

Permalink
Merge branch 'master' into compay
Browse files Browse the repository at this point in the history
  • Loading branch information
semihshn committed Mar 20, 2024
2 parents 84006b0 + 7a45097 commit c4f19e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions adapter/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,8 @@ type SearchPayoutCompletedTransactionsRequest struct {
SettlementType SettlementType `schema:"settlementType,omitempty"`
StartDate time.Time `schema:"startDate,omitempty"`
EndDate time.Time `schema:"endDate,omitempty"`
Page int `schema:"page"`
Size int `schema:"size"`
}

type SearchPayoutBouncedTransactionsRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion adapter/settlement_reporting.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type SettlementReporting struct {
}

func (api *SettlementReporting) SearchPayoutCompletedTransactions(ctx context.Context, request SearchPayoutCompletedTransactionsRequest) (*DataResponse[SearchPayoutCompletedTransactionsResponse], error) {
newRequest, err := api.Client.NewRequest(ctx, http.MethodGet, "/settlement-reporting/v1/settlement-file/payout-completed-transactions", request)
newRequest, err := api.Client.NewRequest(ctx, http.MethodGet, "/settlement-reporting/v2/settlement-file/payout-completed-transactions", request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 2 additions & 0 deletions tests/settlement_reporting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ func TestSettlementReporting_SearchPayoutCompletedTransactions(t *testing.T) {
request := adapter.SearchPayoutCompletedTransactionsRequest{
StartDate: time.Now().AddDate(0, 0, -180),
EndDate: time.Now(),
Page: 0,
Size: 10,
}

res, err := settlementReportingClient.SettlementReporting.SearchPayoutCompletedTransactions(context.Background(), request)
Expand Down

0 comments on commit c4f19e6

Please sign in to comment.