This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Transfers
Lucas Garcia edited this page Sep 6, 2018
·
4 revisions
TO DO
import static br.com.moip.helpers.PayloadFactory.payloadFactory;
import static br.com.moip.helpers.PayloadFactory.value;
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> taxDocument = payloadFactory(
value("type", "CPF"),
value("number", "33333333333")
);
Map<String, Object> holder = payloadFactory(
value("fullname", "Portador Teste Moip"),
value("taxDocument", taxDocument)
);
Map<String, Object> bankAccount = payloadFactory(
value("bankNumber", "237"),
value("agencyNumber", "12345"),
value("agencyCheckNumber", "8"),
value("accountNumber", "12345678"),
value("accountCheckNumber", "8"),
value("type", "CHECKING"),
value("holder", holder)
);
Map<String, Object> transferInstrument = payloadFactory(
value("bankAccount", bankAccount),
value("method", "BANK_ACCOUNT")
);
Map<String, Object> transferObject = payloadFactory(
value("transferInstrument", transferInstrument),
value("amount", "5000")
);
Map<String, Object> newTransfer = Moip.API.transfers().create(transferObject, setup);
Authorization | able |
---|---|
Basic Auth | ❌ |
OAuth | ✅ |
Map<String, Object> newTransfer = Moip.API.transfers().revert("transfer_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> newTransfer = Moip.API.transfers().get("transfer_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> newTransfer = Moip.API.transfers().list(setup);