jp.gopay.sdk.resources.StoresResource 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.store.CustomerIdRequest;
import jp.gopay.sdk.models.request.store.StoreCreateData;
import jp.gopay.sdk.models.response.PaginatedList;
import jp.gopay.sdk.models.response.store.CheckoutInfo;
import jp.gopay.sdk.models.response.store.Store;
import jp.gopay.sdk.models.response.store.StoreWithConfiguration;
import jp.gopay.sdk.types.CursorDirection;
import retrofit2.Call;
import retrofit2.http.*;
import javax.annotation.Nullable;
public interface StoresResource{
@GET("/stores")
Call> list(
@Query("limit") @Nullable Integer limit,
@Query("cursor_direction") @Nullable CursorDirection cursorDirection,
@Query("cursor") @Nullable StoreId cursor,
@Query("search") @Nullable String search
);
@POST("/stores")
Call create(
@Body StoreCreateData dataToPost,
@Header(GopayConstants.idempotencyKeyHeaderName) IdempotencyKey idempotencyKey
);
@GET("/stores/{storeId}")
Call get(
@Path("storeId") StoreId storeId
);
@PATCH("/stores/{storeId}")
Call update(
@Path("storeId") StoreId storeId,
@Body StoreCreateData dataToPost,
@Header(GopayConstants.idempotencyKeyHeaderName) IdempotencyKey idempotencyKey
);
@DELETE("/stores/{storeId}")
Call delete(
@Path("storeId") StoreId storeId
);
@GET("/checkout_info")
Call getCheckoutInfo(
@Query("origin") Domain origin
);
@POST("/stores/{storeId}/create_customer_id")
Call createCustomerId(
@Path("storeId") StoreId storeId,
@Body CustomerIdRequest userId
);
}