com.buyexpressly.api.resource.merchant.InvoiceListResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-sdk Show documentation
Show all versions of plugin-sdk Show documentation
Expressly Java SDK to integrate e-commerce platforms with the Expressly Network API
package com.buyexpressly.api.resource.merchant;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonMethod;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@JsonAutoDetect(value = JsonMethod.FIELD, fieldVisibility = JsonAutoDetect.Visibility.ANY)
public final class InvoiceListResponse {
private final List invoices;
private InvoiceListResponse(Builder builder) {
this.invoices = Collections.unmodifiableList(builder.invoices);
}
public static Builder builder() {
return new Builder();
}
public List getInvoices() {
return invoices;
}
public static final class Builder {
private final List invoices = new ArrayList<>();
public Builder add(InvoiceResponse invoice) {
invoices.add(invoice);
return this;
}
public Builder addAll(List retrieved) {
invoices.addAll(retrieved);
return this;
}
public InvoiceListResponse build() {
return new InvoiceListResponse(this);
}
}
}