Skip to content

Update generated SDKs #444

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 3, 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
48 changes: 10 additions & 38 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,33 @@
**Api changes**

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

- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products`
- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products/key={key}`
- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products/key={key}`
- added query parameter `priceCustomerGroupAssignments` to method `delete /{projectKey}/products/key={key}`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products/{ID}`
- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products/{ID}`
- added query parameter `priceCustomerGroupAssignments` to method `delete /{projectKey}/products/{ID}`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/search`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/key={key}`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/{ID}`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}`
- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}`
</details>


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

- :warning: removed query parameter `withTotal` from method `get /{projectKey}/product-projections/search`
- :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 `CustomerGroupAssignment`
- added type `CustomerGroupAssignmentDraft`
- added type `CustomerAddCustomerGroupAssignmentAction`
- added type `CustomerRemoveCustomerGroupAssignmentAction`
- added type `CustomerSetCustomerGroupAssignmentsAction`
- added type `CustomerGroupAssignmentAddedMessage`
- added type `CustomerGroupAssignmentRemovedMessage`
- added type `CustomerGroupAssignmentsSetMessage`
- added type `CustomerGroupAssignmentAddedMessagePayload`
- added type `CustomerGroupAssignmentRemovedMessagePayload`
- added type `CustomerGroupAssignmentsSetMessagePayload`
- added type `BaseEvent`
- added type `SubscriptionNotification`
</details>


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

- changed property `facets` of type `ProductProjectionPagedSearchResponse` to be optional
- :warning: removed property `data` from type `Event`
</details>


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

