-
Notifications
You must be signed in to change notification settings - Fork 3
feat: domain trade and webhosting product #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 404 in err ?
common.Check(err) | ||
} | ||
item, err := client.OrderAddCartServiceOption(domain, types.OrderCartServiceOptionDomainPost{ | ||
Duration: "P1Y", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not arg with default value ? or a comment
} | ||
} | ||
if serviceOptionChoosed == nil { | ||
err = fmt.Errorf("Cannot find service options of type trade for domain %s", domain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
common.Exit("Cannot find service options of type trade for domain %s", domain)
domain := args[0] | ||
|
||
if withOwner == "" { | ||
err := fmt.Errorf("Missing withOwner option") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
common.Exit("Missing withOwner option") or common.WrongUsage by adding new arg for err description.
// OrderAddProductWebHosting post a new webHosting product in your cart | ||
func (c *Client) OrderAddProductWebHosting(cartID string, orderCartWebHostingPost types.OrderCartWebHostingPost) (*types.OrderCartItem, error) { | ||
if cartID == "" { | ||
return nil, errors.New("Error 404: \"Invalid Cart ID\"") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 404 and not just Cart ID cannot be null ?
feat: add push webhosting product into a cart wording: add uppercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
feat: add push webhosting product into a cart
feat: add trade cli