br.com.moip.api.CustomerAPI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
Java SDK for Moip v2 APIs
package br.com.moip.api;
import br.com.moip.Client;
import br.com.moip.request.CustomerRequest;
import br.com.moip.resource.Customer;
public class CustomerAPI {
private final Client client;
public CustomerAPI(Client client) {
this.client = client;
}
public Customer create(CustomerRequest customer) {
return client.post("/v2/customers", customer, Customer.class);
}
public Customer get(String externalId) {
return client.get("/v2/customers/" + externalId, Customer.class);
}
}