Skip to content

Commit

Permalink
TASK: Updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Oct 12, 2023
1 parent 7e8f774 commit 027b0f6
Show file tree
Hide file tree
Showing 15 changed files with 210 additions and 51 deletions.
39 changes: 8 additions & 31 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,20 @@
**Api changes**

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

- added property `discountOnTotalPrice` to type `Cart`
- added property `discountOnTotalPrice` to type `StagedOrder`
- added property `custom` to type `StagedOrderAddParcelToDeliveryAction`
- added property `discountOnTotalPrice` to type `Order`
- added property `custom` to type `OrderAddParcelToDeliveryAction`
</details>


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

- :warning: changed response body for `200: application/json` of method `get /{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-rules` from type `<<resourceQueryType>>` to `ApprovalRulePagedQueryResponse`
- :warning: changed response body for `200: application/json` of method `get /{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-flows` from type `<<resourceQueryType>>` to `ApprovalFlowPagedQueryResponse`
- added enum `customer-email-token` to type `ReferenceTypeId`
- added enum `customer-password-token` to type `ReferenceTypeId`
- added enum `customer-email-token` to type `MessageSubscriptionResourceTypeId`
- added enum `customer-group` to type `MessageSubscriptionResourceTypeId`
- added enum `customer-password-token` to type `MessageSubscriptionResourceTypeId`
</details>


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

- added type `ApprovalFlowPagedQueryResponse`
- added type `ApprovalRulePagedQueryResponse`
- added type `CartDiscountTotalPriceTarget`
- added type `DiscountOnTotalPrice`
- added type `DiscountedTotalPricePortion`
- added type `CustomerEmailTokenCreatedMessage`
- added type `CustomerPasswordTokenCreatedMessage`
- added type `CustomerEmailTokenCreatedMessagePayload`
- added type `CustomerPasswordTokenCreatedMessagePayload`
</details>

**Import changes**

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

