Skip to content

Conversation

@rodrigoantas
Copy link

  • You have read the CONTRIBUTING.md
  • For Terraform changes, you have read the Terraform Naming Conventions
  • For Terraform changes, you have already executed the Terraform plan on this branch
  • The changes inside this pull request are organization-agnostic

Why?

This pull request is for the Challenge regarding the software engineer posistion. It introduces a new approach to handling payment processing and shipping rules in the order management system.

What?

  • Implemented a strategy pattern to handle different payment processing rules based on product types.
  • Added specific strategies for Book, Digital, Membership, and Physical products.
  • Updated the Order and OrderItem class to use these strategies for payment processing.
  • Added unit tests to cover the new behavior introduced by the strategies.
  • Created a CI for the unit tests.

Jira link:

How:

  • Refactored the Order class to include a paymentStrategyMap for handling different product types.
  • Created individual strategy classes for each product type that implement the PaymentStrategy interface.
  • Updated the OrderItem class to allow quantity adjustments with validation.
  • Added unit tests to ensure that each payment strategy is invoked correctly during payment processing.

Comments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant