Skip to content

Commit

Permalink
feat: add team id to list wallet transactions request
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingBoulderingRepeat committed Sep 22, 2023
1 parent bc5d5af commit 5c4ec45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client_wallettransactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"net/url"
"strconv"
"time"
)

Expand All @@ -14,6 +15,7 @@ type ListWalletTransactionsRequest struct {
FromDate *time.Time
// ToDate allows to filter to retrieve transactions where [WalletTransaction.CreatedAt] <= ToDate.
ToDate *time.Time
TeamID *int64
}

// ListWalletTransactionsResponse is the response output from the [Client.ListWalletTransactions] method.
Expand All @@ -38,6 +40,9 @@ func (c *clientImpl) ListWalletTransactions(
if request.ToDate != nil {
query.Set("toDate", request.ToDate.UTC().Format(time.RFC3339))
}
if request.TeamID != nil {
query.Set("teamId", strconv.Itoa(int(*request.TeamID)))
}
return doGet[ListWalletTransactionsResponse](ctx, c, path, query)
}

Expand Down

0 comments on commit 5c4ec45

Please sign in to comment.