accounting-pattern icon indicating copy to clipboard operation
accounting-pattern copied to clipboard

Add TypeScript example of the same accounting pattern to the project

Open grahambrooks opened this issue 1 year ago • 0 comments

Related to #5

Add TypeScript version of the accounting pattern with tests.

  • Customer.ts: Implement Customer class with methods getName, getEntry, post, and balance.

  • Entry.ts: Implement Entry class with properties entryDate, entryType, and amount.

  • EntryType.ts: Implement EntryType class with static properties BASE_USAGE and SERVICE.

  • EventType.ts: Implement EventType class with static properties USAGE and SERVICE.

  • MonetaryAmount.ts: Implement MonetaryAmount class with properties currency and amount.

  • MultiplyByRatePostingRule.ts: Implement MultiplyByRatePostingRule class extending PostingRule.

  • PostingRule.ts: Implement PostingRule class with abstract method calculateAmount.

  • Quantity.ts: Implement Quantity class with property amount.

  • ServiceAgreement.ts: Implement ServiceAgreement class with methods addPostingRule, getPostingRule, and post.

  • TemporalCollection.ts: Implement TemporalCollection class with methods put and get.

  • AcceptanceTest.ts: Implement acceptance tests for TypeScript version.

  • AnnualServiceFeeRule.ts: Implement AnnualServiceFeeRule class extending PostingRule.

  • CustomerTest.ts: Implement unit tests for Customer class.

  • EntryTest.ts: Implement unit tests for Entry class.

  • MonetaryAmountTest.ts: Implement unit tests for MonetaryAmount class.

  • TemporalCollectionTest.ts: Implement unit tests for TemporalCollection class.


For more details, open the Copilot Workspace session.

grahambrooks avatar Oct 20 '24 16:10 grahambrooks