use of bisq.core.payment.payload.SpecificBanksAccountPayload in project bisq-desktop by bisq-network.
the class OfferBookViewModelTest method getSpecificBanksAccount.
private PaymentAccount getSpecificBanksAccount(String currencyCode, String countryCode, String bankId, ArrayList<String> bankIds) {
SpecificBanksAccount paymentAccount = new SpecificBanksAccount();
paymentAccount.setSingleTradeCurrency(new FiatCurrency(currencyCode));
paymentAccount.setCountry(new Country(countryCode, null, null));
((SpecificBanksAccountPayload) paymentAccount.getPaymentAccountPayload()).setBankId(bankId);
bankIds.forEach(((SpecificBanksAccountPayload) paymentAccount.getPaymentAccountPayload())::addAcceptedBank);
return paymentAccount;
}
use of bisq.core.payment.payload.SpecificBanksAccountPayload in project bisq-api by mrosseel.
the class SpecificBanksAccountPaymentAccountConverter method toBusinessModel.
@Override
public SpecificBanksAccount toBusinessModel(SpecificBanksAccountPaymentAccount rest) {
final SpecificBanksAccount business = new SpecificBanksAccount();
business.init();
final SpecificBanksAccountPayload paymentAccountPayload = (SpecificBanksAccountPayload) business.getPaymentAccountPayload();
paymentAccountPayload.setAccountNr(rest.accountNr);
paymentAccountPayload.setAccountType(rest.accountType);
paymentAccountPayload.setBankId(rest.bankId);
paymentAccountPayload.setBankName(rest.bankName);
paymentAccountPayload.setBranchId(rest.branchId);
paymentAccountPayload.setCountryCode(rest.countryCode);
paymentAccountPayload.setHolderName(rest.holderName);
paymentAccountPayload.setHolderTaxId(rest.holderTaxId);
rest.acceptedBanks.stream().forEach(paymentAccountPayload::addAcceptedBank);
toBusinessModel(business, rest);
return business;
}
Aggregations