S++Business systems language
DEMO SOURCE · SPP / APP / PHYRead the book

petshop-05-checks.spp

petshop/cart/petshop-05-checks.spp

Download original file · Petstore source contents

1domain petshop;23atomic check checkCartAdditionAgreementInput(CartAdditionAgreement) {4    require(CartAdditionAgreement.quantity != null && CartAdditionAgreement.quantity > 0, "INVALID_QUANTITY");5}67atomic check checkCartQuantityAgreementInput(CartQuantityAgreement) {8    require(CartQuantityAgreement.quantity != null && CartQuantityAgreement.quantity > 0, "INVALID_QUANTITY");9}