Tabnine Logo
Account.isPaymentDelegatedToParent
Code IndexAdd Tabnine to your IDE (free)

How to use
isPaymentDelegatedToParent
method
in
org.killbill.billing.account.api.Account

Best Java code snippets using org.killbill.billing.account.api.Account.isPaymentDelegatedToParent (Showing top 13 results out of 315)

origin: killbill/killbill

  public BillingState billingState(final InternalCallContext context) throws OverdueException {
    if ((overdueable.getParentAccountId() != null) && (overdueable.isPaymentDelegatedToParent())) {
      // calculate billing state from parent account
      final InternalTenantContext internalTenantContext = internalCallContextFactory.createInternalTenantContext(overdueable.getParentAccountId(), context);
      final InternalCallContext parentAccountContext = internalCallContextFactory.createInternalCallContext(internalTenantContext.getAccountRecordId(), context);
      return billingStateCalcuator.calculateBillingState(overdueable, parentAccountContext);
    }
    return billingStateCalcuator.calculateBillingState(overdueable, context);
  }
}
origin: killbill/killbill

@Test(groups = "slow", description = "Test Account create Parent and Child")
public void testCreateParentAndChildAccounts() throws Exception {
  final Account parentAccount = accountUserApi.createAccount(new DefaultAccount(createTestAccount()), callContext);
  final AccountModelDao childAccountModel = createTestAccount();
  childAccountModel.setParentAccountId(parentAccount.getId());
  childAccountModel.setIsPaymentDelegatedToParent(true);
  final AccountData childAccountData = new DefaultAccount(childAccountModel);
  final Account childAccount = accountUserApi.createAccount(childAccountData, callContext);
  final Account retrievedChildAccount = accountUserApi.getAccountById(childAccount.getId(), callContext);
  Assert.assertNull(parentAccount.getParentAccountId());
  Assert.assertNotNull(retrievedChildAccount.getParentAccountId());
  Assert.assertEquals(retrievedChildAccount.getId(), childAccount.getId());
  Assert.assertEquals(retrievedChildAccount.getParentAccountId(), parentAccount.getId());
  Assert.assertEquals(retrievedChildAccount.isPaymentDelegatedToParent(), childAccount.isPaymentDelegatedToParent());
}
origin: killbill/killbill

