Skip to content

Commit

Permalink
Merge pull request #249 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
anjaliVashisth authored Sep 19, 2023
2 parents 1f92555 + c505661 commit 7cc71ba
Show file tree
Hide file tree
Showing 287 changed files with 11,785 additions and 61 deletions.
149 changes: 142 additions & 7 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,111 @@
**Api changes**

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

- :warning: removed resource `/{projectKey}/me/payments/key={key}`
</details>


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

- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-rules`
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-flows`
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-rules/{ID}`
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-rules/key={key}`
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-flows/{ID}`
</details>


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

- added enum `CreateApprovalRules` to type `Permission`
- added enum `UpdateApprovalRules` to type `Permission`
- added enum `UpdateApprovalFlows` to type `Permission`
</details>


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

- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalRules().post()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalRules().get()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalFlows().get()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalRules().withId().get()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalRules().withId().post()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalRules().withKey().get()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalRules().withKey().post()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalFlows().withId().get()`
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().approvalFlows().withId().post()`
</details>


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

- :warning: removed method `apiRoot.withProjectKey().me().payments().withKey().get()`
- :warning: removed method `apiRoot.withProjectKey().me().payments().withKey().post()`
- :warning: removed method `apiRoot.withProjectKey().me().payments().withKey().delete()`
</details>


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

- added type `ApprovalFlow`
- added type `ApprovalFlowApproval`
- added type `ApprovalFlowApproveAction`
- added type `ApprovalFlowRejectAction`
- added type `ApprovalFlowRejection`
- added type `ApprovalFlowStatus`
- added type `ApprovalFlowUpdate`
- added type `ApprovalFlowUpdateAction`
- added type `ApprovalRule`
- added type `ApprovalRuleDraft`
- added type `ApprovalRuleSetApproversAction`
- added type `ApprovalRuleSetDescriptionAction`
- added type `ApprovalRuleSetKeyAction`
- added type `ApprovalRuleSetNameAction`
- added type `ApprovalRuleSetPredicateAction`
- added type `ApprovalRuleSetRequestersAction`
- added type `ApprovalRuleSetStatusAction`
- added type `ApprovalRuleStatus`
- added type `ApprovalRuleUpdate`
- added type `ApprovalRuleUpdateAction`
- added type `ApproverConjunction`
- added type `ApproverConjunctionDraft`
- added type `ApproverDisjunction`
- added type `ApproverDisjunctionDraft`
- added type `ApproverHierarchy`
- added type `ApproverHierarchyDraft`
- added type `RuleApprover`
- added type `RuleApproverDraft`
- added type `RuleRequester`
- added type `RuleRequesterDraft`
- added type `ApprovalFlowApprovedMessage`
- added type `ApprovalFlowCompletedMessage`
- added type `ApprovalFlowCreatedMessage`
- added type `ApprovalFlowRejectedMessage`
- added type `ApprovalRuleApproversSetMessage`
- added type `ApprovalRuleCreatedMessage`
- added type `ApprovalRuleDescriptionSetMessage`
- added type `ApprovalRuleKeySetMessage`
- added type `ApprovalRuleNameSetMessage`
- added type `ApprovalRulePredicateSetMessage`
- added type `ApprovalRuleRequestersSetMessage`
- added type `ApprovalRuleStatusSetMessage`
- added type `BusinessUnitAddressCustomFieldAddedMessage`
- added type `BusinessUnitAddressCustomFieldChangedMessage`
- added type `BusinessUnitAddressCustomFieldRemovedMessage`
- added type `BusinessUnitAddressCustomTypeRemovedMessage`
- added type `BusinessUnitAddressCustomTypeSetMessage`
- added type `BusinessUnitCustomFieldAddedMessage`
- added type `BusinessUnitCustomFieldChangedMessage`
- added type `BusinessUnitCustomFieldRemovedMessage`
- added type `BusinessUnitCustomTypeRemovedMessage`
- added type `BusinessUnitCustomTypeSetMessage`
- added type `CustomerAddressCustomFieldAddedMessage`
- added type `CustomerAddressCustomFieldChangedMessage`
- added type `CustomerAddressCustomFieldRemovedMessage`
Expand All @@ -13,6 +116,33 @@
- added type `CustomerCustomFieldRemovedMessage`
- added type `CustomerCustomTypeRemovedMessage`
- added type `CustomerCustomTypeSetMessage`
- added type `CustomerGroupCustomFieldAddedMessage`
- added type `CustomerGroupCustomFieldChangedMessage`
- added type `CustomerGroupCustomFieldRemovedMessage`
- added type `CustomerGroupCustomTypeRemovedMessage`
- added type `CustomerGroupCustomTypeSetMessage`
- added type `ApprovalFlowApprovedMessagePayload`
- added type `ApprovalFlowCompletedMessagePayload`
- added type `ApprovalFlowCreatedMessagePayload`
- added type `ApprovalFlowRejectedMessagePayload`
- added type `ApprovalRuleApproversSetMessagePayload`
- added type `ApprovalRuleCreatedMessagePayload`
- added type `ApprovalRuleDescriptionSetMessagePayload`
- added type `ApprovalRuleKeySetMessagePayload`
- added type `ApprovalRuleNameSetMessagePayload`
- added type `ApprovalRulePredicateSetMessagePayload`
- added type `ApprovalRuleRequestersSetMessagePayload`
- added type `ApprovalRuleStatusSetMessagePayload`
- added type `BusinessUnitAddressCustomFieldAddedMessagePayload`
- added type `BusinessUnitAddressCustomFieldChangedMessagePayload`
- added type `BusinessUnitAddressCustomFieldRemovedMessagePayload`
- added type `BusinessUnitAddressCustomTypeRemovedMessagePayload`
- added type `BusinessUnitAddressCustomTypeSetMessagePayload`
- added type `BusinessUnitCustomFieldAddedMessagePayload`
- added type `BusinessUnitCustomFieldChangedMessagePayload`
- added type `BusinessUnitCustomFieldRemovedMessagePayload`
- added type `BusinessUnitCustomTypeRemovedMessagePayload`
- added type `BusinessUnitCustomTypeSetMessagePayload`
- added type `CustomerAddressCustomFieldAddedMessagePayload`
- added type `CustomerAddressCustomFieldChangedMessagePayload`
- added type `CustomerAddressCustomFieldRemovedMessagePayload`
Expand All @@ -23,22 +153,27 @@
- added type `CustomerCustomFieldRemovedMessagePayload`
- added type `CustomerCustomTypeRemovedMessagePayload`
- added type `CustomerCustomTypeSetMessagePayload`
- added type `CustomerMessagePayload`
- added type `CustomerGroupCustomFieldAddedMessagePayload`
- added type `CustomerGroupCustomFieldChangedMessagePayload`
- added type `CustomerGroupCustomFieldRemovedMessagePayload`
- added type `CustomerGroupCustomTypeRemovedMessagePayload`
- added type `CustomerGroupCustomTypeSetMessagePayload`
</details>

**History changes**

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

- :warning: removed method `apiRoot.withProjectKey().me().payments().withKey().get()`
- :warning: removed method `apiRoot.withProjectKey().me().payments().withKey().post()`
- :warning: removed method `apiRoot.withProjectKey().me().payments().withKey().delete()`
- added property `businessUnit` to type `Record`
</details>


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

- :warning: removed resource `/{projectKey}/me/payments/key={key}`
- added query parameter `businessUnit` to method `get /{projectKey}`
- added query parameter `businessUnit` to method `get /{projectKey}/{resourceType}`
- added query parameter `businessUnit` to method `get /{projectKey}/{resourceType}/{ID}`
</details>

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

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.AsAssociate
{
public class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsByIDTest : 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")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.WithId("test_ID")
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.WithId("test_ID")
.Get()
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.WithId("test_ID")
.Post(null)
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.WithId("test_ID")
.Post(null)
.Build(),
"Post",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.AsAssociate
{
public class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsTest : 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")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.WithSort("sort")
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?sort=sort",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.WithLimit(7)
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?limit=7",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.WithOffset(3)
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?offset=3",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.WithWithTotal(true)
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?withTotal=true",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.WithWhere("where")
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?where=where",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.WithPredicateVar("varName", "var.varName")
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?var.varName=var.varName",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.AsAssociate()
.WithAssociateIdValue("test_associateId")
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
.ApprovalFlows()
.Get()
.Build(),
"Get",
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows",
}
};
}
}
}
Loading

0 comments on commit 7cc71ba

Please sign in to comment.