Default manual payment method to cash
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s

This commit is contained in:
androidlover5842
2026-01-30 09:54:48 +05:30
parent 7071014e81
commit a95f307c60
2 changed files with 2 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ class Payments(
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "amount must be > 0")
}
val method = parseMethod(request.method)
val method = request.method?.let { parseMethod(it) } ?: PaymentMethod.CASH
val receivedAt = parseOffset(request.receivedAt) ?: OffsetDateTime.now()
val payment = Payment(
property = property,

View File

@@ -4,7 +4,7 @@ import java.util.UUID
data class PaymentCreateRequest(
val amount: Long,
val method: String,
val method: String? = null,
val currency: String? = null,
val reference: String? = null,
val notes: String? = null,