Deserialization of Subscription next capture timestamp is not working properly, because implementation expects timestamp to be in milliseconds instead of seconds returned by the API. Here's a patch, which would fix this issue:
diff --git a/src/main/java/com/paymill/models/Subscription.java b/src/main/java/com/paymill/models/Subscription.java
index fc64fe2..03a391c 100755
--- a/src/main/java/com/paymill/models/Subscription.java
+++ b/src/main/java/com/paymill/models/Subscription.java
@@ -96,10 +96,20 @@ public final class Subscription {
return this.nextCaptureAt;
}
- @JsonIgnore
public void setNextCaptureAt( final Date nextCaptureAt ) {
this.nextCaptureAt = nextCaptureAt;
}
- /**
- * Sets the next capture.
- * @param seconds
- * Next capture representation is seconds.
- */
- public void setNextCaptureAt( final long seconds ) {
- this.nextCaptureAt = new Date( seconds * 1000 );
- }
public Payment getPayment() {
return this.payment;
}
Deserialization of Subscription next capture timestamp is not working properly, because implementation expects timestamp to be in milliseconds instead of seconds returned by the API. Here's a patch, which would fix this issue:
diff --git a/src/main/java/com/paymill/models/Subscription.java b/src/main/java/com/paymill/models/Subscription.java
index fc64fe2..03a391c 100755
--- a/src/main/java/com/paymill/models/Subscription.java
+++ b/src/main/java/com/paymill/models/Subscription.java
@@ -96,10 +96,20 @@ public final class Subscription {
return this.nextCaptureAt;
}
public void setNextCaptureAt( final Date nextCaptureAt ) {
this.nextCaptureAt = nextCaptureAt;
}
public Payment getPayment() {
return this.payment;
}