org.killbill.billing.account.api.Account.isMigrated()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.killbill.billing.account.api.Account.isMigrated()方法的一些代码示例,展示了Account.isMigrated()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Account.isMigrated()方法的具体详情如下:
包路径:org.killbill.billing.account.api.Account
类名称:Account
方法名:isMigrated

Account.isMigrated介绍

暂无

代码示例

代码示例来源:origin: killbill/killbill

@Test(groups = "fast", description = "Test if Account constructor can accept null values")
public void testConstructorAcceptsNullValues() throws Exception {
  final AccountData accountData = getNullAccountData();
  final Account account = new DefaultAccount(UUID.randomUUID(), accountData);
  Assert.assertNull(account.getExternalKey());
  Assert.assertNull(account.getEmail());
  Assert.assertNull(account.getName());
  Assert.assertNull(account.getFirstNameLength());
  Assert.assertNull(account.getCurrency());
  Assert.assertEquals(account.getBillCycleDayLocal(), (Integer) 0);
  Assert.assertNull(account.getPaymentMethodId());
  Assert.assertNull(account.getTimeZone());
  Assert.assertNull(account.getLocale());
  Assert.assertNull(account.getAddress1());
  Assert.assertNull(account.getAddress2());
  Assert.assertNull(account.getCompanyName());
  Assert.assertNull(account.getCity());
  Assert.assertNull(account.getStateOrProvince());
  Assert.assertNull(account.getCountry());
  Assert.assertNull(account.getPostalCode());
  Assert.assertNull(account.getPhone());
  Assert.assertNull(account.isMigrated());
}

代码示例来源:origin: killbill/killbill

private void checkAccountEquals(final Account finalAccount, final Account delegateAccount) {
  Assert.assertEquals(finalAccount.getExternalKey(), delegateAccount.getExternalKey());
  Assert.assertEquals(finalAccount.getEmail(), delegateAccount.getEmail());
  Assert.assertEquals(finalAccount.getName(), delegateAccount.getName());
  Assert.assertEquals(finalAccount.getFirstNameLength(), delegateAccount.getFirstNameLength());
  Assert.assertEquals(finalAccount.getCurrency(), delegateAccount.getCurrency());
  Assert.assertEquals(finalAccount.getBillCycleDayLocal(), delegateAccount.getBillCycleDayLocal());
  Assert.assertEquals(finalAccount.getPaymentMethodId(), delegateAccount.getPaymentMethodId());
  Assert.assertEquals(finalAccount.getTimeZone(), delegateAccount.getTimeZone());
  Assert.assertEquals(finalAccount.getLocale(), delegateAccount.getLocale());
  Assert.assertEquals(finalAccount.getAddress1(), delegateAccount.getAddress1());
  Assert.assertEquals(finalAccount.getAddress2(), delegateAccount.getAddress2());
  Assert.assertEquals(finalAccount.getCompanyName(), delegateAccount.getCompanyName());
  Assert.assertEquals(finalAccount.getCity(), delegateAccount.getCity());
  Assert.assertEquals(finalAccount.getStateOrProvince(), delegateAccount.getStateOrProvince());
  Assert.assertEquals(finalAccount.getCountry(), delegateAccount.getCountry());
  Assert.assertEquals(finalAccount.getPostalCode(), delegateAccount.getPostalCode());
  Assert.assertEquals(finalAccount.getPhone(), delegateAccount.getPhone());
  Assert.assertEquals(finalAccount.getNotes(), delegateAccount.getNotes());
  Assert.assertEquals(finalAccount.isMigrated(), delegateAccount.isMigrated());
}

代码示例来源:origin: killbill/killbill

Assert.assertEquals(updatedAccount2.getPostalCode(), updatedAccount1.getPostalCode());
Assert.assertEquals(updatedAccount2.getPhone(), updatedAccount1.getPhone());
Assert.assertEquals(updatedAccount2.isMigrated(), updatedAccount1.isMigrated());

代码示例来源:origin: killbill/killbill

Assert.assertEquals(retrievedAccount.getCountry(), account.getCountry());
Assert.assertEquals(retrievedAccount.getPhone(), account.getPhone());
Assert.assertEquals(retrievedAccount.isMigrated(), account.isMigrated());
Assert.assertEquals(retrievedAccount.getParentAccountId(), account.getParentAccountId());
Assert.assertEquals(retrievedAccount.isPaymentDelegatedToParent(), account.isPaymentDelegatedToParent());

代码示例来源:origin: killbill/killbill

