io.sphere.sdk.carts.Cart Maven / Gradle / Ivy
The newest version!
package io.sphere.sdk.carts;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.neovisionaries.i18n.CountryCode;
import io.sphere.sdk.customergroups.CustomerGroup;
import io.sphere.sdk.models.Address;
import io.sphere.sdk.models.DefaultModel;
import io.sphere.sdk.models.Reference;
import javax.money.MonetaryAmount;
import java.util.List;
import java.util.Optional;
@JsonDeserialize(as=CartImpl.class)
public interface Cart extends DefaultModel {
public static String typeId(){
return "cart";
}
public static TypeReference typeReference() {
return new TypeReference() {
@Override
public String toString() {
return "TypeReference";
}
};
}
@Override
default Reference toReference() {
return new Reference<>(typeId(), getId(), Optional.of(this));
}
Optional getCustomerId();
Optional getCustomerEmail();
List getLineItems();
List getCustomLineItems();
MonetaryAmount getTotalPrice();
Optional getTaxedPrice();
CartState getCartState();
Optional getShippingAddress();
Optional getBillingAddress();
InventoryMode getInventoryMode();
Optional> getCustomerGroup();
Optional getCountry();
Optional getShippingInfo();
}