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

jp.webpay.model.EventList Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package jp.webpay.model;

import jp.webpay.api.WebPayClient;
import jp.webpay.exception.ApiConnectionException;
import lombok.NonNull;
import net.arnx.jsonic.JSON;

import java.util.List;

public class EventList extends EntityList {
    public void setData(@NonNull List data) {
        this.data = data;
    }

    public static EventList fromJsonResponse(@NonNull WebPayClient client, @NonNull String json) {
        EventList list;
        try {
            list = JSON.decode(json, EventList.class);
        } catch (net.arnx.jsonic.JSONException e) {
            throw ApiConnectionException.jsonException(json);
        }
        for (Event row : list.getData()) {
            row.client = client;
        }
        return list;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy