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

io.sphere.sdk.inventories.InventoryEntry Maven / Gradle / Ivy

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

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.channels.Channel;
import io.sphere.sdk.models.DefaultModel;
import io.sphere.sdk.models.Reference;

import java.time.Instant;
import java.util.Optional;

@JsonDeserialize(as = InventoryEntryImpl.class)
public interface InventoryEntry extends DefaultModel {
    long getAvailableQuantity();

    Optional getExpectedDelivery();

    long getQuantityOnStock();

    Optional getRestockableInDays();

    String getSku();

    Optional> getSupplyChannel();

    //reservations are internal

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

    static String typeId(){
        return "inventory-entry";
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy