Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use enum constants for GetAccountActivitiesRequest.Category #290

Open
gcatlin opened this issue Jul 2, 2024 · 0 comments
Open

Use enum constants for GetAccountActivitiesRequest.Category #290

gcatlin opened this issue Jul 2, 2024 · 0 comments
Labels
v4 Backward incompatible change that can added in the next major version

Comments

@gcatlin
Copy link
Contributor

gcatlin commented Jul 2, 2024

For example:

type AccountActivityCategory string

const (
    TradeActivity    AccountActivityCategory = "trade_activity"
    NonTradeActivity AccountActivityCategory = "non_trade_activity"
)
type GetAccountActivitiesRequest struct {
	ActivityTypes []string  `json:"activity_types"`
	Date          time.Time `json:"date"`
	Until         time.Time `json:"until"`
	After         time.Time `json:"after"`
	Direction     string    `json:"direction"`
	PageSize      int       `json:"page_size"`
	PageToken     string    `json:"page_token"`
	Category      AccountActivityCategory    `json:"category"`  // changed from type `string`
}

GetAccountActivitiesRequest
API Reference: Retrieve Account Activities

@gcatlin gcatlin changed the title Use enum constants for GetAccountActivitiesRequest.Category: TradeActivity, NonTradeActivity Use enum constants for GetAccountActivitiesRequest.Category Jul 2, 2024
@gnvk gnvk added the v4 Backward incompatible change that can added in the next major version label Jul 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
v4 Backward incompatible change that can added in the next major version
Projects
None yet
Development

No branches or pull requests

2 participants