All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.univapay.sdk.resources.StoresResource Maven / Gradle / Ivy

There is a newer version: 0.2.35
Show newest version
package com.univapay.sdk.resources;

import com.univapay.sdk.constants.UnivapayConstants;
import com.univapay.sdk.models.common.*;
import com.univapay.sdk.models.common.Domain;
import com.univapay.sdk.models.common.IdempotencyKey;
import com.univapay.sdk.models.common.StoreId;
import com.univapay.sdk.models.common.UnivapayCustomerId;
import com.univapay.sdk.models.common.Void;
import com.univapay.sdk.models.request.store.CustomerIdRequest;
import com.univapay.sdk.models.request.store.StoreCreateData;
import com.univapay.sdk.models.response.PaginatedList;
import com.univapay.sdk.models.response.store.CheckoutInfo;
import com.univapay.sdk.models.response.store.Store;
import com.univapay.sdk.models.response.store.StoreWithConfiguration;
import com.univapay.sdk.types.CursorDirection;
import org.jetbrains.annotations.Nullable;
import retrofit2.Call;
import retrofit2.http.*;

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(UnivapayConstants.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(UnivapayConstants.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);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy