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

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

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

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.CreationTimestamped;
import io.sphere.sdk.models.Identifiable;

import java.time.ZonedDateTime;
import java.util.List;

public class Delivery extends Base implements Identifiable, CreationTimestamped {
    private final String id;
    private final ZonedDateTime createdAt;
    private final List items;
    private final List parcels;

    @JsonCreator
    private Delivery(final String id, final ZonedDateTime createdAt, final List items, final List parcels) {
        this.id = id;
        this.createdAt = createdAt;
        this.items = items;
        this.parcels = parcels;
    }

    public static Delivery of(final String id, final ZonedDateTime createdAt, final List items, final List parcels) {
        return new Delivery(id, createdAt, items, parcels);
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public ZonedDateTime getCreatedAt() {
        return createdAt;
    }

    public List getItems() {
        return items;
    }

    public List getParcels() {
        return parcels;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy