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

jp.webpay.model.ChargeList 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 lombok.ToString;
import net.arnx.jsonic.JSON;

import java.util.List;

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy