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

com.unzer.payment.Metadata Maven / Gradle / Ivy

package com.unzer.payment;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;

public class Metadata extends BaseResource {
    private String id;
    private Map metadataMap;
    private Unzer unzer;

    public Metadata() {
        this(false);
    }

    public Metadata(boolean sorted) {
        if (sorted) {
            metadataMap = new TreeMap();
        } else {
            metadataMap = new LinkedHashMap();
        }
    }

    public Metadata addMetadata(String key, String value) {
        getMetadataMap().put(key, value);
        return this;
    }

    public Map getMetadataMap() {
        return metadataMap;
    }

    public void setMetadataMap(Map metadataMap) {
        this.metadataMap = metadataMap;
    }

    public String getId() {
        return id;
    }

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

    @Override
    public String getResourceUrl() {
        return "/v1/metadata/";
    }

    @Deprecated
    public Unzer getUnzer() {
        return unzer;
    }

    @Deprecated
    public void setUnzer(Unzer unzer) {
        this.unzer = unzer;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy