//ListServerMarketProducts returns a product overview of currently offered server market products
ListServerMarketProducts returns a product overview of currently offered server market products
// ListServerMarketProducts returns a product overview of currently offered server market products
func (s *OrderServiceOp) ListServerMarketProducts(ctx context.Context, opt *ProductSearchRequest) ([]Product, *Response, error) {
	path := serverMarketProductBasePath
	path, err := addOptions(path, opt)
	if err != nil {
		return nil, nil, err
	}
	req, err := s.client.NewRequest(ctx, http.MethodGet, path, nil)
	if err != nil {
		return nil, nil, err
	}
	var results []Product
	var rootItems []productsRoot
	resp, err := s.client.Do(ctx, req, &rootItems)
	if err != nil {
		return nil, resp, err
	}
	for _, item := range rootItems {
		results = append(results, item.Product)
	}
	return results, resp, err
}
func ( s * OrderServiceOp ) ListServerMarketProducts ( ctx context . Context , opt * ProductSearchRequest ) ( [ ] Product , * Response , error ) { path := serverMarketProductBasePath path , err := addOptions ( path , opt ) if err != nil { return nil , nil , err } req , err := s . client . NewRequest ( ctx , http . MethodGet , path , nil ) if err != nil { return nil , nil , err } var results [ ] Product var rootItems [ ] productsRoot resp , err := s . client . Do ( ctx , req , & rootItems ) if err != nil { return nil , resp , err } for _ , item := range rootItems { results = append ( results , item . Product ) } return results , resp , err }
ListServerMarketProducts returns a product overview of currently offered server market products
ListServerMarketProducts returns a product overview of currently offered server market products