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

io.fruitful.ecomerce.proxy.MagentoCartApi Maven / Gradle / Ivy

There is a newer version: 1.2
Show newest version
package io.fruitful.ecomerce.proxy;


import io.fruitful.ecomerce.dto.*;
import io.fruitful.ecomerce.enums.SecurityConst;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.List;

public interface MagentoCartApi {

    @POST("rest/V1/carts/mine")
    Call createCart(@Header(SecurityConst.AUTHORIZATION_HEADER) String bearerToken);

    @GET("rest/V1/carts/mine")
    Call getCurrentCart(@Header(SecurityConst.AUTHORIZATION_HEADER) String bearerToken);

    @POST("rest/V1/carts/mine/items")
    Call addProductToCart(@Header(SecurityConst.AUTHORIZATION_HEADER)  String bearerToken, @Body MagentoAddProductToCartRequest request);

    @DELETE("rest/V1/carts/mine/items/{itemId}")
    Call removeItemsCart(@Header(SecurityConst.AUTHORIZATION_HEADER)  String bearerToken, @Path("itemId") Long itemId);

    @GET("rest/V1/carts/mine/totals")
    Call getCartTotals(@Header(SecurityConst.AUTHORIZATION_HEADER)  String bearerToken);

    @PUT("rest/V1/carts/mine/items/{itemId}")
    Call updateProductCart(@Header(SecurityConst.AUTHORIZATION_HEADER)  String bearerToken, @Path("itemId") Long itemId, @Body MagentoAddProductToCartRequest request);

    @GET("rest/V1/directory/countries")
    Call> getCountries();

    @GET("rest/V1/directory/countries/{countryId}")
    Call getCountryDetail(@Path("countryId") String countryId);

    @POST("rest/default/V1/carts/mine/estimate-shipping-methods")
    Call> estimateShippingMethods(@Header(SecurityConst.AUTHORIZATION_HEADER) String token, @Body MagentoEstimateShippingRequest request);

    @POST("rest/default/V1/carts/mine/shipping-information")
    Call getShippingInfo(@Header(SecurityConst.AUTHORIZATION_HEADER) String token, @Body MagentoShippingInfoRequest request);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy