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

petshop-30-agreements.spp

petshop/membership/petshop-30-agreements.spp

Download original file · Petstore source contents

1domain petshop;23atomic calculate initializeRegistrationAgreement(Buyer, Cart, RegistrationAgreement) {4    RegistrationAgreement.buyer = Buyer;5    RegistrationAgreement.cart = Cart;6}78atomic calculate initializeProfileAgreement(Buyer, ProfileAgreement) {9    ProfileAgreement.buyer = Buyer;10}1112atomic calculate prepareRegistrationAgreementReceipt(Buyer, RegistrationAgreement) {13    RegistrationAgreement.receipt = new Receipt();14    RegistrationAgreement.receipt.buyer = Buyer;15    RegistrationAgreement.receipt.status = ReceiptStatus.COMPLETED;16}1718atomic calculate prepareProfileAgreementReceipt(Buyer, ProfileAgreement) {19    ProfileAgreement.receipt = new Receipt();20    ProfileAgreement.receipt.buyer = Buyer;21    ProfileAgreement.receipt.status = ReceiptStatus.COMPLETED;22}