[ECOMMERCE-168] Improve code of CheckoutProvider and Endpoint Created: 13/Mar/19  Updated: 26/Aug/22

Status: Open
Project: E-commerce
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Evzen Fochr Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Commerce later
Story Points: 5
Team: AuthorX

 Description   

Provider (e.g. CommercetoolsCheckoutProvider) will have hardcoded implementation classes (possible usage of map for it) for objects like Address, ShippingInformation etc.
Endpoint would accept json in body and map this object like

Address(interface) = objectMapper.readValue(json from body, implementation class from provider);

That way we can have separate implementation for each provider and easily anotate properties as required and get rid of checking if property is required later.


Generated at Mon Feb 12 01:41:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.