- added property `product` to type `ProductVariantPatch`
- added type `CustomerEmailTokenReference`
- added type `CustomerPasswordTokenReference`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ namespace commercetools.Sdk.Api.Models.Common
[SubTypeDiscriminator("category", typeof(commercetools.Sdk.Api.Models.Categories.CategoryReference))]
[SubTypeDiscriminator("channel", typeof(commercetools.Sdk.Api.Models.Channels.ChannelReference))]
[SubTypeDiscriminator("customer", typeof(commercetools.Sdk.Api.Models.Customers.CustomerReference))]
[SubTypeDiscriminator("customer-email-token", typeof(commercetools.Sdk.Api.Models.Customers.CustomerEmailTokenReference))]
[SubTypeDiscriminator("customer-group", typeof(commercetools.Sdk.Api.Models.CustomerGroups.CustomerGroupReference))]
[SubTypeDiscriminator("customer-password-token", typeof(commercetools.Sdk.Api.Models.Customers.CustomerPasswordTokenReference))]
[SubTypeDiscriminator("direct-discount", typeof(commercetools.Sdk.Api.Models.Carts.DirectDiscountReference))]
[SubTypeDiscriminator("discount-code", typeof(commercetools.Sdk.Api.Models.DiscountCodes.DiscountCodeReference))]
[SubTypeDiscriminator("inventory-entry", typeof(commercetools.Sdk.Api.Models.Inventories.InventoryEntryReference))]
Expand Down Expand Up @@ -92,12 +94,24 @@ static commercetools.Sdk.Api.Models.Customers.CustomerReference Customer(Action<
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Customers.CustomerEmailTokenReference CustomerEmailToken(Action<commercetools.Sdk.Api.Models.Customers.CustomerEmailTokenReference> init = null)
{
var t = new commercetools.Sdk.Api.Models.Customers.CustomerEmailTokenReference();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.CustomerGroups.CustomerGroupReference CustomerGroup(Action<commercetools.Sdk.Api.Models.CustomerGroups.CustomerGroupReference> init = null)
{
var t = new commercetools.Sdk.Api.Models.CustomerGroups.CustomerGroupReference();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Customers.CustomerPasswordTokenReference CustomerPasswordToken(Action<commercetools.Sdk.Api.Models.Customers.CustomerPasswordTokenReference> init = null)
{
var t = new commercetools.Sdk.Api.Models.Customers.CustomerPasswordTokenReference();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Carts.DirectDiscountReference DirectDiscount(Action<commercetools.Sdk.Api.Models.Carts.DirectDiscountReference> init = null)
{
var t = new commercetools.Sdk.Api.Models.Carts.DirectDiscountReference();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ public enum ReferenceTypeId
[Description("customer")]
Customer,

[Description("customer-email-token")]
CustomerEmailToken,

[Description("customer-group")]
CustomerGroup,

[Description("customer-password-token")]
CustomerPasswordToken,

[Description("direct-discount")]
DirectDiscount,

Expand Down Expand Up @@ -163,9 +169,15 @@ public interface IReferenceTypeId : IJsonName, IEnumerable<char>
public static IReferenceTypeId Customer = new ReferenceTypeIdWrapper
{ Value = ReferenceTypeId.Customer, JsonName = "customer" };

public static IReferenceTypeId CustomerEmailToken = new ReferenceTypeIdWrapper
{ Value = ReferenceTypeId.CustomerEmailToken, JsonName = "customer-email-token" };

public static IReferenceTypeId CustomerGroup = new ReferenceTypeIdWrapper
{ Value = ReferenceTypeId.CustomerGroup, JsonName = "customer-group" };

public static IReferenceTypeId CustomerPasswordToken = new ReferenceTypeIdWrapper
{ Value = ReferenceTypeId.CustomerPasswordToken, JsonName = "customer-password-token" };

public static IReferenceTypeId DirectDiscount = new ReferenceTypeIdWrapper
{ Value = ReferenceTypeId.DirectDiscount, JsonName = "direct-discount" };

Expand Down Expand Up @@ -258,7 +270,9 @@ static IReferenceTypeId[] Values()
Category ,
Channel ,
Customer ,
CustomerEmailToken ,
CustomerGroup ,
CustomerPasswordToken ,
DirectDiscount ,
DiscountCode ,
Extension ,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using commercetools.Sdk.Api.Models.Common;


namespace commercetools.Sdk.Api.Models.Customers
{

public partial class CustomerEmailTokenReference : ICustomerEmailTokenReference
{
public IReferenceTypeId TypeId { get; set; }

public string Id { get; set; }
public CustomerEmailTokenReference()
{
this.TypeId = IReferenceTypeId.FindEnum("customer-email-token");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using commercetools.Sdk.Api.Models.Common;


namespace commercetools.Sdk.Api.Models.Customers
{

public partial class CustomerPasswordTokenReference : ICustomerPasswordTokenReference
{
public IReferenceTypeId TypeId { get; set; }

public string Id { get; set; }
public CustomerPasswordTokenReference()
{
this.TypeId = IReferenceTypeId.FindEnum("customer-password-token");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ public partial class CustomerToken : ICustomerToken
{
public string Id { get; set; }

public DateTime CreatedAt { get; set; }

public DateTime? LastModifiedAt { get; set; }

public string CustomerId { get; set; }

public string Value { get; set; }

public DateTime ExpiresAt { get; set; }

public string Value { get; set; }
public DateTime CreatedAt { get; set; }

public DateTime? LastModifiedAt { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using commercetools.Sdk.Api.Models.Common;
using commercetools.Base.CustomAttributes;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Customers
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Customers.CustomerEmailTokenReference))]
public partial interface ICustomerEmailTokenReference : IReference
{
new string Id { get; set; }

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

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Customers
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Customers.CustomerPasswordTokenReference))]
public partial interface ICustomerPasswordTokenReference : IReference
{
new string Id { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ public partial interface ICustomerToken
{
string Id { get; set; }

DateTime CreatedAt { get; set; }

DateTime? LastModifiedAt { get; set; }

string CustomerId { get; set; }

string Value { get; set; }

DateTime ExpiresAt { get; set; }

string Value { get; set; }
DateTime CreatedAt { get; set; }

DateTime? LastModifiedAt { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ public enum MessageSubscriptionResourceTypeId
[Description("customer")]
Customer,

[Description("customer-email-token")]
CustomerEmailToken,

[Description("customer-group")]
CustomerGroup,

[Description("customer-password-token")]
CustomerPasswordToken,

[Description("inventory-entry")]
InventoryEntry,

Expand Down Expand Up @@ -91,6 +100,15 @@ public interface IMessageSubscriptionResourceTypeId : IJsonName, IEnumerable<cha
public static IMessageSubscriptionResourceTypeId Customer = new MessageSubscriptionResourceTypeIdWrapper
{ Value = MessageSubscriptionResourceTypeId.Customer, JsonName = "customer" };

public static IMessageSubscriptionResourceTypeId CustomerEmailToken = new MessageSubscriptionResourceTypeIdWrapper
{ Value = MessageSubscriptionResourceTypeId.CustomerEmailToken, JsonName = "customer-email-token" };

public static IMessageSubscriptionResourceTypeId CustomerGroup = new MessageSubscriptionResourceTypeIdWrapper
{ Value = MessageSubscriptionResourceTypeId.CustomerGroup, JsonName = "customer-group" };

public static IMessageSubscriptionResourceTypeId CustomerPasswordToken = new MessageSubscriptionResourceTypeIdWrapper
{ Value = MessageSubscriptionResourceTypeId.CustomerPasswordToken, JsonName = "customer-password-token" };

public static IMessageSubscriptionResourceTypeId InventoryEntry = new MessageSubscriptionResourceTypeIdWrapper
{ Value = MessageSubscriptionResourceTypeId.InventoryEntry, JsonName = "inventory-entry" };

Expand Down Expand Up @@ -134,6 +152,9 @@ static IMessageSubscriptionResourceTypeId[] Values()
BusinessUnit ,
Category ,
Customer ,
CustomerEmailToken ,
CustomerGroup ,
CustomerPasswordToken ,
InventoryEntry ,
Order ,
Payment ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,24 @@ public CombinationQueryPredicate<ReferenceQueryBuilderDsl> AsKeyValueDocument(
return new CombinationQueryPredicate<ReferenceQueryBuilderDsl>(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.CustomObjects.CustomObjectReferenceQueryBuilderDsl.Of()),
ReferenceQueryBuilderDsl.Of);
}
public CombinationQueryPredicate<ReferenceQueryBuilderDsl> AsCustomerEmailToken(
Func<commercetools.Sdk.Api.Predicates.Query.Customers.CustomerEmailTokenReferenceQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Customers.CustomerEmailTokenReferenceQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ReferenceQueryBuilderDsl>(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Customers.CustomerEmailTokenReferenceQueryBuilderDsl.Of()),
ReferenceQueryBuilderDsl.Of);
}
public CombinationQueryPredicate<ReferenceQueryBuilderDsl> AsCustomerGroup(
Func<commercetools.Sdk.Api.Predicates.Query.CustomerGroups.CustomerGroupReferenceQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.CustomerGroups.CustomerGroupReferenceQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ReferenceQueryBuilderDsl>(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.CustomerGroups.CustomerGroupReferenceQueryBuilderDsl.Of()),
ReferenceQueryBuilderDsl.Of);
}
public CombinationQueryPredicate<ReferenceQueryBuilderDsl> AsCustomerPasswordToken(
Func<commercetools.Sdk.Api.Predicates.Query.Customers.CustomerPasswordTokenReferenceQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Customers.CustomerPasswordTokenReferenceQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ReferenceQueryBuilderDsl>(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Customers.CustomerPasswordTokenReferenceQueryBuilderDsl.Of()),
ReferenceQueryBuilderDsl.Of);
}
public CombinationQueryPredicate<ReferenceQueryBuilderDsl> AsCustomer(
Func<commercetools.Sdk.Api.Predicates.Query.Customers.CustomerReferenceQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Customers.CustomerReferenceQueryBuilderDsl>> fn)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Predicates.Query.Customers
{

public partial class CustomerEmailTokenReferenceQueryBuilderDsl
{
public CustomerEmailTokenReferenceQueryBuilderDsl()
{
}

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

public IComparisonPredicateBuilder<CustomerEmailTokenReferenceQueryBuilderDsl, string> TypeId()
{
return new ComparisonPredicateBuilder<CustomerEmailTokenReferenceQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("typeId")),
p => new CombinationQueryPredicate<CustomerEmailTokenReferenceQueryBuilderDsl>(p, CustomerEmailTokenReferenceQueryBuilderDsl.Of),
PredicateFormatter.Format);
}
public IComparisonPredicateBuilder<CustomerEmailTokenReferenceQueryBuilderDsl, string> Id()
{
return new ComparisonPredicateBuilder<CustomerEmailTokenReferenceQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("id")),
p => new CombinationQueryPredicate<CustomerEmailTokenReferenceQueryBuilderDsl>(p, CustomerEmailTokenReferenceQueryBuilderDsl.Of),
PredicateFormatter.Format);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Predicates.Query.Customers
{

public partial class CustomerPasswordTokenReferenceQueryBuilderDsl
{
public CustomerPasswordTokenReferenceQueryBuilderDsl()
{
}

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

public IComparisonPredicateBuilder<CustomerPasswordTokenReferenceQueryBuilderDsl, string> TypeId()
{
return new ComparisonPredicateBuilder<CustomerPasswordTokenReferenceQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("typeId")),
p => new CombinationQueryPredicate<CustomerPasswordTokenReferenceQueryBuilderDsl>(p, CustomerPasswordTokenReferenceQueryBuilderDsl.Of),
PredicateFormatter.Format);
}
public IComparisonPredicateBuilder<CustomerPasswordTokenReferenceQueryBuilderDsl, string> Id()
{
return new ComparisonPredicateBuilder<CustomerPasswordTokenReferenceQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("id")),
p => new CombinationQueryPredicate<CustomerPasswordTokenReferenceQueryBuilderDsl>(p, CustomerPasswordTokenReferenceQueryBuilderDsl.Of),
PredicateFormatter.Format);
}

}
}
Loading

0 comments on commit 027b0f6

Please sign in to comment.