congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Account.getReferenceTime
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: killbill/killbill

public static DateTimeZone getFixedOffsetTimeZone(final Account account) {
  return getFixedOffsetTimeZone(account.getTimeZone(), account.getReferenceTime());
}
origin: killbill/killbill

public DefaultImmutableAccountData(final Account account) {
  this(account.getId(),
     account.getExternalKey(),
     account.getCurrency(),
     account.getTimeZone(),
     AccountDateTimeUtils.getFixedOffsetTimeZone(account),
     account.getReferenceTime());
}
origin: killbill/killbill

if (referenceTime != null && currentAccount.getReferenceTime().withMillisOfDay(0).compareTo(referenceTime.withMillisOfDay(0)) != 0) {
  throw new IllegalArgumentException(String.format("Killbill doesn't support updating the account referenceTime yet: new=%s, current=%s",
                           referenceTime, currentAccount.getReferenceTime()));
origin: killbill/killbill

  private void refreshCallContext(final DateTime effectiveDateTime, final DateTimeZone timeZone) {
    final Account account = new MockAccountBuilder().timeZone(timeZone)
                            .createdDate(effectiveDateTime)
                            .referenceTime(effectiveDateTime)
                            .build();
    internalCallContext.setFixedOffsetTimeZone(AccountDateTimeUtils.getFixedOffsetTimeZone(account));
    internalCallContext.setReferenceTime(account.getReferenceTime());
  }
}
origin: org.kill-bill.billing/killbill-util

public static DateTimeZone getFixedOffsetTimeZone(final Account account) {
  return getFixedOffsetTimeZone(account.getTimeZone(), account.getReferenceTime());
}
origin: org.kill-bill.billing/killbill-account

public DefaultImmutableAccountData(final Account account) {
  this(account.getId(),
     account.getExternalKey(),
     account.getCurrency(),
     account.getTimeZone(),
     AccountDateTimeUtils.getFixedOffsetTimeZone(account),
     account.getReferenceTime());
}
origin: org.kill-bill.billing/killbill-account

if (referenceTime != null && currentAccount.getReferenceTime().withMillisOfDay(0).compareTo(referenceTime.withMillisOfDay(0)) != 0) {
  throw new IllegalArgumentException(String.format("Killbill doesn't support updating the account referenceTime yet: new=%s, current=%s",
                           referenceTime, currentAccount.getReferenceTime()));
origin: org.kill-bill.billing/killbill-payment

final DateTime utcNow = clock.getUTCNow();
Mockito.when(accountData.getCreatedDate()).thenReturn(utcNow);
Mockito.when(accountData.getReferenceTime()).thenReturn(utcNow);
origin: org.kill-bill.billing/killbill-beatrix

invoiceChecker.checkTrackingIds(curInvoice, ImmutableSet.of("xxx-1", "xxx-2"), internalCallContext);
final DateTime firstExpectedCTD = account.getReferenceTime().withMonthOfYear(5).withDayOfMonth(1);
assertEquals(subscriptionBaseInternalApiApi.getSubscriptionFromId(bpSubscription.getId(), internalCallContext).getChargedThroughDate().compareTo(firstExpectedCTD), 0);
invoiceChecker.checkTrackingIds(curInvoice, ImmutableSet.of(), internalCallContext);
final DateTime secondExpectedCTD = account.getReferenceTime().withMonthOfYear(6).withDayOfMonth(1);
invoiceChecker.checkTrackingIds(curInvoice, ImmutableSet.of("xxx-3", "xxx-4"), internalCallContext);
final DateTime thirdExpectedCTD = account.getReferenceTime().withMonthOfYear(7).withDayOfMonth(1);
assertEquals(subscriptionBaseInternalApiApi.getSubscriptionFromId(bpSubscription.getId(), internalCallContext).getChargedThroughDate().compareTo(thirdExpectedCTD), 0);
origin: org.kill-bill.billing/killbill-entitlement

@Test(groups = "slow")
public void testAddOnCreationTiming() throws AccountApiException, EntitlementApiException {
  final LocalDate initialDate = new LocalDate(2013, 8, 7);
  clock.setDay(initialDate);
  final Account account = createAccount(getAccountData(7));
  // Reference time of 2013-08-07T00:00:00.000
  Assert.assertEquals(account.getReferenceTime().compareTo(new DateTime(2013, 8, 7, 0, 0, 0, DateTimeZone.UTC)), 0);
  // Add 5 seconds
  clock.addDeltaFromReality(5000);
  // Create base entitlement (null LocalDate will map to now(), i.e. 2013-08-07T00:00:05.000Z)
  testListener.pushExpectedEvents(NextEvent.CREATE, NextEvent.BLOCK);
  final PlanPhaseSpecifier baseSpec = new PlanPhaseSpecifier("Shotgun", BillingPeriod.MONTHLY, PriceListSet.DEFAULT_PRICELIST_NAME, null);
  final UUID baseEntitlementId = entitlementApi.createBaseEntitlement(account.getId(), new DefaultEntitlementSpecifier(baseSpec), account.getExternalKey(), null, null, false, true, ImmutableList.<PluginProperty>of(), callContext);
  assertListenerStatus();
  final DefaultEntitlement baseEntitlement = (DefaultEntitlement) entitlementApi.getEntitlementForId(baseEntitlementId, callContext);
  Assert.assertEquals(baseEntitlement.getSubscriptionBase().getStartDate().compareTo(account.getReferenceTime().plusSeconds(5)), 0);
  // Add ADD_ON (verify date passed, i.e. initialDate, won't map to 2013-08-07T00:00:00.000Z)
  testListener.pushExpectedEvents(NextEvent.CREATE, NextEvent.BLOCK);
  final PlanPhaseSpecifier addOnSpec = new PlanPhaseSpecifier("Telescopic-Scope", BillingPeriod.MONTHLY, PriceListSet.DEFAULT_PRICELIST_NAME, null);
  final UUID addOnEntitlementId = entitlementApi.addEntitlement(baseEntitlement.getBundleId(), new DefaultEntitlementSpecifier(addOnSpec), initialDate, initialDate, false, ImmutableList.<PluginProperty>of(), callContext);
  assertListenerStatus();
  final DefaultEntitlement addOnEntitlement = (DefaultEntitlement) entitlementApi.getEntitlementForId(addOnEntitlementId, callContext);
  Assert.assertEquals(addOnEntitlement.getSubscriptionBase().getStartDate().compareTo(baseEntitlement.getSubscriptionBase().getStartDate()), 0);
}
origin: org.kill-bill.billing/killbill-util

  private void refreshCallContext(final DateTime effectiveDateTime, final DateTimeZone timeZone) {
    final Account account = new MockAccountBuilder().timeZone(timeZone)
                            .createdDate(effectiveDateTime)
                            .referenceTime(effectiveDateTime)
                            .build();
    internalCallContext.setFixedOffsetTimeZone(AccountDateTimeUtils.getFixedOffsetTimeZone(account));
    internalCallContext.setReferenceTime(account.getReferenceTime());
  }
}
origin: org.kill-bill.billing/killbill-beatrix

       clock.getUTCToday().getMonthOfYear(),
       clock.getUTCToday().getDayOfMonth(),
       account.getReferenceTime().toDateTime(tz).getHourOfDay(),
       account.getReferenceTime().toDateTime(tz).getMinuteOfHour(),
       account.getReferenceTime().toDateTime(tz).getSecondOfMinute(),
       account.getTimeZone());
Assert.fail();
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();
}
org.killbill.billing.account.apiAccountgetReferenceTime

Popular methods of Account

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JOptionPane (javax.swing)
  • Top Sublime Text 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