Skip to content

Commit f7062ed

Browse files
author
joelibaceta
committed
fixing search methods
1 parent 7e0ba4f commit f7062ed

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.mercadopago</groupId>
55
<artifactId>dx-java</artifactId>
6-
<version>1.0.32</version>
6+
<version>1.0.33</version>
77
<packaging>jar</packaging>
88

99
<name>Mercadopago SDK</name>

src/main/java/com/mercadopago/resources/Customer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import java.util.ArrayList;
1717
import java.util.Date;
18+
import java.util.HashMap;
1819

1920
/**
2021
* Mercado Pago SDK
@@ -167,13 +168,10 @@ public Boolean getLiveMode() {
167168
}
168169

169170

170-
public static MPResourceArray search() throws MPException {
171-
return search(WITHOUT_CACHE);
172-
}
173171

174172
@GET(path="/v1/customers/search")
175-
public static MPResourceArray search(Boolean useCache) throws MPException {
176-
return Customer.processMethodBulk(Customer.class, "search", useCache);
173+
public static MPResourceArray search(HashMap<String, String> filters, Boolean useCache) throws MPException {
174+
return Customer.processMethodBulk(Customer.class, "search", filters, useCache);
177175
}
178176

179177
public static Customer findById(String id) throws MPException {

src/main/java/com/mercadopago/resources/Payment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.google.gson.JsonObject;
44
import com.mercadopago.core.MPBase;
5+
import com.mercadopago.core.MPResourceArray;
56
import com.mercadopago.core.annotations.idempotent.Idempotent;
67
import com.mercadopago.core.annotations.rest.GET;
78
import com.mercadopago.core.annotations.rest.POST;
@@ -14,6 +15,7 @@
1415

1516
import java.util.ArrayList;
1617
import java.util.Date;
18+
import java.util.HashMap;
1719

1820
/**
1921
* Mercado Pago SDK
@@ -364,6 +366,11 @@ public static Payment findById(String id) throws MPException {
364366
return findById(id, WITHOUT_CACHE);
365367
}
366368

369+
@GET(path="/v1/payments/search")
370+
public static MPResourceArray search(HashMap<String, String> filters, Boolean useCache) throws MPException {
371+
return Customer.processMethodBulk(Customer.class, "search", filters, useCache);
372+
}
373+
367374
@GET(path="/v1/payments/:id")
368375
public static Payment findById(String id, Boolean useCache) throws MPException {
369376
return Payment.processMethod(Payment.class, "findById", id, useCache);

0 commit comments

Comments
 (0)