diff --git a/pom.xml b/pom.xml
index 9f5ad3e..bca5874 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
jar
- 2.1.0
+ 2.2.0-SNAPSHOT
nl.stil4m
mollie-api
Mollie API
diff --git a/src/main/java/nl/stil4m/mollie/Client.java b/src/main/java/nl/stil4m/mollie/Client.java
index f87f6e5..a2f4ad7 100644
--- a/src/main/java/nl/stil4m/mollie/Client.java
+++ b/src/main/java/nl/stil4m/mollie/Client.java
@@ -1,6 +1,12 @@
package nl.stil4m.mollie;
-import nl.stil4m.mollie.concepts.*;
+import nl.stil4m.mollie.concepts.CustomerPayments;
+import nl.stil4m.mollie.concepts.Customers;
+import nl.stil4m.mollie.concepts.Issuers;
+import nl.stil4m.mollie.concepts.Methods;
+import nl.stil4m.mollie.concepts.Payments;
+import nl.stil4m.mollie.concepts.Refunds;
+import nl.stil4m.mollie.concepts.Status;
public class Client {
@@ -33,4 +39,11 @@ public Refunds refunds() {
return dynamicClient.refunds(apiKey);
}
+ public Customers customers() {
+ return dynamicClient.customers(apiKey);
+ }
+
+ public CustomerPayments customerPayments(String customerId) {
+ return dynamicClient.customerPayments(apiKey, customerId);
+ }
}
diff --git a/src/main/java/nl/stil4m/mollie/DynamicClient.java b/src/main/java/nl/stil4m/mollie/DynamicClient.java
index 14ab917..5cae9d8 100644
--- a/src/main/java/nl/stil4m/mollie/DynamicClient.java
+++ b/src/main/java/nl/stil4m/mollie/DynamicClient.java
@@ -1,6 +1,12 @@
package nl.stil4m.mollie;
-import nl.stil4m.mollie.concepts.*;
+import nl.stil4m.mollie.concepts.CustomerPayments;
+import nl.stil4m.mollie.concepts.Customers;
+import nl.stil4m.mollie.concepts.Issuers;
+import nl.stil4m.mollie.concepts.Methods;
+import nl.stil4m.mollie.concepts.Payments;
+import nl.stil4m.mollie.concepts.Refunds;
+import nl.stil4m.mollie.concepts.Status;
public class DynamicClient {
@@ -32,4 +38,11 @@ public Refunds refunds(String apiKey) {
return new Refunds(apiKey, endpoint, requestExecutor);
}
+ public Customers customers(String apiKey) {
+ return new Customers(apiKey, endpoint, requestExecutor);
+ }
+
+ public CustomerPayments customerPayments(String apiKey, String customerId) {
+ return new CustomerPayments(apiKey, endpoint, requestExecutor, customerId);
+ }
}
diff --git a/src/main/java/nl/stil4m/mollie/concepts/CustomerPayments.java b/src/main/java/nl/stil4m/mollie/concepts/CustomerPayments.java
new file mode 100644
index 0000000..f20122f
--- /dev/null
+++ b/src/main/java/nl/stil4m/mollie/concepts/CustomerPayments.java
@@ -0,0 +1,55 @@
+package nl.stil4m.mollie.concepts;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import nl.stil4m.mollie.RequestExecutor;
+import nl.stil4m.mollie.ResponseOrError;
+import nl.stil4m.mollie.domain.CustomerPayment;
+import nl.stil4m.mollie.domain.Page;
+import nl.stil4m.mollie.domain.Payment;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Optional;
+
+public class CustomerPayments {
+
+ private static final TypeReference> PAGE_PAYMENT_TYPE = new TypeReference>() {
+ };
+
+ private static final TypeReference PAYMENT_TYPE = new TypeReference() {
+ };
+
+
+ private final String apiKey;
+ private final String endpoint;
+ private final RequestExecutor requestExecutor;
+ private final String customerId;
+
+ public CustomerPayments(String apiKey, String endpoint, RequestExecutor requestExecutor, String customerId) {
+ this.apiKey = apiKey;
+ this.endpoint = endpoint;
+ this.requestExecutor = requestExecutor;
+ this.customerId = customerId;
+ }
+
+
+ public ResponseOrError> all(Optional