Skip to content

Commit

Permalink
introduce basePrice getter in the Order class
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiosilveira committed Aug 20, 2022
1 parent 446ff41 commit b01ce19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions order.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class Order {
return this._data.itemPrice;
}

get basePrice() {
return this.quantity * this.itemPrice;
}

get price() {
return (
this.quantity * this.itemPrice -
Expand Down

0 comments on commit b01ce19

Please sign in to comment.