Skip to content

Update generated SDKs #470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
  •  
  •  
  •  
338 changes: 253 additions & 85 deletions changes.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.WithId("test_ID")
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.WithKey("test_key")
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/product-projections/test_ID?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductProjections()
.WithId("test_ID")
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/product-projections/test_ID?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/product-projections/key=test_key?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductProjections()
.WithKey("test_key")
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/product-projections/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,17 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/product-projections/search?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductProjections()
.Search()
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/product-projections/search?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/product-projections?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.ProductProjections()
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/product-projections?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/products/test_ID?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.WithId("test_ID")
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/products/test_ID?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down Expand Up @@ -160,6 +171,17 @@ public static IEnumerable<object[]> GetData()
"Post",
"/test_projectKey/products/test_ID?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.WithId("test_ID")
.Post(null)
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Post",
"/test_projectKey/products/test_ID?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down Expand Up @@ -236,6 +258,17 @@ public static IEnumerable<object[]> GetData()
"Delete",
"/test_projectKey/products/test_ID?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.WithId("test_ID")
.Delete()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Delete",
"/test_projectKey/products/test_ID?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/products/key=test_key?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.WithKey("test_key")
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/products/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down Expand Up @@ -160,6 +171,17 @@ public static IEnumerable<object[]> GetData()
"Post",
"/test_projectKey/products/key=test_key?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.WithKey("test_key")
.Post(null)
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Post",
"/test_projectKey/products/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down Expand Up @@ -236,6 +258,17 @@ public static IEnumerable<object[]> GetData()
"Delete",
"/test_projectKey/products/key=test_key?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.WithKey("test_key")
.Delete()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Delete",
"/test_projectKey/products/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ public static IEnumerable<object[]> GetData()
"Get",
"/test_projectKey/products?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.Get()
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Get",
"/test_projectKey/products?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down Expand Up @@ -217,6 +227,16 @@ public static IEnumerable<object[]> GetData()
"Post",
"/test_projectKey/products?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Products()
.Post(null)
.WithPriceRecurrencePolicy("priceRecurrencePolicy")
.Build(),
"Post",
"/test_projectKey/products?priceRecurrencePolicy=priceRecurrencePolicy",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.RecurrencePolicies
{
public class ByProjectKeyRecurrencePoliciesByIDTest : 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")
.RecurrencePolicies()
.WithId("test_ID")
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/recurrence-policies/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.RecurrencePolicies()
.WithId("test_ID")
.Get()
.Build(),
"Get",
"/test_projectKey/recurrence-policies/test_ID",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.RecurrencePolicies()
.WithId("test_ID")
.Head()
.Build(),
"Head",
"/test_projectKey/recurrence-policies/test_ID",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.RecurrencePolicies()
.WithId("test_ID")
.Post(null)
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/recurrence-policies/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.RecurrencePolicies()
.WithId("test_ID")
.Post(null)
.Build(),
"Post",
"/test_projectKey/recurrence-policies/test_ID",
}
};
}
}
}
Loading
Loading