// Run makes the HTTP request corresponding to the UpdateBottleCommand command. func (cmd *UpdateBottleCommand) Run(c *client.Client) (*http.Response, error) { var payload client.UpdateBottlePayload if cmd.Payload != "" { err := json.Unmarshal([]byte(cmd.Payload), &payload) if err != nil { return nil, fmt.Errorf("failed to deserialize payload: %s", err) } } return c.UpdateBottle(cmd.Path, &payload) }