Skip to content

Commit

Permalink
Merge branch 'master' into prepare-12
Browse files Browse the repository at this point in the history
  • Loading branch information
jenschude committed Nov 25, 2024
2 parents 6e0a1d7 + 4a4893a commit 35f33ed
Show file tree
Hide file tree
Showing 50 changed files with 667 additions and 66 deletions.
91 changes: 91 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,95 @@

# 11.14.0 (2024-11-11)

## What's Changed
* add converter for product search facets by @jenschude in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/375


**Full Changelog**: https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/compare/11.13.0...11.14.0

# 11.13.0 (2024-11-06)

## What's Changed
* Update changelog by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/364
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/365
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/366
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/367
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/368
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/369
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/370
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/371


**Full Changelog**: https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/compare/11.12.0...11.13.0

# 11.12.0 (2024-10-08)

## What's Changed
* Update changelog by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/352
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/353
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/354
* Create config.yml by @jenschude in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/355
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/356
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/357
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/358
* Update generated SDKs by @ct-sdks in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/362
* Update ci.yml by @jenschude in https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/pull/363

**Api changes**

<details>
<summary>Added Property(s)</summary>

- added property `staged` to type `ProductVariantDeletedMessage`
- added property `staged` to type `ProductVariantDeletedMessagePayload`
- added property `warnings` to type `ProductTailoring`
- added property `attributes` to type `ProductVariantTailoring`
- added property `attributes` to type `ProductVariantTailoringDraft`
- added property `attributes` to type `ProductTailoringAddVariantAction`
- added property `warnings` to type `Product`
- added property `customers` to type `SearchIndexingConfiguration`
</details>


<details>
<summary>Added Type(s)</summary>

- added type `SearchNotReadyError`
- added type `GraphQLSearchNotReadyError`
- added type `ProductTailoringAttribute`
- added type `ProductTailoringSetAttributeAction`
- added type `ProductTailoringSetAttributeInAllVariantsAction`
- added type `ImageProcessingOngoingWarning`
- added type `WarningObject`
</details>


<details>
<summary>Removed Type(s)</summary>

- :warning: removed type `ProductSearchStatus`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `customer-group` to type `ExtensionResourceTypeId`
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId`
- added enum `product-tailoring` to type `ResourceTypeId`
</details>

**Import changes**

<details>
<summary>Added Type(s)</summary>

- added type `InvalidFieldsUpdateError`
</details>


**Full Changelog**: https://github.com/commercetools/commercetools-dotnet-core-sdk-v2/compare/11.11.0...11.12.0

# 11.11.0 (2024-09-04)

## Important Information
Expand Down
49 changes: 8 additions & 41 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,19 @@
**Api changes**

<details>
<summary>Added Property(s)</summary>
<summary>Changed Property(s)</summary>

- added property `staged` to type `ProductVariantDeletedMessage`
- added property `staged` to type `ProductVariantDeletedMessagePayload`
- added property `warnings` to type `ProductTailoring`
- added property `attributes` to type `ProductVariantTailoring`
- added property `attributes` to type `ProductVariantTailoringDraft`
- added property `attributes` to type `ProductTailoringAddVariantAction`
- added property `warnings` to type `Product`
- added property `customers` to type `SearchIndexingConfiguration`
- :warning: changed property `line` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `totalPrice` of type `StagedOrder` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `totalPrice` of type `Order` from type `TypedMoney` to `CentPrecisionMoney`
</details>


<details>
<summary>Added Type(s)</summary>
<summary>Added QueryParameter(s)</summary>

- added type `SearchNotReadyError`
- added type `GraphQLSearchNotReadyError`
- added type `ProductTailoringAttribute`
- added type `ProductTailoringSetAttributeAction`
- added type `ProductTailoringSetAttributeInAllVariantsAction`
- added type `ImageProcessingOngoingWarning`
- added type `WarningObject`
</details>


<details>
<summary>Removed Type(s)</summary>

- :warning: removed type `ProductSearchStatus`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `customer-group` to type `ExtensionResourceTypeId`
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId`
- added enum `product-tailoring` to type `ResourceTypeId`
</details>

**Import changes**

<details>
<summary>Added Type(s)</summary>

- added type `InvalidFieldsUpdateError`
- added query parameter `where` to method `get /{projectKey}/product-selections/key={key}/products`
- added query parameter `where` to method `get /{projectKey}/product-selections/{ID}/products`
</details>

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System.IO;
using commercetools.Sdk.Api.Models.ProductSearches;
using Xunit;

