Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add notifications to stripe-java. This is untested, because I haven't…

… used Java in a few years.
  • Loading branch information...
commit 52e01c1b77e333882e706c4943d74d0a3304f870 1 parent ff0657d
@boucher boucher authored
View
63 src/main/java/com/stripe/model/Notification.java
@@ -0,0 +1,63 @@
+package com.stripe.model;
+
+import java.util.Map;
+
+import com.stripe.exception.StripeException;
+import com.stripe.net.APIResource;
+
+public class Notification extends APIResource {
+ String id;
+ String event;
+ String livemode;
+ Long created;
+ Map<String, Object> data;
+
+ public static Notification retrieve(String id) throws StripeException {
+ return request(RequestMethod.GET, instanceURL(Notification.class, id), null, Notification.class);
+ }
+
+ public static NotificationCollection all(Map<String, Object> params) throws StripeException {
+ return request(RequestMethod.GET, classURL(Notification.class), params, NotificationCollection.class);
+ }
+
+ public Map<String, Object> getData() {
+ return data;
+ }
+
+ public void setData(Map<String, Object> data) {
+ this.data = data;
+ }
+
+ public Long getCreated() {
+ return created;
+ }
+
+ public void setCreated(Long created) {
+ this.created = created;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getEvent() {
+ return name;
+ }
+
+ public void setEvent(String name) {
+ this.event = name;
+ }
+
+ public String getLivemode() {
+ return livemode;
+ }
+
+ public void setLivemode(String livemode) {
+ this.livemode = livemode;
+ }
+
+}
View
21 src/main/java/com/stripe/model/NotificationCollection.java
@@ -0,0 +1,21 @@
+package com.stripe.model;
+
+import java.util.List;
+
+public class NotificationCollection extends StripeObject {
+ List<Notification> data;
+ Integer count;
+
+ public List<Notification> getData() {
+ return data;
+ }
+ public void setData(List<Notification> data) {
+ this.data = data;
+ }
+ public Integer getCount() {
+ return count;
+ }
+ public void setCount(Integer count) {
+ this.count = count;
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.