Summary
Define all DTOs and enums needed for the payment order API.
Requirements
Enums
PaymentStatus: PENDING, PAID, VOIDED, PARTIALLY_REFUNDED, REFUNDED, CANCELED, ABANDONED, DECLINED, SETTLED, AUTHORIZED
PaymentMethodType: paymentInitiation, cardPayments, bnpl, hirePurchase
Currency: EUR, PLN (at minimum)
Locale: DE, EN, ET, FI, LT, LV, PL, RU
Request DTOs
CreateOrderRequest: merchant reference, amount, currency, payment method, bank code, locale, return URL, notification URL, billing address, line items
LineItem: description, quantity, unit price
Address: billing address fields
Response DTOs
CreateOrderResponse: payment URL, order UUID
OrderStatusResponse: order UUID, payment status, merchant reference, grand total, payment method type, payment intents
PaymentIntent: intent UUID, status, payment method type, amount, service fee
General
- Null-safe — clearly indicate nullable fields
- Jackson annotations for JSON serialization/deserialization
Refs
initial-docs/project1.md — order payload fields
initial-docs/project2.md — line items, statuses, currencies, locales, payment method types
initial-docs/project3.md — order response structure, payment intents
Testing
Unit tests for: serialization/deserialization round-trips, enum coverage, builder/constructor validation, null handling. Target near-perfect coverage.
Summary
Define all DTOs and enums needed for the payment order API.
Requirements
Enums
PaymentStatus: PENDING, PAID, VOIDED, PARTIALLY_REFUNDED, REFUNDED, CANCELED, ABANDONED, DECLINED, SETTLED, AUTHORIZEDPaymentMethodType: paymentInitiation, cardPayments, bnpl, hirePurchaseCurrency: EUR, PLN (at minimum)Locale: DE, EN, ET, FI, LT, LV, PL, RURequest DTOs
CreateOrderRequest: merchant reference, amount, currency, payment method, bank code, locale, return URL, notification URL, billing address, line itemsLineItem: description, quantity, unit priceAddress: billing address fieldsResponse DTOs
CreateOrderResponse: payment URL, order UUIDOrderStatusResponse: order UUID, payment status, merchant reference, grand total, payment method type, payment intentsPaymentIntent: intent UUID, status, payment method type, amount, service feeGeneral
Refs
initial-docs/project1.md— order payload fieldsinitial-docs/project2.md— line items, statuses, currencies, locales, payment method typesinitial-docs/project3.md— order response structure, payment intentsTesting
Unit tests for: serialization/deserialization round-trips, enum coverage, builder/constructor validation, null handling. Target near-perfect coverage.