Skip to content

Commit 6807728

Browse files
committed
PUT doesn't return response body
1 parent 6429104 commit 6807728

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

crm/accounts_put.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ import (
1010

1111
// POST
1212

13-
func (s *Service) AccountsPut(body *AccountsPutBody, ctx context.Context) (*AccountsPutResponse, error) {
13+
func (s *Service) AccountsPut(body *AccountsPutBody, ctx context.Context) error {
1414
method := http.MethodPut
15-
responseBody := s.NewAccountsPutResponse()
1615
path := s.rest.SubPathWithID(AccountsEndpoint, body.ID.String())
1716

1817
// create a new HTTP request
1918
httpReq, err := s.rest.NewRequest(ctx, method, path, body)
2019
if err != nil {
21-
return nil, err
20+
return err
2221
}
2322

2423
// submit the request
25-
_, err = s.rest.Do(httpReq, responseBody)
26-
return responseBody, err
24+
_, err = s.rest.Do(httpReq, nil)
25+
return err
2726
}
2827

2928
type AccountsPutBody struct {
@@ -136,9 +135,3 @@ func (s *Service) NewAccountsPutBody() *AccountsPutBody {
136135
func (b AccountsPutBody) MarshalJSON() ([]byte, error) {
137136
return omitempty.MarshalJSON(b)
138137
}
139-
140-
func (s *Service) NewAccountsPutResponse() *AccountsPutResponse {
141-
return &AccountsPutResponse{}
142-
}
143-
144-
type AccountsPutResponse Account

0 commit comments

Comments
 (0)