mirror of
https://github.com/retailcrm/api-client-go.git
synced 2024-11-23 13:26:04 +03:00
Support for urlLike filter in GET /api/v5/store/products
This commit is contained in:
commit
904796f97a
@ -5896,6 +5896,7 @@ func TestClient_Products(t *testing.T) {
|
|||||||
Get("/store/products").
|
Get("/store/products").
|
||||||
MatchParam("filter[active]", "1").
|
MatchParam("filter[active]", "1").
|
||||||
MatchParam("filter[minPrice]", "1").
|
MatchParam("filter[minPrice]", "1").
|
||||||
|
MatchParam("filter[urlLike]", "https://test.com/path/to/resource").
|
||||||
Reply(200).
|
Reply(200).
|
||||||
BodyString(`{"success": true}`)
|
BodyString(`{"success": true}`)
|
||||||
|
|
||||||
@ -5903,6 +5904,7 @@ func TestClient_Products(t *testing.T) {
|
|||||||
Filter: ProductsFilter{
|
Filter: ProductsFilter{
|
||||||
Active: 1,
|
Active: 1,
|
||||||
MinPrice: 1,
|
MinPrice: 1,
|
||||||
|
URLLike: "https://test.com/path/to/resource",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -352,6 +352,7 @@ type ProductsFilter struct {
|
|||||||
ExternalID string `url:"externalId,omitempty"`
|
ExternalID string `url:"externalId,omitempty"`
|
||||||
Manufacturer string `url:"manufacturer,omitempty"`
|
Manufacturer string `url:"manufacturer,omitempty"`
|
||||||
URL string `url:"url,omitempty"`
|
URL string `url:"url,omitempty"`
|
||||||
|
URLLike string `url:"urlLike,omitempty"`
|
||||||
PriceType string `url:"priceType,omitempty"`
|
PriceType string `url:"priceType,omitempty"`
|
||||||
OfferExternalID string `url:"offerExternalId,omitempty"`
|
OfferExternalID string `url:"offerExternalId,omitempty"`
|
||||||
Sites []string `url:"sites,omitempty,brackets"`
|
Sites []string `url:"sites,omitempty,brackets"`
|
||||||
|
Loading…
Reference in New Issue
Block a user