Search in sources :

Example 1 with NationalBankAccountPayload

use of bisq.core.payment.payload.NationalBankAccountPayload in project bisq-desktop by bisq-network.

the class OfferBookViewModelTest method getNationalBankAccount.

private PaymentAccount getNationalBankAccount(String currencyCode, String countryCode, String bankId) {
    CountryBasedPaymentAccount paymentAccount = new NationalBankAccount();
    paymentAccount.setSingleTradeCurrency(new FiatCurrency(currencyCode));
    paymentAccount.setCountry(new Country(countryCode, null, null));
    ((NationalBankAccountPayload) paymentAccount.getPaymentAccountPayload()).setBankId(bankId);
    return paymentAccount;
}
Also used : NationalBankAccount(bisq.core.payment.NationalBankAccount) CountryBasedPaymentAccount(bisq.core.payment.CountryBasedPaymentAccount) Country(bisq.core.locale.Country) FiatCurrency(bisq.core.locale.FiatCurrency) NationalBankAccountPayload(bisq.core.payment.payload.NationalBankAccountPayload)

Example 2 with NationalBankAccountPayload

use of bisq.core.payment.payload.NationalBankAccountPayload in project bisq-api by mrosseel.

the class NationalBankAccountPaymentAccountConverter method toBusinessModel.

@Override
public NationalBankAccount toBusinessModel(NationalBankAccountPaymentAccount rest) {
    final NationalBankAccount business = new NationalBankAccount();
    business.init();
    final NationalBankAccountPayload paymentAccountPayload = (NationalBankAccountPayload) 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);
    toBusinessModel(business, rest);
    return business;
}
Also used : NationalBankAccount(bisq.core.payment.NationalBankAccount) NationalBankAccountPayload(bisq.core.payment.payload.NationalBankAccountPayload)

Aggregations

NationalBankAccount (bisq.core.payment.NationalBankAccount)2 NationalBankAccountPayload (bisq.core.payment.payload.NationalBankAccountPayload)2 Country (bisq.core.locale.Country)1 FiatCurrency (bisq.core.locale.FiatCurrency)1 CountryBasedPaymentAccount (bisq.core.payment.CountryBasedPaymentAccount)1