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

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

There is a newer version: 2.16.0
Show newest version
package io.sphere.sdk.orders;

import io.sphere.sdk.annotations.FactoryMethod;
import io.sphere.sdk.annotations.ResourceDraftValue;
import io.sphere.sdk.types.CustomFieldsDraft;

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


@ResourceDraftValue(factoryMethods = {@FactoryMethod(parameterNames = {})})
public interface ParcelDraft {
    @Nullable
    ParcelMeasurements getMeasurements();

    @Nullable
    TrackingData getTrackingData();

    @Nullable
    List getItems();

    @Nullable
    CustomFieldsDraft getCustom();

    static ParcelDraft of(final ParcelMeasurements measurements, final TrackingData trackingData) {
        return new ParcelDraftDsl(null, null, measurements, trackingData);
    }

    static ParcelDraft of(final ParcelMeasurements measurements) {
        return new ParcelDraftDsl(null, null, measurements, null);
    }

    static ParcelDraft of(final TrackingData trackingData) {
        return new ParcelDraftDsl(null, null, null, trackingData);
    }

    static ParcelDraft of(final TrackingData trackingData, final List deliveryItems) { 
        return new ParcelDraftDsl(null, deliveryItems, null, trackingData);
    }

    static ParcelDraft of(final TrackingData trackingData, final List deliveryItems, final CustomFieldsDraft custom) {
        return new ParcelDraftDsl(custom, deliveryItems, null, trackingData);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy