-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing fields to the Account model #295
base: master
Are you sure you want to change the base?
Add missing fields to the Account model #295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks for doing this!
Some potential changes to consider, depending on @gnvk's preferences:
- change
BalanceAsof
toBalanceAsOf
(capital "O") -- this reads better, but might be considered inconsistent with the JSON field name - keep the
Options*
fields grouped together and thePending*
fields
I have added the suggested changes to the PR @gcatlin can you review ? |
@ankitsridhar16 Looks good. Thanks! |
Account
modelPendingTransferIn string `json:"pending_transfer_in"` | ||
PendingTransferOut string `json:"pending_transfer_out"` | ||
IntradayAdjustments string `json:"intraday_adjustments"` | ||
BalanceAsOf string `json:"balance_asof"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a date, so I'd recommend to use civil.Date
instead of a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add / extend a unit test. If you do so, you will realise that the newly added fields are always empty, even when the server returns non-empty values for them. To fix that you'll need to regenerate the easyjson code with make generate
.
I will check and ask if I have more doubts |
resolves #288