- added property `customerGroupAssignments` to type `Customer`
- added property `customerGroupAssignments` to type `CustomerDraft`
- added property `priceCustomerGroupAssignments` to type `ProductSearchProjectionParams`
- added property `projectKey` to type `DeliveryPayload`
- added property `resource` to type `DeliveryPayload`
- added property `resourceUserProvidedIdentifiers` to type `DeliveryPayload`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public void Test_Serialize_Date()
{
var s = new ServiceCollection();
s.UseCommercetoolsImportApiSerialization();

var p = s.BuildServiceProvider();
var serializerService = p.GetService<IImportSerializerService>();

var customerImport = new CustomerImport()
{
DateOfBirth = new Date(1980, 01, 01),
};

var t = serializerService.Serialize(customerImport);

Assert.Equal("{\"dateOfBirth\":\"1980-01-01\"}", t);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


namespace commercetools.Sdk.Api.Models.BusinessUnits
{

public partial class BusinessUnitSetUnitTypeAction : IBusinessUnitSetUnitTypeAction
{
public string Action { get; set; }

public IBusinessUnitType UnitType { get; set; }

public IBusinessUnitResourceIdentifier ParentUnit { get; set; }
public BusinessUnitSetUnitTypeAction()
{
this.Action = "setUnitType";
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.BusinessUnits
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetUnitTypeAction))]
public partial interface IBusinessUnitSetUnitTypeAction : IBusinessUnitUpdateAction
{
IBusinessUnitType UnitType { get; set; }

IBusinessUnitResourceIdentifier ParentUnit { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace commercetools.Sdk.Api.Models.BusinessUnits
[SubTypeDiscriminator("setDefaultShippingAddress", typeof(commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetDefaultShippingAddressAction))]
[SubTypeDiscriminator("setStoreMode", typeof(commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetStoreModeAction))]
[SubTypeDiscriminator("setStores", typeof(commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetStoresAction))]
[SubTypeDiscriminator("setUnitType", typeof(commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetUnitTypeAction))]
public partial interface IBusinessUnitUpdateAction
{
string Action { get; set; }
Expand Down Expand Up @@ -198,5 +199,11 @@ static commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetStoresAction Se
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetUnitTypeAction SetUnitType(Action<commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetUnitTypeAction> init = null)
{
var t = new commercetools.Sdk.Api.Models.BusinessUnits.BusinessUnitSetUnitTypeAction();
init?.Invoke(t);
return t;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using System;

namespace commercetools.Sdk.Api.Models.Events
{

public partial class BaseEvent : IBaseEvent
{
public string Id { get; set; }

public string NotificationType { get; set; }

public IEventSubscriptionResourceTypeId ResourceType { get; set; }

public IEventType Type { get; set; }

public Object Data { get; set; }

public DateTime CreatedAt { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using System;

namespace commercetools.Sdk.Api.Models.Events
{

public partial class Event : IEvent
{
public string Id { get; set; }

public string NotificationType { get; set; }

public IEventSubscriptionResourceTypeId ResourceType { get; set; }

public IEventType Type { get; set; }

public DateTime CreatedAt { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using System;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.BaseEvent))]
public partial interface IBaseEvent
{
string Id { get; set; }

string NotificationType { get; set; }

IEventSubscriptionResourceTypeId ResourceType { get; set; }

IEventType Type { get; set; }

Object Data { get; set; }

DateTime CreatedAt { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using System;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[TypeDiscriminator(nameof(Type))]
[DefaultTypeDiscriminator(typeof(commercetools.Sdk.Api.Models.Events.Event))]
[SubTypeDiscriminator("ImportContainerCreated", typeof(commercetools.Sdk.Api.Models.Events.ImportContainerCreatedEvent))]
[SubTypeDiscriminator("ImportContainerDeleted", typeof(commercetools.Sdk.Api.Models.Events.ImportContainerDeletedEvent))]
[SubTypeDiscriminator("ImportOperationRejected", typeof(commercetools.Sdk.Api.Models.Events.ImportOperationRejectedEvent))]
[SubTypeDiscriminator("ImportUnresolved", typeof(commercetools.Sdk.Api.Models.Events.ImportUnresolvedEvent))]
[SubTypeDiscriminator("ImportValidationFailed", typeof(commercetools.Sdk.Api.Models.Events.ImportValidationFailedEvent))]
[SubTypeDiscriminator("ImportWaitForMasterVariant", typeof(commercetools.Sdk.Api.Models.Events.ImportWaitForMasterVariantEvent))]
public partial interface IEvent
{
string Id { get; set; }

string NotificationType { get; set; }

IEventSubscriptionResourceTypeId ResourceType { get; set; }

IEventType Type { get; set; }

DateTime CreatedAt { get; set; }

static commercetools.Sdk.Api.Models.Events.ImportContainerCreatedEvent ImportContainerCreated(Action<commercetools.Sdk.Api.Models.Events.ImportContainerCreatedEvent> init = null)
{
var t = new commercetools.Sdk.Api.Models.Events.ImportContainerCreatedEvent();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Events.ImportContainerDeletedEvent ImportContainerDeleted(Action<commercetools.Sdk.Api.Models.Events.ImportContainerDeletedEvent> init = null)
{
var t = new commercetools.Sdk.Api.Models.Events.ImportContainerDeletedEvent();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Events.ImportOperationRejectedEvent ImportOperationRejected(Action<commercetools.Sdk.Api.Models.Events.ImportOperationRejectedEvent> init = null)
{
var t = new commercetools.Sdk.Api.Models.Events.ImportOperationRejectedEvent();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Events.ImportUnresolvedEvent ImportUnresolved(Action<commercetools.Sdk.Api.Models.Events.ImportUnresolvedEvent> init = null)
{
var t = new commercetools.Sdk.Api.Models.Events.ImportUnresolvedEvent();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Events.ImportValidationFailedEvent ImportValidationFailed(Action<commercetools.Sdk.Api.Models.Events.ImportValidationFailedEvent> init = null)
{
var t = new commercetools.Sdk.Api.Models.Events.ImportValidationFailedEvent();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Events.ImportWaitForMasterVariantEvent ImportWaitForMasterVariant(Action<commercetools.Sdk.Api.Models.Events.ImportWaitForMasterVariantEvent> init = null)
{
var t = new commercetools.Sdk.Api.Models.Events.ImportWaitForMasterVariantEvent();
init?.Invoke(t);
return t;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportContainerCreatedEvent))]
public partial interface IImportContainerCreatedEvent : IEvent
{
new IEventSubscriptionResourceTypeId ResourceType { get; set; }

IImportContainerCreatedEventData Data { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportContainerCreatedEventData))]
public partial interface IImportContainerCreatedEventData
{
string Key { get; set; }

int Version { get; set; }

DateTime CreatedAt { get; set; }

DateTime LastModifiedAt { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportContainerDeletedEvent))]
public partial interface IImportContainerDeletedEvent : IEvent
{
new IEventSubscriptionResourceTypeId ResourceType { get; set; }

IImportContainerDeletedEventData Data { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportContainerDeletedEventData))]
public partial interface IImportContainerDeletedEventData
{
string Key { get; set; }

int Version { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportOperationRejectedEvent))]
public partial interface IImportOperationRejectedEvent : IEvent
{
new IEventSubscriptionResourceTypeId ResourceType { get; set; }

IImportOperationRejectedEventData Data { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportOperationRejectedEventData))]
public partial interface IImportOperationRejectedEventData
{
string Id { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using commercetools.Sdk.Api.Models.Subscriptions;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportUnresolvedEvent))]
public partial interface IImportUnresolvedEvent : IEvent
{
new IEventSubscriptionResourceTypeId ResourceType { get; set; }

IImportUnresolvedEventData Data { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.Events
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Events.ImportUnresolvedEventData))]
public partial interface IImportUnresolvedEventData
{
string Id { get; set; }

int Version { get; set; }

string ImportContainerKey { get; set; }

}
}
Loading
Loading