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 Jan 10, 2025
1 parent dac431c commit 5113599
Show file tree
Hide file tree
Showing 28 changed files with 1,578 additions and 1 deletion.
17 changes: 17 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<details>
<summary>Added Property(s)</summary>

- added property `inheritedStores` to type `BusinessUnit`
- added property `inheritedStores` to type `Company`
- added property `inheritedStores` to type `Division`
- added property `applicationMode` to type `CartDiscountValueFixed`
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
- added property `custom` to type `CartSetCustomShippingMethodAction`
Expand All @@ -25,6 +28,9 @@
- added resource `/{projectKey}/business-units/search`
- added resource `/{projectKey}/business-units/search/indexing-status`
- added resource `/{projectKey}/channels/key={key}`
- added resource `/{projectKey}/in-store/key={storeKey}/business-units`
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}`
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{ID}`
</details>


Expand All @@ -38,6 +44,17 @@
- added method `apiRoot.withProjectKey().channels().withKey().head()`
- added method `apiRoot.withProjectKey().channels().withKey().post()`
- added method `apiRoot.withProjectKey().channels().withKey().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().delete()`
</details>


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
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 ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDTest : 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")
.BusinessUnits()
.WithId("test_ID")
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithId("test_ID")
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithId("test_ID")
.Head()
.Build(),
"Head",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithId("test_ID")
.Post(null)
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithId("test_ID")
.Post(null)
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithId("test_ID")
.Delete()
.WithVersion(2)
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?version=2",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithId("test_ID")
.Delete()
.WithExpand("expand")
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithId("test_ID")
.Delete()
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/business-units/test_ID",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
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 ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyTest : 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")
.BusinessUnits()
.WithKey("test_key")
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithKey("test_key")
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithKey("test_key")
.Head()
.Build(),
"Head",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithKey("test_key")
.Post(null)
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithKey("test_key")
.Post(null)
.Build(),
"Post",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithKey("test_key")
.Delete()
.WithVersion(2)
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?version=2",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithKey("test_key")
.Delete()
.WithExpand("expand")
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.BusinessUnits()
.WithKey("test_key")
.Delete()
.Build(),
"Delete",
"/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key",
}
};
}
}
}
Loading

0 comments on commit 5113599

Please sign in to comment.