petshop-05-checks.spp
petshop/cart/petshop-05-checks.spp
Download original file · Petstore source contents
1domain petshop;23atomic check checkCartAdditionAgreementInput(CartAdditionAgreement) {4require(5cartAdditionAgreement.quantity != null && cartAdditionAgreement.quantity > 0,6RejectionCode.INVALID_QUANTITY7);8}910atomic check checkCartQuantityAgreementInput(CartQuantityAgreement) {11require(12cartQuantityAgreement.quantity != null && cartQuantityAgreement.quantity > 0,13RejectionCode.INVALID_QUANTITY14);15}