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-M26
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.discountcodes.DiscountCodeInfo;
import io.sphere.sdk.models.Address;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.types.CustomFields;

import javax.annotation.Nullable;
import javax.money.MonetaryAmount;
import java.util.List;

/**
 A shopping cart holds product variants and can be ordered. Each cart either belongs to a registered customer or is an anonymous cart.

 

A cart can have {@link io.sphere.sdk.types.Custom custom fields}.

*/ @JsonDeserialize(as=CartImpl.class) public interface Cart extends CartLike { static String resourceTypeId() { return "order";//sic http://dev.sphere.io/http-api-projects-custom-fields.html#customizable-resource } static String referenceTypeId() { return "cart"; } /** * * @deprecated use {@link #referenceTypeId()} instead */ @Deprecated static String typeId() { return "cart"; } static TypeReference typeReference() { return new TypeReference() { @Override public String toString() { return "TypeReference"; } }; } @Override default Reference toReference() { return Reference.of(referenceTypeId(), getId(), this); } CartState getCartState(); InventoryMode getInventoryMode(); @Nullable CartShippingInfo getShippingInfo(); @Nullable @Override Address getBillingAddress(); @Override @Nullable CountryCode getCountry(); @Override @Nullable String getCustomerEmail(); @Override @Nullable Reference getCustomerGroup(); @Override @Nullable String getCustomerId(); @Override List getCustomLineItems(); @Override List getLineItems(); @Override @Nullable Address getShippingAddress(); @Override @Nullable TaxedPrice getTaxedPrice(); @Override MonetaryAmount getTotalPrice(); @Override List getDiscountCodes(); @Nullable @Override CustomFields getCustom(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy