Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Mar 6, 2024
1 parent aaf8c05 commit 068978c
Show file tree
Hide file tree
Showing 145 changed files with 7,187 additions and 0 deletions.
82 changes: 82 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
**Api changes**

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

- added type `ProductTailoringCreatedMessage`
- added type `ProductTailoringDeletedMessage`
- added type `ProductTailoringDescriptionSetMessage`
- added type `ProductTailoringNameSetMessage`
- added type `ProductTailoringPublishedMessage`
- added type `ProductTailoringSlugSetMessage`
- added type `ProductTailoringUnpublishedMessage`
- added type `ProductTailoringCreatedMessagePayload`
- added type `ProductTailoringDeletedMessagePayload`
- added type `ProductTailoringDescriptionSetMessagePayload`
- added type `ProductTailoringNameSetMessagePayload`
- added type `ProductTailoringPublishedMessagePayload`
- added type `ProductTailoringSlugSetMessagePayload`
- added type `ProductTailoringUnpublishedMessagePayload`
- added type `ProductTailoring`
- added type `ProductTailoringData`
- added type `ProductTailoringDraft`
- added type `ProductTailoringInStoreDraft`
- added type `ProductTailoringPagedQueryResponse`
- added type `ProductTailoringReference`
- added type `ProductTailoringResourceIdentifier`
- added type `ProductTailoringUpdate`
- added type `ProductTailoringUpdateAction`
- added type `ProductTailoringPublishAction`
- added type `ProductTailoringSetDescriptionAction`
- added type `ProductTailoringSetMetaAttributesAction`
- added type `ProductTailoringSetMetaDescriptionAction`
- added type `ProductTailoringSetMetaKeywordsAction`
- added type `ProductTailoringSetMetaTitleAction`
- added type `ProductTailoringSetNameAction`
- added type `ProductTailoringSetSlugAction`
- added type `ProductTailoringUnpublishAction`
</details>


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

Expand All @@ -15,3 +53,47 @@
- added property `version` to type `ProductVariantAvailability`
</details>


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

- added method `apiRoot.withProjectKey().productTailoring().get()`
- added method `apiRoot.withProjectKey().productTailoring().post()`
- added method `apiRoot.withProjectKey().productTailoring().withKey().get()`
- added method `apiRoot.withProjectKey().productTailoring().withKey().post()`
- added method `apiRoot.withProjectKey().productTailoring().withKey().delete()`
- added method `apiRoot.withProjectKey().productTailoring().withId().get()`
- added method `apiRoot.withProjectKey().productTailoring().withId().post()`
- added method `apiRoot.withProjectKey().productTailoring().withId().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productTailoring().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productTailoring().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().delete()`
</details>


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

- added enum `product-tailoring` to type `ReferenceTypeId`
</details>


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

- added resource `/{projectKey}/product-tailoring`
- added resource `/{projectKey}/product-tailoring/key={key}`
- added resource `/{projectKey}/product-tailoring/{ID}`
- added resource `/{projectKey}/in-store/key={storeKey}/product-tailoring`
- added resource `/{projectKey}/in-store/key={storeKey}/products`
- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}`
- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}`
- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring`
- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring`
</details>

Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore
{
public class ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest : RequestBuilderParentTests
{
[Theory]
[MemberData(nameof(GetData))]
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
{
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
}

public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.WithLimit(7)
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?limit=7",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.WithOffset(3)
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?offset=3",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.WithWithTotal(true)
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?withTotal=true",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.WithWhere("where")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?where=where",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.WithPredicateVar("varName", "var.varName")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?var.varName=var.varName",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.WithSort("sort")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?sort=sort",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Post(null)
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductTailoring()
.Post(null)
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/product-tailoring",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore
{
public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest : RequestBuilderParentTests
{
[Theory]
[MemberData(nameof(GetData))]
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
{
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
}

public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.Products()
.WithProductId("test_productID")
.ProductTailoring()
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.Products()
.WithProductId("test_productID")
.ProductTailoring()
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.Products()
.WithProductId("test_productID")
.ProductTailoring()
.Post(null)
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.Products()
.WithProductId("test_productID")
.ProductTailoring()
.Post(null)
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.Products()
.WithProductId("test_productID")
.ProductTailoring()
.Delete()
.WithVersion(2)
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?version=2",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.Products()
.WithProductId("test_productID")
.ProductTailoring()
.Delete()
.WithExpand("expand")
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.Products()
.WithProductId("test_productID")
.ProductTailoring()
.Delete()
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Collections.Generic;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore
{
public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest : RequestBuilderParentTests
{


public static IEnumerable<object[]> GetData()
{
return new List<object[]>
{
};
}
}
}
Loading

0 comments on commit 068978c

Please sign in to comment.