- Orders
- Customers
- Carts
Web API:
Install-Package Geta.ServiceApi.Commerce
WebHooks:
Install-Package Geta.ServiceApi.Commerce.WebHooks
Quicksilver is being used for the demo playground and needs to be setup in order to run the integration tests.
- In IIS install a self signed certificate
- In IIS add serviceapi.localtest.me (point it to C:\Projects\service-api\demo\Sources\EPiServer.Reference.Commerce.Site). Binding should be https (choose the certificate from step 1). If the site doesn't start, it is likely that Skype should be closed. Then site can be started and then Skype can be turned on.
- Open demo\Quicksilver.sln
- Built and restore packages
- Run demo\Setup\SetupDatabases.cmd
- run update-epidatabase in Package Manager console(This is not just for db update, but for setting up service API permissions correctly as well)
- Navigate to https://serviceapi.localtest.me admin/store
- Make sure the demo environment is setup (default is https://serviceapi.localtest.me)
- Right click Geta.ServiceApi.Commerce.Tests and choose Run Units Tests
Swagger documentation is set up on demo environment project: https://serviceapi.localtest.me/swagger
To include Swagger documentation into your project, install Swashbuckle NuGet package:
Install-Package Swashbuckle
Configure XML Comments in SwaggerConfig.cs in EnableSwagger method:
c.IncludeXmlComments(GetServiceApiXmlCommentsPath());
And create GetServiceApiXmlCommentsPath method to resolve XML documentation:
private static string GetServiceApiXmlCommentsPath()
{
return $@"{System.AppDomain.CurrentDomain.BaseDirectory}\bin\Geta.ServiceApi.Commerce.xml";
}
XML version of documentation.
Geta.ServiceApi.Commerce.WebHooks adds ASP.NET WebHooks to your project and raises these EPiServer Commerce events:
- InventoryUpdated - raised on inventory update. Sends collection of CatalogKeys affected.
- PriceUpdated - raised on price update. Sends collection of CatalogKeys affected and PriceDetailValues affected.
- OrderGroupUpdated - raised on order group update. Sends OrderGroupId, OrderGroupType and OrderGroup affected.
- OrderGroupDeleted - raised on order group delete. Sends OrderGroupId, OrderGroupType and OrderGroup affected.