diff --git a/sdk/build.gradle b/sdk/build.gradle index 4f088263..8d9bba0d 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -10,7 +10,7 @@ apply plugin: "org.jetbrains.dokka" apply plugin: 'io.radar.mvnpublish' ext { - radarVersion = '3.18.10-beta.1' + radarVersion = '3.18.10-beta.2' } String buildNumber = ".${System.currentTimeMillis()}" diff --git a/sdk/src/main/java/io/radar/sdk/model/RadarVerifiedLocationToken.kt b/sdk/src/main/java/io/radar/sdk/model/RadarVerifiedLocationToken.kt index b9da8d83..ad62eaca 100644 --- a/sdk/src/main/java/io/radar/sdk/model/RadarVerifiedLocationToken.kt +++ b/sdk/src/main/java/io/radar/sdk/model/RadarVerifiedLocationToken.kt @@ -52,9 +52,9 @@ class RadarVerifiedLocationToken( val _id: String, /** - * The raw JSON value of the token. + * The full JSON value of the token. */ - val rawJson: JSONObject, + val fullJson: JSONObject, ) { internal companion object { private const val FIELD_USER = "user" @@ -76,7 +76,7 @@ class RadarVerifiedLocationToken( val token: String? = obj.optString(FIELD_TOKEN) val expiresAt: Date? = RadarUtils.isoStringToDate(obj.optString(FIELD_EXPIRES_AT)) val expiresIn: Int = obj.optInt(FIELD_EXPIRES_IN) - val passed: Boolean = user?.fraud?.passed == true && user.country?.passed == true && user.state?.passed == true + val passed: Boolean = obj.optBoolean(FIELD_PASSED) val failureReasons = obj.optJSONArray(FIELD_FAILURE_REASONS)?.let { failureReasons -> Array(failureReasons.length()) { failureReasons.optString(it) @@ -93,7 +93,7 @@ class RadarVerifiedLocationToken( } fun toJson(): JSONObject { - return rawJson + return fullJson } } \ No newline at end of file