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

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

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

import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.CreationTimestamped;

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

public class Parcel extends Base implements CreationTimestamped {
    private final String id;
    private final Instant createdAt;
    private final Optional measurements;
    private final Optional trackingData;

    private Parcel(final String id, final Instant createdAt, final Optional measurements, final Optional trackingData) {
        this.id = id;
        this.createdAt = createdAt;
        this.measurements = measurements;
        this.trackingData = trackingData;
    }

    public static Parcel of(final String id, final Instant createdAt, final Optional measurements, final Optional trackingData) {
        return new Parcel(id, createdAt, measurements, trackingData);
    }

    public String getId() {
        return id;
    }

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

    public Optional getMeasurements() {
        return measurements;
    }

    public Optional getTrackingData() {
        return trackingData;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy