Skip to content

Update generated SDKs #452

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

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 1 addition & 33 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
**Api changes**

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

- :warning: changed type `DeliveryPayload` from type `object` to `SubscriptionNotification`
- :warning: changed type `EventDeliveryPayload` from type `DeliveryPayload` to `SubscriptionNotification`
</details>


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

- added type `BaseEvent`
- added type `SubscriptionNotification`
</details>


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

- :warning: removed property `data` from type `Event`
</details>


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

- :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]`
</details>


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

- added property `projectKey` to type `DeliveryPayload`
- added property `resource` to type `DeliveryPayload`
- added property `resourceUserProvidedIdentifiers` to type `DeliveryPayload`
- added property `published` to type `ShoppingListLineItem`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ namespace commercetools.Sdk.Api.Tests;

public class CustomFieldsTest
{

[Fact]
public void AsDecimalOrLong()
{
var fieldsStr = "{ \"number\": 91.62, \"numbers\": [91.62, 91.26, 91] }";
IFieldContainer fields = JsonSerializer.Deserialize<FieldContainer>(fieldsStr);

Assert.Equal(91.62m, fields.AsDecimal("number").Value);
Assert.Equal(92, fields.AsLong("number").Value);
Assert.Equal(91.62m, fields.AsSetDecimal("numbers")[0]);
Expand All @@ -30,7 +30,7 @@ public void AsDecimalOrLong()
Assert.Equal(91, fields.AsSetLong("numbers")[2]);

}

[Fact]
public void fields()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public partial interface IShoppingListLineItem

IProductTypeReference ProductType { get; set; }

bool Published { get; set; }

long Quantity { get; set; }

long? VariantId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public partial class ShoppingListLineItem : IShoppingListLineItem

public IProductTypeReference ProductType { get; set; }

public bool Published { get; set; }

public long Quantity { get; set; }

public long? VariantId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public object GetValue(string fieldName)
{
return element.GetDecimal();
}

return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ public CombinationQueryPredicate<ShoppingListLineItemQueryBuilderDsl> ProductTyp
ShoppingListLineItemQueryBuilderDsl.Of);
}

public IComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl, bool> Published()
{
return new ComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl, bool>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("published")),
p => new CombinationQueryPredicate<ShoppingListLineItemQueryBuilderDsl>(p, ShoppingListLineItemQueryBuilderDsl.Of),
PredicateFormatter.Format);
}
public IComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl, long> Quantity()
{
return new ComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl, long>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("quantity")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13688,6 +13688,7 @@ type ShoppingListLineItem {
variantId: Int
productTypeRef: Reference!
productType: ProductTypeDefinition!
published: Boolean!
quantity: Int!
addedAt: DateTime!
name(
Expand Down
1 change: 1 addition & 0 deletions reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
71f39fc07fb9e188fbd1372b798f20f71fa2d764
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,4 @@ a33feaab360e352573f683dd36889c80735e3900
4055fc15c037521387c7c7687cfceee73527f55f
ab43d3845fcab04a4e74bada3ddedf2d8b28472f
761762c7caad45bc86b08db7021a033fff18ba90
dec65e707130185745930bde27ce78ae64ab29c1
Loading