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 Feb 16, 2024
1 parent 69b7c2b commit a709aff
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 16 deletions.
28 changes: 18 additions & 10 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<details>
<summary>Added Type(s)</summary>

- added type `DiscountedLineItemPortionDraft`
- added type `DiscountCodeSetKeyAction`
- added type `CartDiscountCreatedMessage`
- added type `CartDiscountDeletedMessage`
Expand All @@ -23,6 +24,23 @@
</details>


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

- :warning: changed property `includedDiscounts` of type `DiscountedLineItemPriceDraft` from type `DiscountedLineItemPortion[]` to `DiscountedLineItemPortionDraft[]`
</details>


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

- added property `perMethodExternalTaxRate` to type `CartAddLineItemAction`
- added property `key` to type `DiscountCode`
- added property `key` to type `DiscountCodeDraft`
- added property `shippingMode` to type `MyCartDraft`
</details>


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

Expand All @@ -39,13 +57,3 @@
- added resource `/{projectKey}/discount-codes/key={key}`
</details>


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

- added property `perMethodExternalTaxRate` to type `CartAddLineItemAction`
- added property `key` to type `DiscountCode`
- added property `key` to type `DiscountCodeDraft`
- added property `shippingMode` to type `MyCartDraft`
</details>

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using commercetools.Sdk.Api.Models.Common;


namespace commercetools.Sdk.Api.Models.Carts
{

public partial class DiscountedLineItemPortionDraft : IDiscountedLineItemPortionDraft
{
public IReference Discount { get; set; }

public ITypedMoneyDraft DiscountedAmount { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using commercetools.Sdk.Api.Models.Common;
using commercetools.Base.CustomAttributes;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Carts
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Carts.DiscountedLineItemPortionDraft))]
public partial interface IDiscountedLineItemPortionDraft
{
IReference Discount { get; set; }

ITypedMoneyDraft DiscountedAmount { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public partial class DiscountedLineItemPriceDraft : IDiscountedLineItemPriceDraf
{
public IMoney Value { get; set; }

public IList<IDiscountedLineItemPortion> IncludedDiscounts { get; set; }
public IEnumerable<IDiscountedLineItemPortion> IncludedDiscountsEnumerable { set => IncludedDiscounts = value.ToList(); }
public IList<IDiscountedLineItemPortionDraft> IncludedDiscounts { get; set; }
public IEnumerable<IDiscountedLineItemPortionDraft> IncludedDiscountsEnumerable { set => IncludedDiscounts = value.ToList(); }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public partial interface IDiscountedLineItemPriceDraft
{
IMoney Value { get; set; }

IList<IDiscountedLineItemPortion> IncludedDiscounts { get; set; }
IEnumerable<IDiscountedLineItemPortion> IncludedDiscountsEnumerable { set => IncludedDiscounts = value.ToList(); }
IList<IDiscountedLineItemPortionDraft> IncludedDiscounts { get; set; }
IEnumerable<IDiscountedLineItemPortionDraft> IncludedDiscountsEnumerable { set => IncludedDiscounts = value.ToList(); }


}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Predicates.Query.Carts
{

public partial class DiscountedLineItemPortionDraftQueryBuilderDsl
{
public DiscountedLineItemPortionDraftQueryBuilderDsl()
{
}

public static DiscountedLineItemPortionDraftQueryBuilderDsl Of()
{
return new DiscountedLineItemPortionDraftQueryBuilderDsl();
}

public CombinationQueryPredicate<DiscountedLineItemPortionDraftQueryBuilderDsl> Discount(
Func<commercetools.Sdk.Api.Predicates.Query.Common.ReferenceQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Common.ReferenceQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<DiscountedLineItemPortionDraftQueryBuilderDsl>(ContainerQueryPredicate.Of()
.Parent(ConstantQueryPredicate.Of().Constant("discount"))
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Common.ReferenceQueryBuilderDsl.Of())),
DiscountedLineItemPortionDraftQueryBuilderDsl.Of);
}

public CombinationQueryPredicate<DiscountedLineItemPortionDraftQueryBuilderDsl> DiscountedAmount(
Func<commercetools.Sdk.Api.Predicates.Query.Common.TypedMoneyDraftQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Common.TypedMoneyDraftQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<DiscountedLineItemPortionDraftQueryBuilderDsl>(ContainerQueryPredicate.Of()
.Parent(ConstantQueryPredicate.Of().Constant("discountedAmount"))
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Common.TypedMoneyDraftQueryBuilderDsl.Of())),
DiscountedLineItemPortionDraftQueryBuilderDsl.Of);
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public CombinationQueryPredicate<DiscountedLineItemPriceDraftQueryBuilderDsl> Va
}

public CombinationQueryPredicate<DiscountedLineItemPriceDraftQueryBuilderDsl> IncludedDiscounts(
Func<commercetools.Sdk.Api.Predicates.Query.Carts.DiscountedLineItemPortionQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Carts.DiscountedLineItemPortionQueryBuilderDsl>> fn)
Func<commercetools.Sdk.Api.Predicates.Query.Carts.DiscountedLineItemPortionDraftQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Carts.DiscountedLineItemPortionDraftQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<DiscountedLineItemPriceDraftQueryBuilderDsl>(ContainerQueryPredicate.Of()
.Parent(ConstantQueryPredicate.Of().Constant("includedDiscounts"))
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Carts.DiscountedLineItemPortionQueryBuilderDsl.Of())),
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Carts.DiscountedLineItemPortionDraftQueryBuilderDsl.Of())),
DiscountedLineItemPriceDraftQueryBuilderDsl.Of);
}
public ICollectionPredicateBuilder<DiscountedLineItemPriceDraftQueryBuilderDsl> IncludedDiscounts()
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ d10443de67d8c8e684b4e63415b5720fc3bcf169
941e8656001becbc52907ad541f2c61e461d865d
be578831c2178be70f96067afc7f51dc08a513e3
3ac46e79b1cfbcb5f09ff4306b26075dd60d14e0
ffed231e91d01608e1bb08ecc1883cf00d9d9293

0 comments on commit a709aff

Please sign in to comment.