func (c Client) CreateButton(params *Button) (*Button, error) {
	finalParams := &struct {
		Button *Button `json:"button"`
	}{
		Button: params,
	}
	holder := buttonHolder{}
	if err := c.Post("buttons", finalParams, &holder); err != nil {
		return nil, err
	}
	if err := checkApiErrors(holder.response, "CreateButton"); err != nil {
		return nil, err
	}
	button := holder.Button
	button.EmbedHtml = "<div class=\"coinbase-button\" data-code=\"" + button.Code + "\"></div><script src=\"https://coinbase.com/assets/button.js\" type=\"text/javascript\"></script>"
	return &button, nil
}
func (c Client) CreateButton(params *Button) (*Button, error) {
	finalParams := &struct {
		Button *Button `json:"button"`
	}{
		Button: params,
	}
	holder := buttonHolder{}
	if err := c.Post("buttons", finalParams, &holder); err != nil {
		return nil, err
	}
	if err := checkApiErrors(holder.response, "CreateButton"); err != nil {
		return nil, err
	}
	button := holder.Button
	button.EmbedHtml = "<div class=\"coinbase-button\" data-code=\"" + button.Code + "\"></div><script src=\"https://coinbase.com/assets/button.js\" type=\"text/javascript\"></script>"
	return &button, nil
}
func ( c Client ) CreateButton ( params * Button ) ( * Button , error ) { finalParams := & struct { Button * Button `json:"button"` } { Button : params , } holder := buttonHolder { } if err := c . Post ( " " , finalParams , & holder ) ; err != nil { return nil , err } if err := checkApiErrors ( holder . response , " " ) ; err != nil { return nil , err } button := holder . Button button . EmbedHtml = " \" \" \" " + button . Code + " \" \" \" \" \" " return & button , nil }
// CreateButton gets a new payment button including EmbedHtml as a field on button struct
CreateButton gets a new payment button including EmbedHtml as a field on button struct