diff --git a/src/main/java/com/chint/interfaces/rest/ctrip/CTripTokenRequest.java b/src/main/java/com/chint/interfaces/rest/ctrip/CTripTokenRequest.java index e7262e73..395ec8b1 100644 --- a/src/main/java/com/chint/interfaces/rest/ctrip/CTripTokenRequest.java +++ b/src/main/java/com/chint/interfaces/rest/ctrip/CTripTokenRequest.java @@ -26,4 +26,13 @@ public class CTripTokenRequest { .getData() .getAccessToken(); } + + public String getToken(Integer tokenType) { + GetUnionAccessTokenRequest getUnionAccessTokenRequest = + GetUnionAccessTokenRequest.of(C_TRIP_APP_KEY, C_TRIP_APP_SECURITY, tokenType); + return postRequest + .post(tokenUrl, getUnionAccessTokenRequest, AccessTokenResponse.class) + .getData() + .getAccessToken(); + } }