if (account.getParentAccountId() != null && account.isPaymentDelegatedToParent()) {
  final InternalTenantContext parentAccountInternalTenantContext = internalCallContextFactory.createInternalTenantContext(account.getParentAccountId(), callContext);
  final InternalCallContext parentAccountContext = internalCallContextFactory.createInternalCallContext(parentAccountInternalTenantContext.getAccountRecordId(), callContext);
if (childrenAccounts != null) {
  for (final Account childAccount : childrenAccounts) {
    if (childAccount.isPaymentDelegatedToParent()) {
      final InternalTenantContext internalTenantContext = internalCallContextFactory.createInternalTenantContext(childAccount.getId(), callContext);
      final InternalCallContext accountContext = internalCallContextFactory.createInternalCallContext(internalTenantContext.getAccountRecordId(), callContext);
origin: killbill/killbill

Account childAccount1 = accountUserApi.createAccount(new DefaultAccount(childAccountModelDao1), callContext);
Assert.assertNull(childAccount1.getParentAccountId());
Assert.assertFalse(childAccount1.isPaymentDelegatedToParent());
Assert.assertFalse(parentAccount.isPaymentDelegatedToParent());
List<Account> childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
Assert.assertEquals(childrenAccounts.size(), 0);
Assert.assertTrue(childAccount1.isPaymentDelegatedToParent());
childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
Assert.assertEquals(childrenAccounts.size(), 1);
Assert.assertFalse(childAccount1.isPaymentDelegatedToParent());
childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
Assert.assertEquals(childrenAccounts.size(), 0);
Account childAccount2 = accountUserApi.createAccount(new DefaultAccount(childAccountModelDao2), callContext);
Assert.assertNull(childAccount2.getParentAccountId());
Assert.assertFalse(childAccount2.isPaymentDelegatedToParent());
Assert.assertFalse(childAccount1.isPaymentDelegatedToParent());
childAccount2 = accountUserApi.getAccountById(childAccount2.getId(), callContext);
Assert.assertEquals(childAccount2.getParentAccountId(), parentAccount.getId());
Assert.assertTrue(childAccount2.isPaymentDelegatedToParent());
childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
Assert.assertEquals(childrenAccounts.size(), 1);
origin: killbill/killbill

Assert.assertEquals(retrievedAccount.isMigrated(), account.isMigrated());
Assert.assertEquals(retrievedAccount.getParentAccountId(), account.getParentAccountId());
Assert.assertEquals(retrievedAccount.isPaymentDelegatedToParent(), account.isPaymentDelegatedToParent());
origin: killbill/killbill

accountData.setNotes(notes != null ? notes : currentAccount.getNotes());
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) {
origin: org.kill-bill.billing/killbill-invoice

private boolean isChildrenAccountAndPaymentDelegated(final Account account) {
  return account.getParentAccountId() != null && account.isPaymentDelegatedToParent();
}
origin: org.kill-bill.billing/killbill-overdue

  public BillingState billingState(final InternalCallContext context) throws OverdueException {
    if ((overdueable.getParentAccountId() != null) && (overdueable.isPaymentDelegatedToParent())) {
      // calculate billing state from parent account
      final InternalTenantContext internalTenantContext = internalCallContextFactory.createInternalTenantContext(overdueable.getParentAccountId(), context);
      final InternalCallContext parentAccountContext = internalCallContextFactory.createInternalCallContext(internalTenantContext.getAccountRecordId(), context);
      return billingStateCalcuator.calculateBillingState(overdueable, parentAccountContext);
    }
    return billingStateCalcuator.calculateBillingState(overdueable, context);
  }
}
origin: org.kill-bill.billing/killbill-overdue

if (account.getParentAccountId() != null && account.isPaymentDelegatedToParent()) {
  final InternalTenantContext parentAccountInternalTenantContext = internalCallContextFactory.createInternalTenantContext(account.getParentAccountId(), callContext);
  final InternalCallContext parentAccountContext = internalCallContextFactory.createInternalCallContext(parentAccountInternalTenantContext.getAccountRecordId(), callContext);
if (childrenAccounts != null) {
  for (final Account childAccount : childrenAccounts) {
    if (childAccount.isPaymentDelegatedToParent()) {
      final InternalTenantContext internalTenantContext = internalCallContextFactory.createInternalTenantContext(childAccount.getId(), callContext);
      final InternalCallContext accountContext = internalCallContextFactory.createInternalCallContext(internalTenantContext.getAccountRecordId(), callContext);
origin: org.kill-bill.billing/killbill-beatrix

assertFalse(childAccount.isPaymentDelegatedToParent());
List<Account> childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
assertEquals(childrenAccounts.size(), 0);
assertFalse(childAccount.isPaymentDelegatedToParent());
childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
assertEquals(childrenAccounts.size(), 1);
assertTrue(childAccount.isPaymentDelegatedToParent());
childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
assertEquals(childrenAccounts.size(), 1);
origin: org.kill-bill.billing/killbill-beatrix

assertTrue(childAccount.isPaymentDelegatedToParent());
List<Account> childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
assertEquals(childrenAccounts.size(), 1);
assertFalse(childAccount.isPaymentDelegatedToParent());
childrenAccounts = accountUserApi.getChildrenAccounts(parentAccount.getId(), callContext);
assertEquals(childrenAccounts.size(), 0);
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.setNotes(notes != null ? notes : currentAccount.getNotes());
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) {
org.killbill.billing.account.apiAccountisPaymentDelegatedToParent

Popular methods of Account

  • getId
  • getExternalKey
  • getTimeZone
  • getEmail
  • getName
  • getCurrency
  • getFirstNameLength
  • getPhone
  • getReferenceTime
  • getBillCycleDayLocal
  • getLocale
  • getParentAccountId
  • getLocale,
  • getParentAccountId,
  • getPaymentMethodId,
  • getAddress1,
  • getAddress2,
  • getCity,
  • getCompanyName,
  • getCountry,
  • getPostalCode

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now