namespace commercetools.Api.Serialization.Tests
{
public class ProductSearchDeserializationTest : IClassFixture<SerializationFixture>
{
private readonly SerializationFixture _serializationFixture;

public ProductSearchDeserializationTest(SerializationFixture serializationFixture)
{
this._serializationFixture = serializationFixture;
}

[Fact]
public void FacetDeserialization()
{
var serializerService = this._serializationFixture.SerializerService;
var serialized = File.ReadAllText("Resources/ProductSearch/facets.json");
var deserialized = serializerService.Deserialize<IProductPagedSearchResponse>(serialized);
Assert.NotNull(deserialized);
var facets = deserialized.Facets;
var bucket = Assert.IsAssignableFrom<IProductSearchFacetResultBucket>(facets[0]);
Assert.Equal("supplierName", bucket.Name);
Assert.Equal("Example Inc.", bucket.Buckets[0].Key);
Assert.Equal(77, bucket.Buckets[0].Count);
var count = Assert.IsAssignableFrom<IProductSearchFacetResultCount>(facets[1]);
Assert.Equal("supplierCounts", count.Name);
Assert.Equal(10, count.Value);

var serialize = serializerService.Serialize(deserialized);

Assert.Equal("{\"total\":0,\"offset\":0,\"limit\":0,\"facets\":[{\"name\":\"supplierName\",\"buckets\":[{\"key\":\"Example Inc.\",\"count\":77}]},{\"name\":\"supplierCounts\",\"value\":10}]}", serialize);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"total":0,
"offset": 0,
"limit": 0,
"facets": [
{
"name": "supplierName",
"buckets": [
{
"key": "Example Inc.",
"count": 77
}
]
},
{
"name": "supplierCounts",
"value": 10
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ public void WithMethods(HttpRequestMessage request, string httpMethod, string ur
public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductSelections()
.WithId("test_ID")
.Products()
.Get()
.WithWhere("where")
.Build(),
"Get",
"/test_projectKey/product-selections/test_ID/products?where=where",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ public void WithMethods(HttpRequestMessage request, string httpMethod, string ur
public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductSelections()
.WithKey("test_key")
.Products()
.Get()
.WithWhere("where")
.Build(),
"Get",
"/test_projectKey/product-selections/key=test_key/products?where=where",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,25 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/product-tailoring",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductTailoring()
.Head()
.WithWhere("where")
.Build(),
"Head",
"/test_projectKey/product-tailoring?where=where",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductTailoring()
.Head()
.Build(),
"Head",
"/test_projectKey/product-tailoring",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static IEnumerable<object[]> GetData()
ApiRoot
.WithProjectKeyValue("test_projectKey")
.Get()
.WithSource("source")
.WithSource(commercetools.Sdk.HistoryApi.Models.ChangeHistories.ISource.FindEnum("source"))
.Build(),
"Get",
"/test_projectKey?source=source",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static IEnumerable<object[]> GetData()
.WithResourceTypeValue("test_resourceType")
.WithIDValue("test_ID")
.Get()
.WithSource("source")
.WithSource(commercetools.Sdk.HistoryApi.Models.ChangeHistories.ISource.FindEnum("source"))
.Build(),
"Get",
"/test_projectKey/test_resourceType/test_ID?source=source",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static IEnumerable<object[]> GetData()
.WithProjectKeyValue("test_projectKey")
.WithResourceTypeValue("test_resourceType")
.Get()
.WithSource("source")
.WithSource(commercetools.Sdk.HistoryApi.Models.ChangeHistories.ISource.FindEnum("source"))
.Build(),
"Get",
"/test_projectKey/test_resourceType?source=source",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public ByProjectKeyProductSelectionsByIDProductsGet(IClient apiHttpClient, strin
this.RequestUrl = $"/{ProjectKey}/product-selections/{ID}/products";
}

public List<string> GetWhere()
{
return this.GetQueryParam("where");
}

public List<string> GetExpand()
{
return this.GetQueryParam("expand");
Expand All @@ -56,6 +61,11 @@ public List<string> GetSort()
return this.GetQueryParam("sort");
}

public ByProjectKeyProductSelectionsByIDProductsGet WithWhere(string where)
{
return this.AddQueryParam("where", where);
}

public ByProjectKeyProductSelectionsByIDProductsGet WithExpand(string expand)
{
return this.AddQueryParam("expand", expand);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public ByProjectKeyProductSelectionsKeyByKeyProductsGet(IClient apiHttpClient, s
this.RequestUrl = $"/{ProjectKey}/product-selections/key={Key}/products";
}

public List<string> GetWhere()
{
return this.GetQueryParam("where");
}

public List<string> GetExpand()
{
return this.GetQueryParam("expand");
Expand All @@ -56,6 +61,11 @@ public List<string> GetSort()
return this.GetQueryParam("sort");
}

public ByProjectKeyProductSelectionsKeyByKeyProductsGet WithWhere(string where)
{
return this.AddQueryParam("where", where);
}

public ByProjectKeyProductSelectionsKeyByKeyProductsGet WithExpand(string expand)
{
return this.AddQueryParam("expand", expand);
Expand Down
Loading

0 comments on commit 35f33ed

Please sign in to comment.