Created
May 27, 2017 07:06
-
-
Save yashke/778b08e15240b868427603f6fec2beed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type serializedAccountBalance struct { | |
AccountId string `json:"accountId"` | |
BalanceInCents int64 `json:"balanceInCents"` | |
BalanceCurrency string `json:"balanceCurrency"` | |
LastDay time.Time `json:"lastDay"` | |
} | |
func serializeAccountBalance(accountBalance AccountBalance) (serializedAccountBalance) { | |
serialized := serializedAccountBalance{} | |
serialized.AccountId = accountBalance.AccountId | |
serialized.BalanceInCents = accountBalance.BalanceInCents | |
serialized.BalanceCurrency = accountBalance.BalanceCurrency | |
serialized.LastDay = accountBalance.LastDay | |
return serialized | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment