org.oxerr.viagogo.model.request.sale.SaleRequest Maven / Gradle / Ivy
package org.oxerr.viagogo.model.request.sale;
import java.util.Locale;
import org.oxerr.viagogo.model.Link;
import org.oxerr.viagogo.model.request.PagedRequest;
import io.openapitools.jackson.dataformat.hal.HALLink;
/**
* Query parameter for List
* sales.
*/
public class SaleRequest extends PagedRequest {
private static final long serialVersionUID = 2023112401L;
public enum Sort implements PagedRequest.Sort {
CREATED_AT,
EVENT_DATE,
INHAND_AT,
PAYMENT_AMOUNT,
QUANTITY,
RESOURCE_VERSION;
@Override
public String getCode() {
return this.name().toLowerCase(Locale.US);
}
}
public static SaleRequest from(HALLink halLink) {
return new SaleRequest(new Link(halLink));
}
public SaleRequest() {
}
public SaleRequest(Link link) {
super(link);
}
}