private Iterable<UUID> getFilteredSubscriptionIdsFor_UPCOMING_INVOICE_DryRun(@Nullable final DryRunArguments dryRunArguments, final BillingEventSet billingEvents) { if (dryRunArguments == null || !dryRunArguments.getDryRunType().equals(DryRunType.UPCOMING_INVOICE) || (dryRunArguments.getSubscriptionId() == null && dryRunArguments.getBundleId() == null)) { return ImmutableList.<UUID>of(); } if (dryRunArguments.getSubscriptionId() != null) { return ImmutableList.of(dryRunArguments.getSubscriptionId()); } return Iterables.transform(Iterables.filter(billingEvents, new Predicate<BillingEvent>() { @Override public boolean apply(final BillingEvent input) { return input.getSubscription().getBundleId().equals(dryRunArguments.getBundleId()); } }), new Function<BillingEvent, UUID>() { @Override public UUID apply(final BillingEvent input) { return input.getSubscription().getId(); } }); }
@Override public int hashCode() { int result = dryRunType != null ? dryRunType.hashCode() : 0; result = 31 * result + (entitlementSpecifier != null ? entitlementSpecifier.hashCode() : 0); result = 31 * result + (action != null ? action.hashCode() : 0); result = 31 * result + (subscriptionId != null ? subscriptionId.hashCode() : 0); result = 31 * result + (effectiveDate != null ? effectiveDate.hashCode() : 0); result = 31 * result + (bundleId != null ? bundleId.hashCode() : 0); result = 31 * result + (billingActionPolicy != null ? billingActionPolicy.hashCode() : 0); return result; } }
return false; if (dryRunType != null ? !dryRunType.equals(that.dryRunType) : that.dryRunType != null) { return false;
@Override public int hashCode() { int result = dryRunAction != null ? dryRunAction.hashCode() : 0; result = 31 * result + (dryRunType != null ? dryRunType.hashCode() : 0); result = 31 * result + (phaseType != null ? phaseType.hashCode() : 0); result = 31 * result + (productName != null ? productName.hashCode() : 0); result = 31 * result + (productCategory != null ? productCategory.hashCode() : 0); result = 31 * result + (billingPeriod != null ? billingPeriod.hashCode() : 0); result = 31 * result + (priceListName != null ? priceListName.hashCode() : 0); result = 31 * result + (effectiveDate != null ? effectiveDate.hashCode() : 0); result = 31 * result + (subscriptionId != null ? subscriptionId.hashCode() : 0); result = 31 * result + (bundleId != null ? bundleId.hashCode() : 0); result = 31 * result + (billingPolicy != null ? billingPolicy.hashCode() : 0); result = 31 * result + (priceOverrides != null ? priceOverrides.hashCode() : 0); return result; } }
final LocalDate inputDate; if (dryRunSubscriptionSpec != null) { if (DryRunType.UPCOMING_INVOICE.equals(dryRunSubscriptionSpec.getDryRunType())) { inputDate = null; } else if (DryRunType.SUBSCRIPTION_ACTION.equals(dryRunSubscriptionSpec.getDryRunType()) && dryRunSubscriptionSpec.getEffectiveDate() != null) { inputDate = dryRunSubscriptionSpec.getEffectiveDate(); } else {
final InternalCallContext context) throws InvoiceApiException { final boolean isDryRun = dryRunArguments != null; final boolean upcomingInvoiceDryRun = isDryRun && DryRunType.UPCOMING_INVOICE.equals(dryRunArguments.getDryRunType());