Default manual payment method to cash
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user