Skip to content

Commit

Permalink
Update generated SDKs (#198)
Browse files Browse the repository at this point in the history
Co-authored-by: Auto Mation <[email protected]>
Co-authored-by: Jens Schulze <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2023
1 parent 7aa34f6 commit a194c28
Show file tree
Hide file tree
Showing 141 changed files with 838 additions and 2,075 deletions.
211 changes: 140 additions & 71 deletions changes.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithId("test_ID")
.Get()
.Post(null)
.WithExpand("expand")
.Build(),
"Get",
"Post",
"/test_projectKey/me/quote-requests/test_ID?expand=expand",
},
new Object[] {
Expand All @@ -36,9 +36,9 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithId("test_ID")
.Get()
.Post(null)
.Build(),
"Get",
"Post",
"/test_projectKey/me/quote-requests/test_ID",
},
new Object[] {
Expand All @@ -47,22 +47,23 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithId("test_ID")
.Post(null)
.WithExpand("expand")
.Delete()
.WithVersion(2)
.Build(),
"Post",
"/test_projectKey/me/quote-requests/test_ID?expand=expand",
"Delete",
"/test_projectKey/me/quote-requests/test_ID?version=2",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Me()
.QuoteRequests()
.WithId("test_ID")
.Post(null)
.Delete()
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/me/quote-requests/test_ID",
"Delete",
"/test_projectKey/me/quote-requests/test_ID?expand=expand",
},
new Object[] {
ApiRoot
Expand All @@ -71,21 +72,20 @@ public static IEnumerable<object[]> GetData()
.QuoteRequests()
.WithId("test_ID")
.Delete()
.WithVersion(2)
.Build(),
"Delete",
"/test_projectKey/me/quote-requests/test_ID?version=2",
"/test_projectKey/me/quote-requests/test_ID",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Me()
.QuoteRequests()
.WithId("test_ID")
.Delete()
.Get()
.WithExpand("expand")
.Build(),
"Delete",
"Get",
"/test_projectKey/me/quote-requests/test_ID?expand=expand",
},
new Object[] {
Expand All @@ -94,9 +94,9 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithId("test_ID")
.Delete()
.Get()
.Build(),
"Delete",
"Get",
"/test_projectKey/me/quote-requests/test_ID",
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithKey("test_key")
.Get()
.Post(null)
.WithExpand("expand")
.Build(),
"Get",
"Post",
"/test_projectKey/me/quote-requests/key=test_key?expand=expand",
},
new Object[] {
Expand All @@ -36,9 +36,9 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithKey("test_key")
.Get()
.Post(null)
.Build(),
"Get",
"Post",
"/test_projectKey/me/quote-requests/key=test_key",
},
new Object[] {
Expand All @@ -47,22 +47,23 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithKey("test_key")
.Post(null)
.WithExpand("expand")
.Delete()
.WithVersion(2)
.Build(),
"Post",
"/test_projectKey/me/quote-requests/key=test_key?expand=expand",
"Delete",
"/test_projectKey/me/quote-requests/key=test_key?version=2",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Me()
.QuoteRequests()
.WithKey("test_key")
.Post(null)
.Delete()
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/me/quote-requests/key=test_key",
"Delete",
"/test_projectKey/me/quote-requests/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
Expand All @@ -71,21 +72,20 @@ public static IEnumerable<object[]> GetData()
.QuoteRequests()
.WithKey("test_key")
.Delete()
.WithVersion(2)
.Build(),
"Delete",
"/test_projectKey/me/quote-requests/key=test_key?version=2",
"/test_projectKey/me/quote-requests/key=test_key",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Me()
.QuoteRequests()
.WithKey("test_key")
.Delete()
.Get()
.WithExpand("expand")
.Build(),
"Delete",
"Get",
"/test_projectKey/me/quote-requests/key=test_key?expand=expand",
},
new Object[] {
Expand All @@ -94,9 +94,9 @@ public static IEnumerable<object[]> GetData()
.Me()
.QuoteRequests()
.WithKey("test_key")
.Delete()
.Get()
.Build(),
"Delete",
"Get",
"/test_projectKey/me/quote-requests/key=test_key",
}
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.ShippingMethods
{
public class ByProjectKeyShippingMethodsMatchingCartLocationTest : 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")
.ShippingMethods()
.MatchingCartLocation()
.Get()
.WithCountry("country")
.Build(),
"Get",
"/test_projectKey/shipping-methods/matching-cart-location?country=country",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ShippingMethods()
.MatchingCartLocation()
.Get()
.WithState("state")
.Build(),
"Get",
"/test_projectKey/shipping-methods/matching-cart-location?state=state",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ShippingMethods()
.MatchingCartLocation()
.Get()
.WithCartId("cartId")
.Build(),
"Get",
"/test_projectKey/shipping-methods/matching-cart-location?cartId=cartId",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ShippingMethods()
.MatchingCartLocation()
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/shipping-methods/matching-cart-location?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ShippingMethods()
.MatchingCartLocation()
.Get()
.Build(),
"Get",
"/test_projectKey/shipping-methods/matching-cart-location",
}
};
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a194c28

Please sign in to comment.