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

com.wix.restaurants.builders.PickupBuilder Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package com.wix.restaurants.builders;

import com.openrest.olo.dispatches.Dispatch;
import com.openrest.olo.dispatches.PickupDispatch;
import com.wix.restaurants.TimeGuarantees;

import java.util.Date;

public class PickupBuilder {
    private final PickupDispatch pickupDispatch = new PickupDispatch();

    public PickupBuilder forAsap() {
        pickupDispatch.timeGuarantee = TimeGuarantees.before;
        pickupDispatch.time = null;
        return this;
    }

    public PickupBuilder forFutureTime(Date when) {
        pickupDispatch.timeGuarantee = TimeGuarantees.approximate;
        pickupDispatch.time = when;
        return this;
    }

    public PickupDispatch build() {
        return pickupDispatch;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy