com.gocardless.http.WebhookParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gocardless-pro Show documentation
Show all versions of gocardless-pro Show documentation
Client library for accessing the GoCardless Pro API
package com.gocardless.http;
import com.gocardless.resources.Event;
import com.google.common.collect.ImmutableList;
import com.google.gson.*;
import com.google.gson.reflect.TypeToken;
import java.util.List;
public final class WebhookParser {
private WebhookParser() {}
public static ImmutableList parse(String responseBody) {
Gson gson = GsonFactory.build();
ResponseParser responseParser = new ResponseParser(gson);
return responseParser.parseMultiple(responseBody, "events",
new TypeToken>() {});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy