// Run makes the HTTP request corresponding to the CreateAccountCommand command. func (cmd *CreateAccountCommand) Run(c *client.Client) (*http.Response, error) { var payload client.CreateAccountPayload 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.CreateAccount(cmd.Path, &payload) }
// Run makes the HTTP request corresponding to the DeleteAccountCommand command. func (cmd *DeleteAccountCommand) Run(c *client.Client) (*http.Response, error) { return c.DeleteAccount(cmd.Path) }
// Run makes the HTTP request corresponding to the ShowBottleCommand command. func (cmd *ShowBottleCommand) Run(c *client.Client) (*http.Response, error) { return c.ShowBottle(cmd.Path) }
// Run makes the HTTP request corresponding to the ListBottleCommand command. func (cmd *ListBottleCommand) Run(c *client.Client) (*http.Response, error) { return c.ListBottle(cmd.Path, cmd.Years) }