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

io.sphere.sdk.orders.Order Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.orders;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.neovisionaries.i18n.CountryCode;
import io.sphere.sdk.carts.*;
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.states.State;
import io.sphere.sdk.types.CustomFields;

import javax.annotation.Nullable;
import javax.money.MonetaryAmount;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.Set;

/**
 An order can be created from a cart, usually after a checkout process has been completed. Orders can also be imported.

 

An order can have {@link io.sphere.sdk.types.Custom custom fields}.

*/ @JsonDeserialize(as=OrderImpl.class) public interface Order extends CartLike { static String resourceTypeId() { return "order"; } static String referenceTypeId(){ return "order"; } /** * * @deprecated use {@link #referenceTypeId()} instead * @return referenceTypeId */ @Deprecated static String typeId(){ return "order"; } static TypeReference typeReference() { return new TypeReference() { @Override public String toString() { return "TypeReference"; } }; } @Override default Reference toReference() { return Reference.of(referenceTypeId(), getId(), this); } @Nullable String getOrderNumber(); InventoryMode getInventoryMode(); OrderState getOrderState(); @Nullable ShipmentState getShipmentState(); @Nullable PaymentState getPaymentState(); @Nullable OrderShippingInfo getShippingInfo(); Set getSyncInfo(); List getReturnInfo(); Long getLastMessageSequenceNumber(); @Override @Nullable 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(); ZonedDateTime getCompletedAt(); /** * Set when this order was created from a cart. The cart will have the state Ordered. * * @return cart reference or null */ @Nullable Reference getCart(); @Override List getDiscountCodes(); @Nullable @Override CustomFields getCustom(); /** * Returns this state of this Order. * * @return state of this order or null * * @see io.sphere.sdk.orders.commands.updateactions.TransitionState */ @Nullable Reference getState(); /** * Get associated payments. * * @return payments * @see io.sphere.sdk.orders.commands.updateactions.AddPayment * @see io.sphere.sdk.orders.commands.updateactions.RemovePayment */ @Nullable @Override PaymentInfo getPaymentInfo(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy