Skip to content

Commit

Permalink
Bump gson version.
Browse files Browse the repository at this point in the history
  • Loading branch information
sshropshire committed Oct 11, 2024
1 parent 5f352ec commit d46b91f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class SDKSampleServerAPI {
if (DEFAULT_ORDER_ID != null) {
Order(DEFAULT_ORDER_ID, "CREATED")
} else {
val body = JsonParser().parse(orderRequest.toString()) as JsonObject
val body = JsonParser.parseString(orderRequest.toString()) as JsonObject
findService(merchantIntegration).createOrder(body)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CreateCardPaymentTokenUseCase @Inject constructor(
}
"""

val requestJson = JsonParser().parse(request) as JsonObject
val requestJson = JsonParser.parseString(request) as JsonObject
sdkSampleServerAPI.createPaymentToken(requestJson)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CreateCardSetupTokenUseCase @Inject constructor(
}
}
"""
val jsonOrder = JsonParser().parse(request) as JsonObject
val jsonOrder = JsonParser.parseString(request) as JsonObject
sdkSampleServerAPI.createSetupToken(jsonOrder)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CreatePayPalPaymentTokenUseCase @Inject constructor(
}
"""

val requestJson = JsonParser().parse(request) as JsonObject
val requestJson = JsonParser.parseString(request) as JsonObject
sdkSampleServerAPI.createPayPalPaymentToken(requestJson)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CreatePayPalSetupTokenUseCase @Inject constructor(
// Ref: https://stackoverflow.com/a/19610814
val body = request.replace("\\/", "/")

val jsonOrder = JsonParser().parse(body) as JsonObject
val jsonOrder = JsonParser.parseString(body) as JsonObject
sdkSampleServerAPI.createPayPalSetupToken(jsonOrder)
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ buildscript {

// Networking
"retrofit" : "com.squareup.retrofit2:retrofit:2.9.0",
"gson" : "com.squareup.retrofit2:converter-gson:2.3.0",
"gson" : "com.squareup.retrofit2:converter-gson:2.11.0",
"loggingInterceptor" : "com.squareup.okhttp3:logging-interceptor:4.9.2",

// Dependency Injection
Expand Down

0 comments on commit d46b91f

Please sign in to comment.