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
Bank Accounts
Lucas Garcia edited this page Sep 6, 2018
·
8 revisions
TO DO
import static br.com.moip.helpers.PayloadFactory.payloadFactory;
import static br.com.moip.helpers.PayloadFactory.value;
Index
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> getResponse = Moip.API.accounts().createBankAccount(bankAccount, "moip_account_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> getResponse = Moip.API.bankAccounts().get("bank_account_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> getResponse = Moip.API.bankAccounts().delete("bank_account_id", setup);
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> getResponse = Moip.API.bankAccounts().update(bankAccount, "bank_account_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
List<Map<String, Object>> getResponse = Moip.API.accounts().listBankAccounts("moip_account_id", setup);