Table of content



The SalesTax entity within the microservice architecture

Entity-Relationship-Model of <ProductService>

Entity Name: SalesTax

Data Schema: Shop

Master Service: ProductService


Dataflow of entity of SalesTax

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
CategoryINTSalesTax
CountryLONGSalesTaxCountry
PrimaryKeyLONGSalesTax
ServerReplicationVersionLONGSalesTax
ShopOwnerLONGSalesTax
TaxInPercentDOUBLESalesTax
ValidFromLONGSalesTax

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/salestax/{id}DELETEdeleteSalesTaxById(id)ProductServiceSalesTax
/salestax/{id}GETfindSalesTaxById(id)ProductServiceSalesTax
/salestax/country/{id}GETfindAllSalesTaxOfCountry(id)ProductServiceCountry SalesTax
/salestax/{id}PUTupdateSalesTaxById(salestax)ProductServiceSalesTax
/product/salestax/{id}GETfindAllProductOfSalesTax(id)ProductServiceSalesTax Product
/salestaxPOSTinsertSalesTax(salestax)ProductServiceSalesTax
/salestaxGETfindAllSalesTax()ProductServiceSalesTax

Distributed transaction of <SalesTax>

Pseudo code snippet

final SalesTax salestax = (SalesTax) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/salestax/" + id, SalesTax.class);
if (salestax != null) {
    final Country country1 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + salestax.getCountry().getId(), Country.class);
    if (country1 != null) {
    }
}
return salestax;


Table of content