Skip to content

brianweet/service-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geta Service API

Platform Platform

Geta.ServiceApi.Commerce

  • Orders
  • Customers
  • Carts

Installation

Web API:

Install-Package Geta.ServiceApi.Commerce

WebHooks:

Install-Package Geta.ServiceApi.Commerce.WebHooks

Demo

Quicksilver is being used for the demo playground and needs to be setup in order to run the integration tests.

  1. In IIS install a self signed certificate
  2. 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.
  3. Open demo\Quicksilver.sln
  4. Built and restore packages
  5. Run demo\Setup\SetupDatabases.cmd
  6. run update-epidatabase in Package Manager console(This is not just for db update, but for setting up service API permissions correctly as well)
  7. Navigate to https://serviceapi.localtest.me admin/store

Integration tests

  1. Make sure the demo environment is setup (default is https://serviceapi.localtest.me)
  2. Right click Geta.ServiceApi.Commerce.Tests and choose Run Units Tests

Documentation

Swagger documentation

Swagger documentation is set up on demo environment project: https://serviceapi.localtest.me/swagger

Swagger documentation in your project

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";
}

Service API XML documentation

XML version of documentation.

WebHooks

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages