challenge
challenge copied to clipboard
[Challenge]: feat: new payment flow (individual-assignment/)
- [ ] 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
- [x] The changes inside this pull request are organization-agnostic
Why?
Challenge for Backend Software Engineer (individual-assignment)
What?
Were tasked with reviewing and redesigning the payment processing and shipping rules flow for an online order system. The specific payment processing rules are as follows:
- Physical Product: Generate a shipping label for the product.
- Service Subscription: Activate the subscription and notify the user via email.
- Book: Generate a shipping label with a tax exemption notice in accordance with the Constitution Art. 150, VI, d.
- Digital Media (music, video): Send an email with the purchase description and grant a R$ 10 discount voucher to the buyer.
The challenge was to redesign the payment/shipping rules flow to facilitate maintenance and the addition of new rules.
Jira link:
How:
The project structure follows common conventions for Kotlin projects, with separate directories for main code and tests. The model classes and strategies are organized into distinct packages for easier navigation and code maintenance.
/src
│
├── /main
│ ├── /kotlin
│ │ └── /challenge
│ │ ├── /strategies
│ │ ├── /models
│ │ └── Main.kt
│
└── /test
└── /kotlin
└── /challenge
├── /strategies
├── /models