really fix account_set

This commit is contained in:
Niko Storni 2019-06-12 05:23:48 +02:00
parent 3335233566
commit 6226c2690d

View file

@ -159,7 +159,15 @@ type AccountSettings struct {
func (d *Client) AccountSet(accountID string, settings AccountSettings) (*Account, error) {
response := new(Account)
return response, d.call(response, "account_set", map[string]interface{}{})
args := struct {
AccountID string `json:"account_id"`
AccountSettings `json:",flatten"`
}{
AccountID: accountID,
AccountSettings: settings,
}
structs.DefaultTagName = "json"
return response, d.call(response, "account_set", structs.Map(args))
}
func (d *Client) AccountBalance(account *string) (*AccountBalanceResponse, error) {