Skip to content

Instantly share code, notes, and snippets.

@mariobittencourt
Created July 16, 2020 00:16
Show Gist options
  • Save mariobittencourt/a5a57d4ec9e91c5f02a17ec8856be8d1 to your computer and use it in GitHub Desktop.
Save mariobittencourt/a5a57d4ec9e91c5f02a17ec8856be8d1 to your computer and use it in GitHub Desktop.
Variable Domain logic
class Order {
protected whenOrderCreated(event: OrderCreated): void {
// setting the other properies as before
exchangeRate = exchangeRateToCurrency[event.currency];
this._chargedAmount = event.amount * exchangeRate;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment