package inn.ocsf.bee.freigeld.core.model;

import java.util.HashMap;
import java.util.Map;

public class BankExchangeDetails {

    private String description;

    private Map<String, Object> extraFields = new HashMap<>();

    public BankExchangeDetails() {
    }

    public Map<String, Object> getExtraFields() {
        return extraFields;
    }

    public void setExtraFields(Map<String, Object> extraFields) {
        this.extraFields = extraFields;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public static final class BankExchangeDetailsBuilder {
        private String description;
        private Map<String, Object> extraFields = new HashMap<>();

        private BankExchangeDetailsBuilder() {
        }

        public static BankExchangeDetailsBuilder aBankExchangeDetails() {
            return new BankExchangeDetailsBuilder();
        }

        public BankExchangeDetailsBuilder withDescription(String description) {
            this.description = description;
            return this;
        }

        public BankExchangeDetailsBuilder withExtraFields(Map<String, Object> extraFields) {
            this.extraFields = extraFields;
            return this;
        }

        public BankExchangeDetails build() {
            BankExchangeDetails bankExchangeDetails = new BankExchangeDetails();
            bankExchangeDetails.setDescription(description);
            bankExchangeDetails.setExtraFields(extraFields);
            return bankExchangeDetails;
        }
    }
}
