当前位置: 首页>>代码示例>>Java>>正文


Java Iban类代码示例

本文整理汇总了Java中org.iban4j.Iban的典型用法代码示例。如果您正苦于以下问题:Java Iban类的具体用法?Java Iban怎么用?Java Iban使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Iban类属于org.iban4j包,在下文中一共展示了Iban类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import org.iban4j.Iban; //导入依赖的package包/类
public static HuntingPaymentInfo create(final int huntingYear, final String invoiceReference) {
    switch (huntingYear) {
        case 2015:
        case 2016:
            return new HuntingPaymentInfo(33, 0, invoiceReference, Arrays.asList(
                    new AccountDetails(Bic.valueOf("OKOYFIHH"), Iban.valueOf("FI7850000120378442"), "OP-Pohjola"),
                    new AccountDetails(Bic.valueOf("NDEAFIHH"), Iban.valueOf("FI1216603000107212"), "Nordea"),
                    new AccountDetails(Bic.valueOf("DABAFIHH"), Iban.valueOf("FI8480001300035350"), "Danske")));
        default:
            return null;
    }
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:13,代码来源:HuntingPaymentInfo.java

示例2: send

import org.iban4j.Iban; //导入依赖的package包/类
private void send(final boolean notEdibleOk) {
    final HuntingClubPermitTotalPaymentDTO payment = new HuntingClubPermitTotalPaymentDTO();
    payment.setIban(Iban.random(CountryCode.FI).toFormattedString());
    payment.setBic("ASDF");
    payment.setCreditorReference(creditorReference().getValue());
    payment.setAdultsPayment(BigDecimal.valueOf(100));
    payment.setYoungPayment(BigDecimal.valueOf(100));
    payment.setDueDate(new LocalDate().plusDays(7));

    final LocalisedString speciesName = LocalisedString.of("hirvi", "ålg");

    final AllPartnersFinishedHuntingMailService.MailData data = new AllPartnersFinishedHuntingMailService.MailData(
            1, 2, "2015-123-1234567-1", speciesName, notEdibleOk, payment);
    mailService.sendEmailInternal(Sets.newHashSet("[email protected]"), data);
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:16,代码来源:AllPartnersFinishedHuntingMailServiceTest.java

示例3: testEurosAndCents

import org.iban4j.Iban; //导入依赖的package包/类
@Test
public void testEurosAndCents() {
    final HuntingPaymentInfo paymentInfo = new HuntingPaymentInfo(
            77, 99, INVOICE_REFERENCE, singletonList(new HuntingPaymentInfo.AccountDetails(
            Bic.valueOf("OKOYFIHH"), Iban.valueOf("FI7850000120378442"), BANK_NAME)));

    assertEquals("77.99", paymentInfo.getAmountText());
    assertEquals("478500001203784420000779900000000000014507700161000000",
            paymentInfo.createBarCodeMessage(null));
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:11,代码来源:HuntingPaymentInfoTest.java

示例4: testBarCodeDueDate

import org.iban4j.Iban; //导入依赖的package包/类
@Test
public void testBarCodeDueDate() {
    final HuntingPaymentInfo paymentInfo = new HuntingPaymentInfo(
            77, 99, INVOICE_REFERENCE, singletonList(new HuntingPaymentInfo.AccountDetails(
            Bic.valueOf("OKOYFIHH"), Iban.valueOf("FI7850000120378442"), BANK_NAME)));

    assertEquals("77.99", paymentInfo.getAmountText());
    assertEquals("478500001203784420000779900000000000014507700161160630",
            paymentInfo.createBarCodeMessage(new LocalDate(2016, 6, 30)));
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:11,代码来源:HuntingPaymentInfoTest.java

示例5: newMooselikePrice

import org.iban4j.Iban; //导入依赖的package包/类
public MooselikePrice newMooselikePrice(Integer year, GameSpecies species, BigDecimal adultPrice, BigDecimal youngPrice) {
    MooselikePrice p = new MooselikePrice();
    p.setHuntingYear(year);
    p.setGameSpecies(species);
    p.setIban(new IbanEntity(Iban.random(CountryCode.FI).toFormattedString()));
    p.setBic(new BicEntity("OKOYFIHH"));
    p.setRecipientName("money or nothing");
    p.setAdultPrice(adultPrice);
    p.setYoungPrice(youngPrice);
    return add(p);
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:12,代码来源:EntitySupplier.java

示例6: ibanConstruction

import org.iban4j.Iban; //导入依赖的package包/类
@BenchmarkOptions(benchmarkRounds = 3, warmupRounds = 1)
@Test
@Ignore
public void ibanConstruction() {

    for(int i = 0; i < LOOPS_COUNT; i++) {
        Iban iban = new Iban.Builder()
                        .countryCode(CountryCode.DE)
                        .bankCode("52060170")
                        .accountNumber("0012335785")
                        .build();
    }
}
 
开发者ID:arturmkrtchyan,项目名称:iban4j,代码行数:14,代码来源:IbanBenchmark.java

示例7: get

import org.iban4j.Iban; //导入依赖的package包/类
@Override
public IBAN get() {
	try {

		fillCountryCode();
		fillAccountNumber();
		fillBankCode();
		fillBranchCode();
		nationalCheckDigit = nationalCheckDigit(nationalCheckDigit);

		Iban iban = new Iban.Builder()
				.countryCode(countryCode)
				.bankCode(bankCode)
				.branchCode(branchCode)
				.nationalCheckDigit(nationalCheckDigit)
				.accountNumber(accountNumber)
				.build();

		String identificationNumber = iban.getIdentificationNumber();
		String checkDigit = iban.getCheckDigit();
		String accountType = iban.getAccountType();
		String bban = iban.getBban();
		String ownerAccountType = iban.getOwnerAccountType();
		String ibanNumber = iban.toString();

		return new IBAN(accountNumber, identificationNumber, branchCode, checkDigit,
				accountType, bankCode, bban, countryCode.getName(), nationalCheckDigit,
				ownerAccountType, ibanNumber);
	} catch (IllegalFormatCodePointException e) {
		throw new IllegalArgumentException("Invalid iban " + e.getMessage(), e);
	}
}
 
开发者ID:Devskiller,项目名称:jfairy,代码行数:33,代码来源:DefaultIBANProvider.java

示例8: AccountDetails

import org.iban4j.Iban; //导入依赖的package包/类
public AccountDetails(final Bic bic, final Iban iban, final String bankName) {
    this.bic = Objects.requireNonNull(bic, "bic is null");
    this.iban = Objects.requireNonNull(iban, "iban is null");
    this.bankName = Objects.requireNonNull(bankName, "bankName is null");
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:6,代码来源:HuntingPaymentInfo.java

示例9: getIban

import org.iban4j.Iban; //导入依赖的package包/类
public Iban getIban() {
    return iban;
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:4,代码来源:HuntingPaymentInfo.java

示例10: convertToDatabaseColumn

import org.iban4j.Iban; //导入依赖的package包/类
@Override
public String convertToDatabaseColumn(String attribute) {
    return StringUtils.isBlank(attribute) ? null : Iban.valueOf(attribute, IbanFormat.Default).toString();
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:5,代码来源:IbanConverter.java

示例11: convertToEntityAttribute

import org.iban4j.Iban; //导入依赖的package包/类
@Override
public String convertToEntityAttribute(String dbData) {
    return StringUtils.isBlank(dbData) ? null : Iban.valueOf(dbData).toFormattedString();
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:5,代码来源:IbanConverter.java

示例12: testInvalidBic

import org.iban4j.Iban; //导入依赖的package包/类
@Test(expected = BicFormatException.class)
public void testInvalidBic() {
    new HuntingPaymentInfo(
            77, 99, INVOICE_REFERENCE, singletonList(new HuntingPaymentInfo.AccountDetails(
            Bic.valueOf("INVALID"), Iban.valueOf("FI7850000120378442"), BANK_NAME)));
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:7,代码来源:HuntingPaymentInfoTest.java

示例13: testInvalidIban

import org.iban4j.Iban; //导入依赖的package包/类
@Test(expected = IbanFormatException.class)
public void testInvalidIban() {
    new HuntingPaymentInfo(
            77, 99, INVOICE_REFERENCE, singletonList(new HuntingPaymentInfo.AccountDetails(
            Bic.valueOf("OKOYFIHH"), Iban.valueOf("FIX7850000120378442"), BANK_NAME)));
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:7,代码来源:HuntingPaymentInfoTest.java

示例14: testInvalidCents

import org.iban4j.Iban; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void testInvalidCents() {
    new HuntingPaymentInfo(
            77, 100, INVOICE_REFERENCE, singletonList(new HuntingPaymentInfo.AccountDetails(
            Bic.valueOf("OKOYFIHH"), Iban.valueOf("FI7850000120378442"), BANK_NAME)));
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:7,代码来源:HuntingPaymentInfoTest.java

示例15: testInvalidEuros

import org.iban4j.Iban; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void testInvalidEuros() {
    new HuntingPaymentInfo(
            -1, 0, INVOICE_REFERENCE, singletonList(new HuntingPaymentInfo.AccountDetails(
            Bic.valueOf("OKOYFIHH"), Iban.valueOf("FI7850000120378442"), BANK_NAME)));
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:7,代码来源:HuntingPaymentInfoTest.java


注:本文中的org.iban4j.Iban类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。