jp.gopay.sdk.resources.ApplicationTokenResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gopay-java-sdk Show documentation
Show all versions of gopay-java-sdk Show documentation
Official Gyro-n Payments Java SDK
package jp.gopay.sdk.resources;
import jp.gopay.sdk.constants.GopayConstants;
import jp.gopay.sdk.models.common.*;
import jp.gopay.sdk.models.common.Void;
import jp.gopay.sdk.models.request.applicationtoken.CreateAppTokenReq;
import jp.gopay.sdk.models.request.applicationtoken.CreateMerchantAppJWTReq;
import jp.gopay.sdk.models.request.applicationtoken.CreateStoreAppJWTReq;
import jp.gopay.sdk.models.request.store.UpdateAppTokenReq;
import jp.gopay.sdk.models.response.PaginatedList;
import jp.gopay.sdk.models.response.applicationtoken.ApplicationToken;
import jp.gopay.sdk.models.response.applicationtoken.MerchantApplicationJWT;
import jp.gopay.sdk.models.response.applicationtoken.StoreApplicationJWT;
import jp.gopay.sdk.types.ProcessingMode;
import retrofit2.Call;
import retrofit2.http.*;
/**
* Resource for managing a store's credentials.
*/
public interface ApplicationTokenResource {
@GET("/stores/{storeId}/app_tokens")
Call> listAppTokens(@Path("storeId") StoreId storeId,
@Query("mode") ProcessingMode processingMode);
@DELETE("/stores/{storeId}/app_tokens/{appTokenId}")
Call deleteAppToken(
@Path("storeId") StoreId storeId,
@Path("appTokenId") AppTokenId appTokenId
);
@POST("/stores/{storeId}/app_tokens")
Call createAppToken(
@Path("storeId") StoreId storeId,
@Body CreateAppTokenReq dataToPost
);
@PATCH("/stores/{storeId}/app_tokens/{appTokenId}")
Call updateAppToken(
@Path("storeId") StoreId storeId,
@Path("appTokenId") AppTokenId appTokenId,
@Body UpdateAppTokenReq dataToPost,
@Header(GopayConstants.idempotencyKeyHeaderName) IdempotencyKey idempotencyKey
);
// JWT Application token resources
@GET("/app_jwts")
Call> listMerchantAppJWT();
@POST("/app_jwts")
Call createMerchantAppJWT(
@Body CreateMerchantAppJWTReq dataToPost
);
@DELETE("/app_jwts/{jwtId}")
Call deleteMerchantAppJWT(
@Path("jwtId") AppJWTId appJWTId
);
@GET("/stores/{storeId}/app_jwts")
Call> listStoreAppJWT(
@Path("storeId") StoreId storeId
);
@POST("/stores/{storeId}/app_jwts")
Call createStoreAppJWT(
@Path("storeId") StoreId storeId,
@Body CreateStoreAppJWTReq dataToPost
);
@DELETE("/stores/{storeId}/app_jwts/{jwtId}")
Call deleteStoreAppJWT(
@Path("storeId") StoreId storeId,
@Path("jwtId") AppJWTId appJWTId
);
}