Created
July 16, 2020 00:18
-
-
Save mariobittencourt/5ed16063c87e899e3f3c1350a5300f3b to your computer and use it in GitHub Desktop.
Updated Domain Logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Order { | |
protected whenOrderCreated(event: OrderCreated): void { | |
// setting the other properies as before | |
// The event now contains the exchangeRate captured at the moment that the order was created | |
this._chargedAmount = event.amount * event.exchangeRate; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment