Skip to content

Commit d8cb86b

Browse files
authored
feat(product_catalog): filter by locality (#2614)
1 parent cf47327 commit d8cb86b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/product_catalog/v2alpha1/product_catalog_sdk.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ type PublicCatalogAPIListPublicCatalogProductsRequest struct {
584584

585585
// ProductTypes: the list of filtered product categories.
586586
ProductTypes []ListPublicCatalogProductsRequestProductType `json:"-"`
587+
588+
// Locality: the locality of the products to filter by. If not set, all localities are returned.
589+
Locality *PublicCatalogProductLocality `json:"-"`
587590
}
588591

589592
type PublicCatalogAPI struct {
@@ -610,6 +613,7 @@ func (s *PublicCatalogAPI) ListPublicCatalogProducts(req *PublicCatalogAPIListPu
610613
parameter.AddToQuery(query, "page", req.Page)
611614
parameter.AddToQuery(query, "page_size", req.PageSize)
612615
parameter.AddToQuery(query, "product_types", req.ProductTypes)
616+
parameter.AddToQuery(query, "locality", req.Locality)
613617

614618
scwReq := &scw.ScalewayRequest{
615619
Method: "GET",

0 commit comments

Comments
 (0)