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

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

The newest version!
package io.sphere.sdk.carts;

import com.neovisionaries.i18n.CountryCode;
import io.sphere.sdk.customergroups.CustomerGroup;
import io.sphere.sdk.models.Address;
import io.sphere.sdk.models.DefaultModelImpl;
import io.sphere.sdk.models.Reference;

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

class CartImpl extends DefaultModelImpl implements Cart {
    private final Optional customerId;
    private final Optional customerEmail;
    private final List lineItems;
    private final List customLineItems;
    private final MonetaryAmount totalPrice;
    private final Optional taxedPrice;
    private final CartState cartState;
    private final Optional
shippingAddress; private final Optional
billingAddress; private final InventoryMode inventoryMode; private final Optional> customerGroup; private final Optional country; private final Optional shippingInfo; CartImpl(final String id, final long version, final Instant createdAt, final Instant lastModifiedAt, final Optional customerId, final Optional customerEmail, final List lineItems, final List customLineItems, final MonetaryAmount totalPrice, final Optional taxedPrice, final CartState cartState, final Optional
shippingAddress, final Optional
billingAddress, final InventoryMode inventoryMode, final Optional> customerGroup, final Optional country, final Optional shippingInfo) { super(id, version, createdAt, lastModifiedAt); this.customerId = customerId; this.customerEmail = customerEmail; this.lineItems = lineItems; this.customLineItems = customLineItems; this.totalPrice = totalPrice; this.taxedPrice = taxedPrice; this.cartState = cartState; this.shippingAddress = shippingAddress; this.billingAddress = billingAddress; this.inventoryMode = inventoryMode; this.customerGroup = customerGroup; this.country = country; this.shippingInfo = shippingInfo; } @Override public Optional getCustomerId() { return customerId; } @Override public Optional getCustomerEmail() { return customerEmail; } @Override public List getLineItems() { return lineItems; } @Override public List getCustomLineItems() { return customLineItems; } @Override public MonetaryAmount getTotalPrice() { return totalPrice; } @Override public Optional getTaxedPrice() { return taxedPrice; } @Override public CartState getCartState() { return cartState; } @Override public Optional
getShippingAddress() { return shippingAddress; } @Override public Optional
getBillingAddress() { return billingAddress; } @Override public InventoryMode getInventoryMode() { return inventoryMode; } @Override public Optional> getCustomerGroup() { return customerGroup; } @Override public Optional getCountry() { return country; } @Override public Optional getShippingInfo() { return shippingInfo; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy