Skip to content
This repository has been archived by the owner on Jun 12, 2019. It is now read-only.

feat: domain trade and webhosting product #3

Merged
merged 1 commit into from
Jan 10, 2017
Merged

feat: domain trade and webhosting product #3

merged 1 commit into from
Jan 10, 2017

Conversation

marcaudefroy
Copy link

feat: add push webhosting product into a cart
feat: add trade cli

Copy link
Member

@yesnault yesnault left a 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",
Copy link
Member

@yesnault yesnault Jan 8, 2017

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)
Copy link
Member

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")
Copy link
Member

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\"")
Copy link
Member

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
Copy link
Member

@fsamin fsamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fsamin fsamin merged commit fd378e0 into ovhlabs:master Jan 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants