Allow MANUAL and RATE_PLAN rate sources
All checks were successful
build-and-deploy / build-deploy (push) Successful in 2m35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 2m35s
This commit is contained in:
@@ -539,7 +539,7 @@ class BookingFlow(
|
||||
private fun parseRateSource(value: String?): RateSource? {
|
||||
if (value.isNullOrBlank()) return null
|
||||
return try {
|
||||
RateSource.valueOf(value.trim())
|
||||
RateSource.valueOf(value.trim().uppercase())
|
||||
} catch (_: IllegalArgumentException) {
|
||||
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown rate source")
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class RoomStays(
|
||||
|
||||
private fun parseRateSource(value: String): RateSource {
|
||||
return try {
|
||||
RateSource.valueOf(value.trim())
|
||||
RateSource.valueOf(value.trim().uppercase())
|
||||
} catch (_: IllegalArgumentException) {
|
||||
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown rate source")
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.android.trisolarisserver.models.room
|
||||
|
||||
enum class RateSource {
|
||||
MANUAL,
|
||||
PRESET,
|
||||
RATE_PLAN,
|
||||
NEGOTIATED,
|
||||
OTA
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user