Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce mixed currency money #14

Merged
merged 11 commits into from
Sep 29, 2022

Commits on Sep 29, 2022

  1. add test for Bank.reduce(Money)

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10 👈🏼
    - Return Money from $5 + $5
    - Bank.reduce(Money)
    - Reduce Money with conversion
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    313b66d View commit details
    Browse the repository at this point in the history
  2. add provisional implementation for reducing Money at Bank

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10 👈🏼
    - Return Money from $5 + $5
    - Bank.reduce(Money)
    - Reduce Money with conversion
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    54e9ce6 View commit details
    Browse the repository at this point in the history
  3. implement Money.reduce

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10 👈🏼
    - Return Money from $5 + $5
    - Bank.reduce(Money)
    - Reduce Money with conversion
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    268df52 View commit details
    Browse the repository at this point in the history
  4. implement reduce operation at Expression interface

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10 👈🏼
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    defb7c6 View commit details
    Browse the repository at this point in the history
  5. introduce test to validate mixed-currency reduction

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion 👈🏼
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    9a7580d View commit details
    Browse the repository at this point in the history
  6. introduce limited Money.reduce implementation to handle exchange rates

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion 👈🏼
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    c1e6552 View commit details
    Browse the repository at this point in the history
  7. pass Bank as an argument to Expression.reduce

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion 👈🏼
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    74b00e3 View commit details
    Browse the repository at this point in the history
  8. add rate method to Bank

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion 👈🏼
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    0d4d03a View commit details
    Browse the repository at this point in the history
  9. change Money.reduce to use Bank.rate for exchange rates

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion 👈🏼
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    5477453 View commit details
    Browse the repository at this point in the history
  10. introduce Bank.addRate

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion 👈🏼
    - Reduce(Bank, String)
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    d9b776f View commit details
    Browse the repository at this point in the history
  11. update add tests for currency identity when fetching rate

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 + $5 = $10 ✅
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion ✅
    - Reduce(Bank, String) ✅
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    b95f324 View commit details
    Browse the repository at this point in the history