accountData.setParentAccountId(parentAccountId != null ? parentAccountId : currentAccount.getParentAccountId());
accountData.setIsPaymentDelegatedToParent(isPaymentDelegatedToParent != null ? isPaymentDelegatedToParent : currentAccount.isPaymentDelegatedToParent());
final Boolean isMigrated = this.isMigrated != null ? this.isMigrated : currentAccount.isMigrated();
if (isMigrated != null) {
  accountData.setIsMigrated(isMigrated);

代码示例来源:origin: org.kill-bill.billing.plugin.java/killbill-base-plugin

public static Account buildAccount(final Currency currency, final String address1, final String address2, final String city, final String stateOrProvince, final String postalCode, final String country) {
  final Account account = Mockito.mock(Account.class);
  Mockito.when(account.getId()).thenReturn(UUID.randomUUID());
  Mockito.when(account.getExternalKey()).thenReturn(UUID.randomUUID().toString());
  Mockito.when(account.getName()).thenReturn(UUID.randomUUID().toString());
  Mockito.when(account.getFirstNameLength()).thenReturn(4);
  Mockito.when(account.getEmail()).thenReturn(UUID.randomUUID().toString());
  Mockito.when(account.getBillCycleDayLocal()).thenReturn(2);
  Mockito.when(account.getCurrency()).thenReturn(currency);
  Mockito.when(account.getPaymentMethodId()).thenReturn(UUID.randomUUID());
  Mockito.when(account.getTimeZone()).thenReturn(DateTimeZone.getDefault());
  // Return language tag to be able to use Locale.forLanguageTag
  Mockito.when(account.getLocale()).thenReturn("en-US");
  Mockito.when(account.getAddress1()).thenReturn(address1);
  Mockito.when(account.getAddress2()).thenReturn(address2);
  Mockito.when(account.getCompanyName()).thenReturn(UUID.randomUUID().toString());
  Mockito.when(account.getCity()).thenReturn(city);
  Mockito.when(account.getStateOrProvince()).thenReturn(stateOrProvince);
  Mockito.when(account.getPostalCode()).thenReturn(postalCode);
  Mockito.when(account.getCountry()).thenReturn(country);
  Mockito.when(account.getPhone()).thenReturn(UUID.randomUUID().toString().substring(0, 25));
  Mockito.when(account.isMigrated()).thenReturn(true);
  Mockito.when(account.getCreatedDate()).thenReturn(new DateTime(2016, 1, 22, 10, 56, 47, DateTimeZone.UTC));
  Mockito.when(account.getUpdatedDate()).thenReturn(new DateTime(2016, 1, 22, 10, 56, 48, DateTimeZone.UTC));
  return account;
}

代码示例来源:origin: org.kill-bill.billing/killbill-payment

Mockito.when(accountData.getCurrency()).thenReturn(Currency.USD);
Mockito.when(accountData.getBillCycleDayLocal()).thenReturn(1);
Mockito.when(accountData.isMigrated()).thenReturn(false);
Mockito.when(accountData.getTimeZone()).thenReturn(DateTimeZone.UTC);
final DateTime utcNow = clock.getUTCNow();

代码示例来源:origin: org.kill-bill.billing/killbill-jaxrs

public AccountJson(final Account account, final BigDecimal accountBalance, final BigDecimal accountCBA, @Nullable final AccountAuditLogs accountAuditLogs) {
  super(toAuditLogJson(accountAuditLogs == null ? null : accountAuditLogs.getAuditLogsForAccount()));
  this.accountCBA = accountCBA;
  this.accountBalance = accountBalance;
  this.accountId = account.getId();
  this.externalKey = account.getExternalKey();
  this.name = account.getName();
  this.firstNameLength = account.getFirstNameLength();
  this.email = account.getEmail();
  this.billCycleDayLocal = account.getBillCycleDayLocal();
  this.currency = account.getCurrency();
  this.parentAccountId = account.getParentAccountId();
  this.isPaymentDelegatedToParent = account.isPaymentDelegatedToParent();
  this.paymentMethodId = account.getPaymentMethodId();
  this.referenceTime = account.getReferenceTime();
  this.timeZone = account.getTimeZone() != null ? account.getTimeZone().toString() : null;
  this.address1 = account.getAddress1();
  this.address2 = account.getAddress2();
  this.postalCode = account.getPostalCode();
  this.company = account.getCompanyName();
  this.city = account.getCity();
  this.state = account.getStateOrProvince();
  this.country = account.getCountry();
  this.locale = account.getLocale();
  this.phone = account.getPhone();
  this.notes = account.getNotes();
  this.isMigrated = account.isMigrated();
}

代码示例来源:origin: org.kill-bill.billing/killbill-account

accountData.setParentAccountId(parentAccountId != null ? parentAccountId : currentAccount.getParentAccountId());
accountData.setIsPaymentDelegatedToParent(isPaymentDelegatedToParent != null ? isPaymentDelegatedToParent : currentAccount.isPaymentDelegatedToParent());
final Boolean isMigrated = this.isMigrated != null ? this.isMigrated : currentAccount.isMigrated();
if (isMigrated != null) {
  accountData.setIsMigrated(isMigrated);

相关文章