From 2f0f55be42ce18787fd4d336862d595cf7137576 Mon Sep 17 00:00:00 2001 From: Vlasov Date: Tue, 24 Sep 2024 18:38:29 +0300 Subject: [PATCH] Added support for urlLike filter in GET /api/v5/store/products --- client_test.go | 2 ++ filters.go | 1 + 2 files changed, 3 insertions(+) diff --git a/client_test.go b/client_test.go index fdcdd30..7f2efc0 100644 --- a/client_test.go +++ b/client_test.go @@ -5896,6 +5896,7 @@ func TestClient_Products(t *testing.T) { Get("/store/products"). MatchParam("filter[active]", "1"). MatchParam("filter[minPrice]", "1"). + MatchParam("filter[urlLike]", "https://test.com/path/to/resource"). Reply(200). BodyString(`{"success": true}`) @@ -5903,6 +5904,7 @@ func TestClient_Products(t *testing.T) { Filter: ProductsFilter{ Active: 1, MinPrice: 1, + URLLike: "https://test.com/path/to/resource", }, }) if err != nil { diff --git a/filters.go b/filters.go index 31e3669..1f29214 100644 --- a/filters.go +++ b/filters.go @@ -352,6 +352,7 @@ type ProductsFilter struct { ExternalID string `url:"externalId,omitempty"` Manufacturer string `url:"manufacturer,omitempty"` URL string `url:"url,omitempty"` + URLLike string `url:"urlLike,omitempty"` PriceType string `url:"priceType,omitempty"` OfferExternalID string `url:"offerExternalId,omitempty"` Sites []string `url:"sites,omitempty,brackets"`