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

com.riskified.models.RefundOrder Maven / Gradle / Ivy

The newest version!
package com.riskified.models;

import java.util.ArrayList;
import java.util.List;

import com.riskified.validations.*;

public class RefundOrder implements IValidated {

    private String id;
    private List refunds;

    public RefundOrder() {
        refunds = new ArrayList();
    }

    public void validate(Validation validationType)
    throws FieldBadFormatException {

        Validate.notNullOrEmpty(this, this.id, "Id");

        if (validationType == Validation.ALL) {
            Validate.notNull(this, this.refunds, "Refunds");
        }

        if (this.refunds != null) {
            for (RefundDetails refundDetails : this.refunds) {
                refundDetails.validate(validationType);
            }
        }

    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public List getRefunds() {
        return refunds;
    }

    public void setRefunds(List refunds) {
        this.refunds = refunds;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy