br.com.moip.api.PaymentAPI 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.PaymentRequest;
import br.com.moip.resource.Payment;
public class PaymentAPI {
private final Client client;
public PaymentAPI(final Client client) {
this.client = client;
}
public Payment create(final PaymentRequest payment) {
return client.post("/v2/orders/" + payment.getOrderId() + "/payments", payment, Payment.class);
}
}