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

io.sphere.sdk.carts.Cart Maven / Gradle / Ivy

There is a newer version: 1.0.0-M12
Show 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.Reference;
import io.sphere.sdk.orders.OrderLike;

import javax.money.MonetaryAmount;
import java.util.List;
import java.util.Optional;

@JsonDeserialize(as=CartImpl.class)
public interface Cart extends OrderLike {

    public static String typeId(){
        return "cart";
    }

    public static TypeReference typeReference() {
        return new TypeReference() {
            @Override
            public String toString() {
                return "TypeReference";
            }
        };
    }

    @Override
    default Reference toReference() {
        return Reference.of(typeId(), getId(), this);
    }

    CartState getCartState();

    InventoryMode getInventoryMode();

    Optional getShippingInfo();

    @Override
    Optional
getBillingAddress(); @Override Optional getCountry(); @Override Optional getCustomerEmail(); @Override Optional> getCustomerGroup(); @Override Optional getCustomerId(); @Override List getCustomLineItems(); @Override List getLineItems(); @Override Optional
getShippingAddress(); @Override Optional getTaxedPrice(); @Override MonetaryAmount getTotalPrice(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy