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()); }
Assert.assertEquals(retrievedAccount.isPaymentDelegatedToParent(), account.isPaymentDelegatedToParent()); Assert.assertNull(retrievedAccount.getNotes());
accountData.setPostalCode(postalCode != null ? postalCode : currentAccount.getPostalCode()); accountData.setPhone(phone != null ? phone : currentAccount.getPhone()); accountData.setNotes(notes != null ? notes : currentAccount.getNotes()); accountData.setParentAccountId(parentAccountId != null ? parentAccountId : currentAccount.getParentAccountId()); accountData.setIsPaymentDelegatedToParent(isPaymentDelegatedToParent != null ? isPaymentDelegatedToParent : currentAccount.isPaymentDelegatedToParent());
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(); }
accountData.setPostalCode(postalCode != null ? postalCode : currentAccount.getPostalCode()); accountData.setPhone(phone != null ? phone : currentAccount.getPhone()); accountData.setNotes(notes != null ? notes : currentAccount.getNotes()); accountData.setParentAccountId(parentAccountId != null ? parentAccountId : currentAccount.getParentAccountId()); accountData.setIsPaymentDelegatedToParent(isPaymentDelegatedToParent != null ? isPaymentDelegatedToParent : currentAccount.isPaymentDelegatedToParent());