I've always disliked the TaxRateAmount object name and its getAmount() method (which leads to $rate->getAmount()->getAmount()).
"amount" is vague language for what is basically the percentage.
Now that #2894792: Add Adjustment::getPercentage() has landed, we discussed internally three choices for making TaxRateAmount::getAmount() less confusing:
1) TaxRateAmount::getPercentage()
2) TaxRatePercentage::getAmount()
3) TaxRatePercentage::getNumber()
All three were deemed to be improvements over the current code. In the end we decided to go with #3, avoiding all "amount" language, and making a parallel with the Price object which also has a getNumber() method.
Comments
Comment #2
bojanz commentedComment #4
bojanz commentedDone. The word amount is now only used for prices in Commerce.