Skip to content

Commit

Permalink
full JSON, passed flag
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpatrick committed Dec 11, 2024
1 parent 8513568 commit b84cf03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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<String>(failureReasons.length()) {
failureReasons.optString(it)
Expand All @@ -93,7 +93,7 @@ class RadarVerifiedLocationToken(
}

fun toJson(): JSONObject {
return rawJson
return fullJson
}

}

0 comments on commit b84cf03

Please # to comment.