killbill-aplcache
Changes
account/pom.xml 2(+1 -1)
api/pom.xml 2(+1 -1)
beatrix/pom.xml 2(+1 -1)
beatrix/src/test/java/org/killbill/billing/beatrix/integration/TestIntegrationParentInvoice.java 138(+136 -2)
catalog/pom.xml 2(+1 -1)
currency/pom.xml 2(+1 -1)
entitlement/pom.xml 2(+1 -1)
entitlement/src/main/java/org/killbill/billing/entitlement/engine/core/EventsStreamBuilder.java 2(+1 -1)
invoice/pom.xml 2(+1 -1)
jaxrs/pom.xml 2(+1 -1)
junction/pom.xml 2(+1 -1)
NEWS 3(+3 -0)
overdue/pom.xml 2(+1 -1)
payment/pom.xml 2(+1 -1)
pom.xml 4(+2 -2)
profiles/killbill/pom.xml 2(+1 -1)
profiles/killpay/pom.xml 2(+1 -1)
profiles/pom.xml 2(+1 -1)
subscription/pom.xml 2(+1 -1)
subscription/src/main/java/org/killbill/billing/subscription/api/user/DefaultSubscriptionBase.java 2(+1 -1)
tenant/pom.xml 2(+1 -1)
usage/pom.xml 2(+1 -1)
util/pom.xml 2(+1 -1)
Details
account/pom.xml 2(+1 -1)
diff --git a/account/pom.xml b/account/pom.xml
index c80da4c..9b475a5 100644
--- a/account/pom.xml
+++ b/account/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-account</artifactId>
api/pom.xml 2(+1 -1)
diff --git a/api/pom.xml b/api/pom.xml
index fef628c..3b4399b 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-internal-api</artifactId>
beatrix/pom.xml 2(+1 -1)
diff --git a/beatrix/pom.xml b/beatrix/pom.xml
index d7bc65e..443071f 100644
--- a/beatrix/pom.xml
+++ b/beatrix/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-beatrix</artifactId>
diff --git a/beatrix/src/test/java/org/killbill/billing/beatrix/integration/TestIntegrationParentInvoice.java b/beatrix/src/test/java/org/killbill/billing/beatrix/integration/TestIntegrationParentInvoice.java
index a0d22f9..6931288 100644
--- a/beatrix/src/test/java/org/killbill/billing/beatrix/integration/TestIntegrationParentInvoice.java
+++ b/beatrix/src/test/java/org/killbill/billing/beatrix/integration/TestIntegrationParentInvoice.java
@@ -315,9 +315,9 @@ public class TestIntegrationParentInvoice extends TestIntegrationBase {
}
- // Scenario 1: Follow up Invoice Item Adjustment on unpaid invoice
+ // Scenario 1.a: Follow up Invoice Item Adjustment on unpaid DRAFT invoice
@Test(groups = "slow")
- public void testParentInvoiceItemAdjustmentUnpaidInvoice() throws Exception {
+ public void testParentInvoiceItemAdjustmentUnpaidDraftInvoice() throws Exception {
final int billingDay = 14;
final DateTime initialCreationDate = new DateTime(2014, 5, 15, 0, 0, 0, 0, testTimeZone);
@@ -385,6 +385,140 @@ public class TestIntegrationParentInvoice extends TestIntegrationBase {
}
+ // Scenario 1.b: Follow up Invoice Item Adjustment on unpaid COMMITTED invoice
+ @Test(groups = "slow")
+ public void testParentInvoiceItemAdjustmentUnpaidCommittedInvoice() throws Exception {
+
+ final int billingDay = 14;
+ final DateTime initialCreationDate = new DateTime(2014, 5, 15, 0, 0, 0, 0, testTimeZone);
+ // set clock to the initial start date
+ clock.setTime(initialCreationDate);
+
+ final Account parentAccount = createAccountWithNonOsgiPaymentMethod(getAccountData(billingDay));
+ final Account childAccount = createAccountWithNonOsgiPaymentMethod(getChildAccountData(billingDay, parentAccount.getId(), true));
+
+ // CREATE SUBSCRIPTION AND EXPECT BOTH EVENTS: NextEvent.CREATE NextEvent.INVOICE
+ createBaseEntitlementAndCheckForCompletion(childAccount.getId(), "bundleKey1", "Shotgun", ProductCategory.BASE, BillingPeriod.MONTHLY, NextEvent.CREATE, NextEvent.BLOCK, NextEvent.INVOICE);
+
+ // ---- trial period ----
+ // Moving a day the NotificationQ calls the commitInvoice. No payment is expected because balance is 0
+ busHandler.pushExpectedEvents(NextEvent.INVOICE);
+ clock.addDays(1);
+ assertListenerStatus();
+
+ // ---- recurring period ----
+ // Move through time and verify new parent Invoice. No payments are expected.
+ busHandler.pushExpectedEvents(NextEvent.PHASE, NextEvent.INVOICE);
+ clock.addDays(29);
+ assertListenerStatus();
+
+ paymentPlugin.makeNextPaymentFailWithError();
+
+ // move one day to have parent invoice paid
+ busHandler.pushExpectedEvents(NextEvent.INVOICE, NextEvent.PAYMENT_ERROR, NextEvent.INVOICE_PAYMENT_ERROR);
+ clock.addDays(1);
+ assertListenerStatus();
+
+ List<Invoice> parentInvoices = invoiceUserApi.getInvoicesByAccount(parentAccount.getId(), false, callContext);
+ List<Invoice> childInvoices = invoiceUserApi.getInvoicesByAccount(childAccount.getId(), false, callContext);
+ // get last child invoice
+ Invoice childInvoice = childInvoices.get(1);
+ assertEquals(childInvoice.getNumberOfItems(), 1);
+
+ // Second Parent invoice over Recurring period
+ assertEquals(parentInvoices.size(), 2);
+
+ Invoice parentInvoice = parentInvoices.get(1);
+ assertEquals(parentInvoice.getNumberOfItems(), 1);
+ assertEquals(parentInvoice.getStatus(), InvoiceStatus.COMMITTED);
+ assertTrue(parentInvoice.isParentInvoice());
+ assertEquals(parentInvoice.getBalance().compareTo(BigDecimal.valueOf(249.95)), 0);
+
+ // issue a $10 adj when invoice is unpaid
+ insertInvoiceItemAdjustmentToChildInvoice(childAccount, childInvoice, BigDecimal.TEN);
+ // make sure there is time difference between item adjustments.
+ // Otherwise they are created with same id and createdDate and it's used to sort them.
+ clock.addDeltaFromReality(1000);
+
+ // issue a $5 adj when invoice is unpaid
+ insertInvoiceItemAdjustmentToChildInvoice(childAccount, childInvoice, BigDecimal.valueOf(5));
+ clock.addDeltaFromReality(1000);
+
+ // issue a $10 adj when invoice is unpaid
+ insertInvoiceItemAdjustmentToChildInvoice(childAccount, childInvoice, BigDecimal.TEN);
+
+ // move one day
+ busHandler.pushExpectedEvents();
+ clock.addDays(1);
+ assertListenerStatus();
+
+ // issue a $5 adj when invoice is unpaid
+ insertInvoiceItemAdjustmentToChildInvoice(childAccount, childInvoice, BigDecimal.valueOf(5));
+ clock.addDeltaFromReality(1000);
+
+ // issue a $10 adj when invoice is unpaid
+ insertInvoiceItemAdjustmentToChildInvoice(childAccount, childInvoice, BigDecimal.TEN);
+
+ // expected child invoice
+ // RECURRING : $ 249.95
+ // ITEM_ADJ : $ -10
+ // ITEM_ADJ : $ -5
+ // ITEM_ADJ : $ -10
+ // ITEM_ADJ : $ -5
+ // ITEM_ADJ : $ -10
+
+ // expected parent invoice
+ // PARENT_SUMMARY : $ 249.95
+ // ITEM_ADJ : $ -10
+ // ITEM_ADJ : $ -5
+ // ITEM_ADJ : $ -10
+ // ITEM_ADJ : $ -5
+ // ITEM_ADJ : $ -10
+
+ childInvoice = invoiceUserApi.getInvoice(childInvoice.getId(), callContext);
+ assertEquals(childInvoice.getNumberOfItems(), 6);
+ assertEquals(childInvoice.getBalance().compareTo(BigDecimal.valueOf(209.95)), 0);
+ assertEquals(childInvoice.getInvoiceItems().get(0).getInvoiceItemType(), InvoiceItemType.RECURRING);
+ assertEquals(childInvoice.getInvoiceItems().get(1).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(childInvoice.getInvoiceItems().get(1).getAmount().compareTo(BigDecimal.valueOf(-10)), 0);
+ assertEquals(childInvoice.getInvoiceItems().get(2).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(childInvoice.getInvoiceItems().get(2).getAmount().compareTo(BigDecimal.valueOf(-5)), 0);
+ assertEquals(childInvoice.getInvoiceItems().get(3).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(childInvoice.getInvoiceItems().get(3).getAmount().compareTo(BigDecimal.valueOf(-10)), 0);
+ assertEquals(childInvoice.getInvoiceItems().get(4).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(childInvoice.getInvoiceItems().get(4).getAmount().compareTo(BigDecimal.valueOf(-5)), 0);
+ assertEquals(childInvoice.getInvoiceItems().get(5).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(childInvoice.getInvoiceItems().get(5).getAmount().compareTo(BigDecimal.valueOf(-10)), 0);
+
+ // reload parent invoice
+ parentInvoice = invoiceUserApi.getInvoice(parentInvoice.getId(), callContext);
+ assertEquals(parentInvoice.getNumberOfItems(), 6);
+ assertEquals(parentInvoice.getStatus(), InvoiceStatus.COMMITTED);
+ assertTrue(parentInvoice.isParentInvoice());
+ assertEquals(parentInvoice.getBalance().compareTo(BigDecimal.valueOf(209.95)), 0);
+ assertEquals(parentInvoice.getInvoiceItems().get(0).getInvoiceItemType(), InvoiceItemType.PARENT_SUMMARY);
+ assertEquals(parentInvoice.getInvoiceItems().get(1).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(parentInvoice.getInvoiceItems().get(1).getAmount().compareTo(BigDecimal.valueOf(-10)), 0);
+ assertEquals(parentInvoice.getInvoiceItems().get(2).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(parentInvoice.getInvoiceItems().get(2).getAmount().compareTo(BigDecimal.valueOf(-5)), 0);
+ assertEquals(parentInvoice.getInvoiceItems().get(3).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(parentInvoice.getInvoiceItems().get(3).getAmount().compareTo(BigDecimal.valueOf(-10)), 0);
+ assertEquals(parentInvoice.getInvoiceItems().get(4).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(parentInvoice.getInvoiceItems().get(4).getAmount().compareTo(BigDecimal.valueOf(-5)), 0);
+ assertEquals(parentInvoice.getInvoiceItems().get(5).getInvoiceItemType(), InvoiceItemType.ITEM_ADJ);
+ assertEquals(parentInvoice.getInvoiceItems().get(5).getAmount().compareTo(BigDecimal.valueOf(-10)), 0);
+
+ }
+
+ private void insertInvoiceItemAdjustmentToChildInvoice(final Account childAccount, final Invoice childInvoice, BigDecimal amount) throws InvoiceApiException {
+ busHandler.pushExpectedEvents(NextEvent.INVOICE_ADJUSTMENT, NextEvent.INVOICE_ADJUSTMENT);
+ invoiceUserApi.insertInvoiceItemAdjustment(childAccount.getId(), childInvoice.getId(),
+ childInvoice.getInvoiceItems().get(0).getId(),
+ clock.getToday(childAccount.getTimeZone()), amount,
+ childAccount.getCurrency(), "test adjustment", callContext);
+ assertListenerStatus();
+ }
+
// Scenario 2: Follow up Invoice Item Adjustment on PAID invoice
@Test(groups = "slow")
public void testParentInvoiceItemAdjustmentPaidInvoice() throws Exception {
catalog/pom.xml 2(+1 -1)
diff --git a/catalog/pom.xml b/catalog/pom.xml
index 5433d11..29f7251 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-catalog</artifactId>
diff --git a/catalog/src/main/java/org/killbill/billing/catalog/DefaultPlan.java b/catalog/src/main/java/org/killbill/billing/catalog/DefaultPlan.java
index 29cbeb2..79503ad 100644
--- a/catalog/src/main/java/org/killbill/billing/catalog/DefaultPlan.java
+++ b/catalog/src/main/java/org/killbill/billing/catalog/DefaultPlan.java
@@ -78,7 +78,7 @@ public class DefaultPlan extends ValidatingConfig<StandaloneCatalog> implements
@XmlElement(required = false)
private Integer plansAllowedInBundle = 1;
- private PriceList priceList;
+ private String priceListName;
public DefaultPlan() {
initialPhases = new DefaultPlanPhase[0];
@@ -94,7 +94,7 @@ public class DefaultPlan extends ValidatingConfig<StandaloneCatalog> implements
initialPhases[i] = newPhase;
}
this.finalPhase = new DefaultPlanPhase(this, in.getFinalPhase(), overrides[overrides.length - 1]);
- this.priceList = in.getPriceList();
+ this.priceListName = in.getPriceListName();
}
@Override
@@ -113,8 +113,8 @@ public class DefaultPlan extends ValidatingConfig<StandaloneCatalog> implements
}
@Override
- public PriceList getPriceList() {
- return priceList;
+ public String getPriceListName() {
+ return priceListName;
}
@Override
@@ -185,7 +185,7 @@ public class DefaultPlan extends ValidatingConfig<StandaloneCatalog> implements
p.initialize(catalog, sourceURI);
}
}
- this.priceList = findPriceListForPlan(catalog);
+ this.priceListName = findPriceListForPlan(catalog);
}
@Override
@@ -223,8 +223,8 @@ public class DefaultPlan extends ValidatingConfig<StandaloneCatalog> implements
return this;
}
- public DefaultPlan setPriceList(final DefaultPriceList priceList) {
- this.priceList = priceList;
+ public DefaultPlan setPriceListName(final String priceListName) {
+ this.priceListName = priceListName;
return this;
}
@@ -313,11 +313,11 @@ public class DefaultPlan extends ValidatingConfig<StandaloneCatalog> implements
+ plansAllowedInBundle + "]";
}
- private DefaultPriceList findPriceListForPlan(final StandaloneCatalog catalog) {
+ private String findPriceListForPlan(final StandaloneCatalog catalog) {
for (PriceList cur : catalog.getPriceLists().getAllPriceLists()) {
for (Plan p : cur.getPlans()) {
if (p.getName().equals(name)) {
- return (DefaultPriceList) cur;
+ return ((DefaultPriceList) cur).getName();
}
}
}
diff --git a/catalog/src/main/java/org/killbill/billing/catalog/VersionedCatalog.java b/catalog/src/main/java/org/killbill/billing/catalog/VersionedCatalog.java
index de4e38a..d70a831 100644
--- a/catalog/src/main/java/org/killbill/billing/catalog/VersionedCatalog.java
+++ b/catalog/src/main/java/org/killbill/billing/catalog/VersionedCatalog.java
@@ -23,10 +23,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Set;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
@@ -149,9 +147,9 @@ public class VersionedCatalog extends ValidatingConfig<StandaloneCatalogWithPric
}
}
- private Plan findPlan(final PlanRequestWrapper wrapper,
- final DateTime requestedDate,
- final DateTime subscriptionStartDate)
+ private CatalogPlanEntry findCatalogPlanEntry(final PlanRequestWrapper wrapper,
+ final DateTime requestedDate,
+ final DateTime subscriptionStartDate)
throws CatalogApiException {
final List<StandaloneCatalogWithPriceOverride> catalogs = versionsBeforeDate(requestedDate.toDate());
if (catalogs.isEmpty()) {
@@ -174,12 +172,12 @@ public class VersionedCatalog extends ValidatingConfig<StandaloneCatalogWithPric
final DateTime catalogEffectiveDate = CatalogDateHelper.toUTCDateTime(c.getEffectiveDate());
if (!subscriptionStartDate.isBefore(catalogEffectiveDate)) { // Its a new subscription this plan always applies
- return plan;
+ return new CatalogPlanEntry(c, plan);
} else { //Its an existing subscription
if (plan.getEffectiveDateForExistingSubscriptions() != null) { //if it is null any change to this does not apply to existing subscriptions
final DateTime existingSubscriptionDate = CatalogDateHelper.toUTCDateTime(plan.getEffectiveDateForExistingSubscriptions());
if (requestedDate.isAfter(existingSubscriptionDate)) { // this plan is now applicable to existing subs
- return plan;
+ return new CatalogPlanEntry(c, plan);
}
}
}
@@ -188,6 +186,26 @@ public class VersionedCatalog extends ValidatingConfig<StandaloneCatalogWithPric
throw new CatalogApiException(ErrorCode.CAT_NO_CATALOG_FOR_GIVEN_DATE, requestedDate.toDate().toString());
}
+ private static class CatalogPlanEntry {
+
+ private final StaticCatalog staticCatalog;
+ private final Plan plan;
+
+ public CatalogPlanEntry(final StaticCatalog staticCatalog, final Plan plan) {
+ this.staticCatalog = staticCatalog;
+ this.plan = plan;
+ }
+
+ public StaticCatalog getStaticCatalog() {
+ return staticCatalog;
+ }
+
+ public Plan getPlan() {
+ return plan;
+ }
+ }
+
+
public Clock getClock() {
return clock;
}
@@ -284,7 +302,8 @@ public class VersionedCatalog extends ValidatingConfig<StandaloneCatalogWithPric
final DateTime requestedDate,
final DateTime subscriptionStartDate)
throws CatalogApiException {
- return findPlan(new PlanRequestWrapper(name), requestedDate, subscriptionStartDate);
+ final CatalogPlanEntry entry = findCatalogPlanEntry(new PlanRequestWrapper(name), requestedDate, subscriptionStartDate);
+ return entry.getPlan();
}
@Override
@@ -295,7 +314,8 @@ public class VersionedCatalog extends ValidatingConfig<StandaloneCatalogWithPric
final DateTime requestedDate,
final DateTime subscriptionStartDate)
throws CatalogApiException {
- return findPlan(new PlanRequestWrapper(productName, term, priceListName, overrides), requestedDate, subscriptionStartDate);
+ final CatalogPlanEntry entry = findCatalogPlanEntry(new PlanRequestWrapper(productName, term, priceListName, overrides), requestedDate, subscriptionStartDate);
+ return entry.getPlan();
}
//
@@ -320,14 +340,24 @@ public class VersionedCatalog extends ValidatingConfig<StandaloneCatalogWithPric
}
//
- // Find a price list
+ // Find a price list associated to a given subscription
//
@Override
+ public PriceList findPriceListForPlan(final String planName,
+ final DateTime requestedDate,
+ final DateTime subscriptionStartDate)
+ throws CatalogApiException {
+ final CatalogPlanEntry entry = findCatalogPlanEntry(new PlanRequestWrapper(planName), requestedDate, subscriptionStartDate);
+ return entry.getStaticCatalog().findCurrentPricelist(entry.getPlan().getPriceListName());
+ }
+
+
public PriceList findPriceList(final String name, final DateTime requestedDate)
throws CatalogApiException {
return versionForDate(requestedDate).findCurrentPriceList(name);
}
+
//
// Rules
//
diff --git a/catalog/src/test/java/org/killbill/billing/catalog/MockCatalog.java b/catalog/src/test/java/org/killbill/billing/catalog/MockCatalog.java
index 2bea796..5e6c579 100644
--- a/catalog/src/test/java/org/killbill/billing/catalog/MockCatalog.java
+++ b/catalog/src/test/java/org/killbill/billing/catalog/MockCatalog.java
@@ -154,6 +154,11 @@ public class MockCatalog extends StandaloneCatalog implements Catalog {
}
@Override
+ public PriceList findPriceListForPlan(final String name, final DateTime requestedDate, final DateTime subscriptionStartDate) throws CatalogApiException {
+ return findCurrentPricelist(name);
+ }
+
+ @Override
public BillingActionPolicy planChangePolicy(final PlanPhaseSpecifier from, final PlanSpecifier to, final DateTime requestedDate)
throws CatalogApiException {
return planChangePolicy(from, to);
currency/pom.xml 2(+1 -1)
diff --git a/currency/pom.xml b/currency/pom.xml
index ac57046..2f17d06 100644
--- a/currency/pom.xml
+++ b/currency/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-currency</artifactId>
entitlement/pom.xml 2(+1 -1)
diff --git a/entitlement/pom.xml b/entitlement/pom.xml
index 31776ef..ec7e7cb 100644
--- a/entitlement/pom.xml
+++ b/entitlement/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-entitlement</artifactId>
diff --git a/entitlement/src/main/java/org/killbill/billing/entitlement/engine/core/EventsStreamBuilder.java b/entitlement/src/main/java/org/killbill/billing/entitlement/engine/core/EventsStreamBuilder.java
index 6cee88b..ba5f169 100644
--- a/entitlement/src/main/java/org/killbill/billing/entitlement/engine/core/EventsStreamBuilder.java
+++ b/entitlement/src/main/java/org/killbill/billing/entitlement/engine/core/EventsStreamBuilder.java
@@ -374,7 +374,7 @@ public class EventsStreamBuilder {
productCategory = lastActiveProduct.getCategory();
final PlanPhase lastActivePlanPhase = subscription.getLastActivePhase();
billingPeriod = lastActivePlanPhase.getRecurring() != null ? lastActivePlanPhase.getRecurring().getBillingPeriod() : BillingPeriod.NO_BILLING_PERIOD;
- priceListName = subscription.getLastActivePlan().getPriceList().getName();
+ priceListName = subscription.getLastActivePlan().getPriceListName();
phaseType = subscription.getLastActivePhase().getPhaseType();
}
return new PlanPhaseSpecifier(lastActiveProductName,
invoice/pom.xml 2(+1 -1)
diff --git a/invoice/pom.xml b/invoice/pom.xml
index 889006b..018b024 100644
--- a/invoice/pom.xml
+++ b/invoice/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-invoice</artifactId>
diff --git a/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java b/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java
index dff9142..a4b7d54 100644
--- a/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java
+++ b/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java
@@ -21,6 +21,8 @@ package org.killbill.billing.invoice;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -70,6 +72,7 @@ import org.killbill.billing.invoice.calculator.InvoiceCalculatorUtils;
import org.killbill.billing.invoice.dao.InvoiceDao;
import org.killbill.billing.invoice.dao.InvoiceItemModelDao;
import org.killbill.billing.invoice.dao.InvoiceModelDao;
+import org.killbill.billing.invoice.dao.InvoiceModelDaoHelper;
import org.killbill.billing.invoice.dao.InvoiceParentChildModelDao;
import org.killbill.billing.invoice.generator.InvoiceGenerator;
import org.killbill.billing.invoice.generator.InvoiceWithMetadata;
@@ -78,6 +81,7 @@ import org.killbill.billing.invoice.generator.InvoiceWithMetadata.SubscriptionFu
import org.killbill.billing.invoice.model.DefaultInvoice;
import org.killbill.billing.invoice.model.FixedPriceInvoiceItem;
import org.killbill.billing.invoice.model.InvoiceItemFactory;
+import org.killbill.billing.invoice.model.ItemAdjInvoiceItem;
import org.killbill.billing.invoice.model.ParentInvoiceItem;
import org.killbill.billing.invoice.model.RecurringInvoiceItem;
import org.killbill.billing.invoice.notification.DefaultNextBillingDateNotifier;
@@ -88,6 +92,7 @@ import org.killbill.billing.junction.BillingInternalApi;
import org.killbill.billing.subscription.api.SubscriptionBaseInternalApi;
import org.killbill.billing.subscription.api.SubscriptionBaseTransitionType;
import org.killbill.billing.subscription.api.user.SubscriptionBaseApiException;
+import org.killbill.billing.util.UUIDs;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.InternalCallContextFactory;
import org.killbill.billing.util.callcontext.TenantContext;
@@ -777,41 +782,63 @@ public class InvoiceDispatcher {
public void processParentInvoiceForAdjustments(final ImmutableAccountData account, final UUID childInvoiceId, final InternalCallContext context) throws InvoiceApiException {
final InvoiceModelDao childInvoiceModelDao = invoiceDao.getById(childInvoiceId, context);
- final Invoice childInvoice = new DefaultInvoice(childInvoiceModelDao);
- final InvoiceModelDao parentInvoice = childInvoiceModelDao.getParentInvoice();
+ final InvoiceModelDao parentInvoiceModelDao = childInvoiceModelDao.getParentInvoice();
- if (parentInvoice == null) {
+ if (parentInvoiceModelDao == null) {
throw new InvoiceApiException(ErrorCode.INVOICE_MISSING_PARENT_INVOICE, childInvoiceModelDao.getId());
- } else if (parentInvoice.getStatus().equals(InvoiceStatus.COMMITTED)) {
- // ignore parent invoice adjustment if it's in COMMITTED status.
+ } else if (InvoiceModelDaoHelper.getBalance(parentInvoiceModelDao).compareTo(BigDecimal.ZERO) == 0) {
+ // ignore item adjustments for paid invoices.
return;
}
- final InvoiceItemModelDao childInvoiceItemAdjustment = Iterables.find(childInvoiceModelDao.getInvoiceItems(), new Predicate<InvoiceItemModelDao>() {
+ final Long parentAccountRecordId = internalCallContextFactory.getRecordIdFromObject(account.getParentAccountId(), ObjectType.ACCOUNT, buildTenantContext(context));
+ final InternalCallContext parentContext = internalCallContextFactory.createInternalCallContext(parentAccountRecordId, context);
+ final String description = "Adjustment for account ".concat(account.getExternalKey());
+
+ // find PARENT_SUMMARY invoice item for this child account
+ final InvoiceItemModelDao parentSummaryInvoiceItem = Iterables.find(parentInvoiceModelDao.getInvoiceItems(), new Predicate<InvoiceItemModelDao>() {
@Override
public boolean apply(@Nullable final InvoiceItemModelDao input) {
- return input.getType().equals(InvoiceItemType.ITEM_ADJ) || input.getType().equals(InvoiceItemType.REPAIR_ADJ);
+ return input.getType().equals(InvoiceItemType.PARENT_SUMMARY)
+ && input.getChildAccountId().equals(childInvoiceModelDao.getAccountId());
}
});
- if (childInvoiceItemAdjustment == null) return;
-
- final BigDecimal childInvoiceAdjustmentAmount = childInvoiceItemAdjustment.getAmount();
-
- final Long parentAccountRecordId = internalCallContextFactory.getRecordIdFromObject(account.getParentAccountId(), ObjectType.ACCOUNT, buildTenantContext(context));
- final InternalCallContext parentContext = internalCallContextFactory.createInternalCallContext(parentAccountRecordId, context);
- final DateTime today = clock.getNow(account.getTimeZone());
- final String description = "Adjustment for account ".concat(account.getExternalKey());
- final InvoiceItemModelDao parentInvoiceItemForChild = Iterables.find(parentInvoice.getInvoiceItems(), new Predicate<InvoiceItemModelDao>() {
+ final Iterable<InvoiceItemModelDao> childAdjustments = Iterables.filter(childInvoiceModelDao.getInvoiceItems(), new Predicate<InvoiceItemModelDao>() {
@Override
public boolean apply(@Nullable final InvoiceItemModelDao input) {
- return childInvoice.getAccountId().equals(input.getChildAccountId());
+ return input.getType().equals(InvoiceItemType.ITEM_ADJ);
}
});
+ // find last ITEM_ADJ invoice added in child invoice
+ final InvoiceItemModelDao lastChildInvoiceItemAdjustment = Collections.max(Lists.newArrayList(childAdjustments), new Comparator<InvoiceItemModelDao>() {
+ @Override
+ public int compare(InvoiceItemModelDao o1, InvoiceItemModelDao o2) {
+ return o1.getCreatedDate().compareTo(o2.getCreatedDate());
+ }
+ });
+
+ final BigDecimal childInvoiceAdjustmentAmount = lastChildInvoiceItemAdjustment.getAmount();
+
+ if (parentInvoiceModelDao.getStatus().equals(InvoiceStatus.COMMITTED)) {
+ ItemAdjInvoiceItem adj = new ItemAdjInvoiceItem(UUIDs.randomUUID(),
+ lastChildInvoiceItemAdjustment.getCreatedDate(),
+ parentSummaryInvoiceItem.getInvoiceId(),
+ parentSummaryInvoiceItem.getAccountId(),
+ lastChildInvoiceItemAdjustment.getStartDate(),
+ description,
+ childInvoiceAdjustmentAmount,
+ parentInvoiceModelDao.getCurrency(),
+ parentSummaryInvoiceItem.getId());
+ parentInvoiceModelDao.addInvoiceItem(new InvoiceItemModelDao(adj));
+ invoiceDao.createInvoices(ImmutableList.<InvoiceModelDao>of(parentInvoiceModelDao), parentContext);
+ return;
+ }
+
// update item amount
- BigDecimal newParentInvoiceItemAmount = childInvoiceAdjustmentAmount.add(parentInvoiceItemForChild.getAmount());
- invoiceDao.updateInvoiceItemAmount(parentInvoiceItemForChild.getId(), newParentInvoiceItemAmount, parentContext);
+ final BigDecimal newParentInvoiceItemAmount = childInvoiceAdjustmentAmount.add(parentSummaryInvoiceItem.getAmount());
+ invoiceDao.updateInvoiceItemAmount(parentSummaryInvoiceItem.getId(), newParentInvoiceItemAmount, parentContext);
}
}
jaxrs/pom.xml 2(+1 -1)
diff --git a/jaxrs/pom.xml b/jaxrs/pom.xml
index 2e7e0d8..8cbacae 100644
--- a/jaxrs/pom.xml
+++ b/jaxrs/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-jaxrs</artifactId>
junction/pom.xml 2(+1 -1)
diff --git a/junction/pom.xml b/junction/pom.xml
index 0d5495f..75026d6 100644
--- a/junction/pom.xml
+++ b/junction/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-junction</artifactId>
NEWS 3(+3 -0)
diff --git a/NEWS b/NEWS
index 15849a8..7df25f2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+0.17.1
+ See https://github.com/killbill/killbill/releases/tag/killbill-0.17.1
+
0.17.0
See https://github.com/killbill/killbill/releases/tag/killbill-0.17.0
overdue/pom.xml 2(+1 -1)
diff --git a/overdue/pom.xml b/overdue/pom.xml
index 861ecd5..0ada695 100644
--- a/overdue/pom.xml
+++ b/overdue/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-overdue</artifactId>
payment/pom.xml 2(+1 -1)
diff --git a/payment/pom.xml b/payment/pom.xml
index 002f777..35670d6 100644
--- a/payment/pom.xml
+++ b/payment/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-payment</artifactId>
diff --git a/payment/src/main/java/org/killbill/billing/payment/core/PaymentProcessor.java b/payment/src/main/java/org/killbill/billing/payment/core/PaymentProcessor.java
index 43eb3bf..decfbd4 100644
--- a/payment/src/main/java/org/killbill/billing/payment/core/PaymentProcessor.java
+++ b/payment/src/main/java/org/killbill/billing/payment/core/PaymentProcessor.java
@@ -162,7 +162,8 @@ public class PaymentProcessor extends ProcessorBase {
final OperationResult overridePluginResult = isSuccess ? OperationResult.SUCCESS : OperationResult.FAILURE;
- return performOperation(true, null, transactionModelDao.getTransactionType(), account, null, transactionModelDao.getPaymentId(),
+ final boolean runJanitor = false;
+ return performOperation(true, runJanitor, null, transactionModelDao.getTransactionType(), account, null, transactionModelDao.getPaymentId(),
transactionModelDao.getId(), transactionModelDao.getAmount(), transactionModelDao.getCurrency(), null, transactionModelDao.getTransactionExternalKey(), true,
overridePluginResult, PLUGIN_PROPERTIES, callContext, internalCallContext);
}
@@ -347,6 +348,29 @@ public class PaymentProcessor extends ProcessorBase {
final Iterable<PluginProperty> properties,
final CallContext callContext,
final InternalCallContext internalCallContext) throws PaymentApiException {
+ boolean runJanitor = true;
+ return performOperation(isApiPayment, runJanitor, attemptId, transactionType, account, paymentMethodId, paymentId,
+ transactionId, amount, currency, paymentExternalKey, paymentTransactionExternalKey,
+ shouldLockAccountAndDispatch, overridePluginOperationResult, properties, callContext, internalCallContext);
+ }
+
+ private Payment performOperation(final boolean isApiPayment,
+ final boolean runJanitor,
+ @Nullable final UUID attemptId,
+ final TransactionType transactionType,
+ final Account account,
+ @Nullable final UUID paymentMethodId,
+ @Nullable final UUID paymentId,
+ @Nullable final UUID transactionId,
+ @Nullable final BigDecimal amount,
+ @Nullable final Currency currency,
+ @Nullable final String paymentExternalKey,
+ @Nullable final String paymentTransactionExternalKey,
+ final boolean shouldLockAccountAndDispatch,
+ @Nullable final OperationResult overridePluginOperationResult,
+ final Iterable<PluginProperty> properties,
+ final CallContext callContext,
+ final InternalCallContext internalCallContext) throws PaymentApiException {
final PaymentStateContext paymentStateContext = paymentAutomatonRunner.buildPaymentStateContext(isApiPayment,
transactionType,
account,
@@ -382,9 +406,11 @@ public class PaymentProcessor extends ProcessorBase {
if (transactionToComplete != null) {
// For completion calls, always invoke the Janitor first to get the latest state. The state machine will then
// prevent disallowed transitions in case the state couldn't be fixed (or if it's already in a final state).
- final PaymentPluginApi plugin = getPaymentProviderPlugin(paymentModelDao.getPaymentMethodId(), internalCallContext);
- final List<PaymentTransactionInfoPlugin> pluginTransactions = getPaymentTransactionInfoPlugins(plugin, paymentModelDao, properties, callContext);
- paymentModelDao = invokeJanitor(paymentModelDao, paymentTransactionsForCurrentPayment, pluginTransactions, internalCallContext);
+ if (runJanitor) {
+ final PaymentPluginApi plugin = getPaymentProviderPlugin(paymentModelDao.getPaymentMethodId(), internalCallContext);
+ final List<PaymentTransactionInfoPlugin> pluginTransactions = getPaymentTransactionInfoPlugins(plugin, paymentModelDao, properties, callContext);
+ paymentModelDao = invokeJanitor(paymentModelDao, paymentTransactionsForCurrentPayment, pluginTransactions, internalCallContext);
+ }
final UUID transactionToCompleteId = transactionToComplete.getId();
transactionToComplete = Iterables.<PaymentTransactionModelDao>find(paymentTransactionsForCurrentPayment,
diff --git a/payment/src/test/java/org/killbill/billing/payment/core/TestPaymentProcessor.java b/payment/src/test/java/org/killbill/billing/payment/core/TestPaymentProcessor.java
index fe0fe2a..25aee73 100644
--- a/payment/src/test/java/org/killbill/billing/payment/core/TestPaymentProcessor.java
+++ b/payment/src/test/java/org/killbill/billing/payment/core/TestPaymentProcessor.java
@@ -199,6 +199,29 @@ public class TestPaymentProcessor extends PaymentTestSuiteWithEmbeddedDB {
paymentBusListener.verify(1, account.getId(), paymentId, TEN, TransactionStatus.SUCCESS);
}
+ @Test(groups = "slow")
+ public void testNotifyPendingPaymentOfStateChanged() throws Exception {
+ final String paymentExternalKey = UUID.randomUUID().toString();
+ final Iterable<PluginProperty> pluginPropertiesToDriveTransationToPending = ImmutableList.<PluginProperty>of(new PluginProperty(MockPaymentProviderPlugin.PLUGIN_PROPERTY_PAYMENT_PLUGIN_STATUS_OVERRIDE, PaymentPluginStatus.PENDING, false));
+
+ // Create Pending AUTH
+ final String authorizationKey = UUID.randomUUID().toString();
+ final Payment authorization = paymentProcessor.createAuthorization(true, null, account, null, null, TEN, CURRENCY, paymentExternalKey, authorizationKey,
+ SHOULD_LOCK_ACCOUNT, pluginPropertiesToDriveTransationToPending, callContext, internalCallContext);
+ final PaymentTransaction pendingTransaction = authorization.getTransactions().get(0);
+ Assert.assertEquals(pendingTransaction.getTransactionStatus(), TransactionStatus.PENDING);
+
+ final UUID transactionId = pendingTransaction.getId();
+ // Override plugin status of payment
+ mockPaymentProviderPlugin.overridePaymentPluginStatus(authorization.getId(), transactionId, PaymentPluginStatus.PROCESSED);
+ // Notify that state has changed, after changing the state in the plugin
+ final Payment updatedPayment = paymentProcessor.notifyPendingPaymentOfStateChanged(account, transactionId, true, callContext, internalCallContext);
+ verifyPayment(updatedPayment, paymentExternalKey, TEN, ZERO, ZERO, 1);
+
+ final PaymentTransaction updatedTransaction = updatedPayment.getTransactions().get(0);
+ Assert.assertEquals(updatedTransaction.getTransactionStatus(), TransactionStatus.SUCCESS);
+ }
+
private void verifyPayment(final Payment payment, final String paymentExternalKey,
final BigDecimal authAmount, final BigDecimal capturedAmount, final BigDecimal refundedAmount,
final int transactionsSize) {
pom.xml 4(+2 -2)
diff --git a/pom.xml b/pom.xml
index d1cf442..a43a331 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,10 +21,10 @@
<parent>
<artifactId>killbill-oss-parent</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.111</version>
+ <version>0.112</version>
</parent>
<artifactId>killbill</artifactId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>killbill</name>
<description>Library for managing recurring subscriptions and the associated billing</description>
profiles/killbill/pom.xml 2(+1 -1)
diff --git a/profiles/killbill/pom.xml b/profiles/killbill/pom.xml
index 2734aad..ced11d2 100644
--- a/profiles/killbill/pom.xml
+++ b/profiles/killbill/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>killbill-profiles</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-profiles-killbill</artifactId>
diff --git a/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestBundle.java b/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestBundle.java
index a33bea7..4c158af 100644
--- a/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestBundle.java
+++ b/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestBundle.java
@@ -37,11 +37,14 @@ import org.killbill.billing.util.api.AuditLevel;
import org.testng.Assert;
import org.testng.annotations.Test;
+import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Iterables;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotEquals;
+import static org.testng.Assert.assertNotNull;
public class TestBundle extends TestJaxrsBase {
@@ -129,10 +132,20 @@ public class TestBundle extends TestJaxrsBase {
final Bundles bundles = killBillClient.getAllBundlesForExternalKey(bundleExternalKey, requestOptions);
assertEquals(bundles.size(), 2);
- assertEquals(bundles.get(0).getBundleId(), originalBundle.getBundleId());
- assertEquals(bundles.get(0).getSubscriptions().get(0).getState(), EntitlementState.CANCELLED);
- assertEquals(bundles.get(1).getBundleId(), newBundle.getBundleId());
- assertEquals(bundles.get(1).getSubscriptions().get(0).getState(), EntitlementState.ACTIVE);
+ assertSubscriptionState(bundles, originalBundle.getBundleId(), EntitlementState.CANCELLED);
+ assertSubscriptionState(bundles, newBundle.getBundleId(), EntitlementState.ACTIVE);
+ }
+
+ private void assertSubscriptionState(final Bundles bundles, final UUID bundleId, final EntitlementState expectedState) {
+ final Bundle bundle = Iterables.tryFind(bundles, new Predicate<Bundle>() {
+ @Override
+ public boolean apply(final Bundle input) {
+ return input.getBundleId().equals(bundleId);
+ }
+ }).orNull();
+
+ assertNotNull(bundle);
+ assertEquals(bundle.getSubscriptions().get(0).getState(), expectedState);
}
@Test(groups = "slow", description = "Block a bundle")
profiles/killpay/pom.xml 2(+1 -1)
diff --git a/profiles/killpay/pom.xml b/profiles/killpay/pom.xml
index 3bdda45..c04bdd4 100644
--- a/profiles/killpay/pom.xml
+++ b/profiles/killpay/pom.xml
@@ -20,7 +20,7 @@
<parent>
<artifactId>killbill-profiles</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-profiles-killpay</artifactId>
profiles/pom.xml 2(+1 -1)
diff --git a/profiles/pom.xml b/profiles/pom.xml
index ababb01..50febc2 100644
--- a/profiles/pom.xml
+++ b/profiles/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-profiles</artifactId>
subscription/pom.xml 2(+1 -1)
diff --git a/subscription/pom.xml b/subscription/pom.xml
index face3cf..6a40565 100644
--- a/subscription/pom.xml
+++ b/subscription/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-subscription</artifactId>
diff --git a/subscription/src/main/java/org/killbill/billing/subscription/api/user/DefaultSubscriptionBase.java b/subscription/src/main/java/org/killbill/billing/subscription/api/user/DefaultSubscriptionBase.java
index f6c0e8a..b3f06f2 100644
--- a/subscription/src/main/java/org/killbill/billing/subscription/api/user/DefaultSubscriptionBase.java
+++ b/subscription/src/main/java/org/killbill/billing/subscription/api/user/DefaultSubscriptionBase.java
@@ -664,7 +664,7 @@ public class DefaultSubscriptionBase extends EntityBase implements SubscriptionB
nextPlan = (nextPlanName != null) ? catalog.findPlan(nextPlanName, cur.getEffectiveDate(), getAlignStartDate()) : null;
nextPhase = (nextPhaseName != null) ? catalog.findPhase(nextPhaseName, cur.getEffectiveDate(), getAlignStartDate()) : null;
- nextPriceList = (nextPlan != null) ? nextPlan.getPriceList() : null;
+ nextPriceList = (nextPlan != null) ? catalog.findPriceListForPlan(nextPlanName, cur.getEffectiveDate(), getAlignStartDate()) : null;
final SubscriptionBaseTransitionData transition = new SubscriptionBaseTransitionData(
cur.getId(), id, bundleId, cur.getType(), apiEventType,
tenant/pom.xml 2(+1 -1)
diff --git a/tenant/pom.xml b/tenant/pom.xml
index 25ae164..5579ae3 100644
--- a/tenant/pom.xml
+++ b/tenant/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-tenant</artifactId>
usage/pom.xml 2(+1 -1)
diff --git a/usage/pom.xml b/usage/pom.xml
index a7d1a0d..cf4afb6 100644
--- a/usage/pom.xml
+++ b/usage/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-usage</artifactId>
util/pom.xml 2(+1 -1)
diff --git a/util/pom.xml b/util/pom.xml
index ca17f22..edd8b77 100644
--- a/util/pom.xml
+++ b/util/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>killbill</artifactId>
<groupId>org.kill-bill.billing</groupId>
- <version>0.17.1-SNAPSHOT</version>
+ <version>0.17.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-util</artifactId>
diff --git a/util/src/test/java/org/killbill/billing/mock/MockPlan.java b/util/src/test/java/org/killbill/billing/mock/MockPlan.java
index ab6ae03..09b4e88 100644
--- a/util/src/test/java/org/killbill/billing/mock/MockPlan.java
+++ b/util/src/test/java/org/killbill/billing/mock/MockPlan.java
@@ -53,7 +53,7 @@ public class MockPlan implements Plan {
}
@Override
- public PriceList getPriceList() {
+ public String getPriceListName() {
throw new UnsupportedOperationException();
}