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

com.checkout.common.Resource Maven / Gradle / Ivy

There is a newer version: 6.4.2
Show newest version
package com.checkout.common;

import com.checkout.HttpMetadata;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

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

@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public abstract class Resource extends HttpMetadata {

    @SerializedName("_links")
    private Map links = new HashMap<>();

    public Link getSelfLink() {
        return getLink("self");
    }

    public Link getLink(final String relation) {
        return links.get(relation);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy