Exemple #1
0
// NewClient generate a new product client
func NewClient(config gmws.MwsConfig) (*Products, error) {
	prodcuts := new(Products)
	base, err := gmws.NewMwsBase(config, prodcuts.Version(), prodcuts.Name())
	if err != nil {
		return nil, err
	}
	prodcuts.MwsBase = base
	return prodcuts, nil
}
Exemple #2
0
// NewClient generate a new orders client
func NewClient(config gmws.MwsConfig) (*Orders, error) {
	orders := new(Orders)
	base, err := gmws.NewMwsBase(config, orders.Version(), orders.Name())
	if err != nil {
		return nil, err
	}
	orders.MwsBase = base
	return orders, nil
}