Skip to content
Permalink
Browse files
Correctly unmarshal the CreateAccountResponse (#80)
Fixes #78
  • Loading branch information
Sander van Harmelen committed Sep 24, 2017
1 parent 646dded commit bc58c87e98815c5bc08d8913a072d77ee280a7ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
@@ -206,6 +206,10 @@ func (s *AccountService) CreateAccount(p *CreateAccountParams) (*CreateAccountRe
return nil, err
}

if resp, err = getRawValue(resp); err != nil {
return nil, err
}

var r CreateAccountResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
@@ -1060,7 +1060,7 @@ func (s *service) generateNewAPICallFunc(a *API) {
pn(" }")
pn("")
switch n {
case "CreateNetwork", "CreateNetworkOffering", "CreateSecurityGroup", "CreateServiceOffering", "CreateSSHKeyPair", "RegisterSSHKeyPair":
case "CreateAccount", "CreateNetwork", "CreateNetworkOffering", "CreateSecurityGroup", "CreateServiceOffering", "CreateSSHKeyPair", "RegisterSSHKeyPair":
pn(" if resp, err = getRawValue(resp); err != nil {")
pn(" return nil, err")
pn(" }")

0 comments on commit bc58c87

Please sign in to comment.