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

com.buyexpressly.api.resource.merchant.InvoiceListResponse Maven / Gradle / Ivy

Go to download

Expressly Java SDK to integrate e-commerce platforms with the Expressly Network API

There is a newer version: 2.3.1
Show newest version
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);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy