killbill-memoizeit

Changes

account/pom.xml 2(+1 -1)

api/pom.xml 2(+1 -1)

beatrix/pom.xml 2(+1 -1)

catalog/pom.xml 2(+1 -1)

currency/pom.xml 2(+1 -1)

invoice/pom.xml 2(+1 -1)

jaxrs/pom.xml 2(+1 -1)

junction/pom.xml 2(+1 -1)

NEWS 5(+4 -1)

osgi/pom.xml 2(+1 -1)

overdue/pom.xml 2(+1 -1)

payment/pom.xml 2(+1 -1)

pom.xml 4(+2 -2)

server/pom.xml 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 b295e0e..be47411 100644
--- a/account/pom.xml
+++ b/account/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-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 cc9f6a1..d7d65c3 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-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 8d872e7..5bfe8e7 100644
--- a/beatrix/pom.xml
+++ b/beatrix/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-beatrix</artifactId>

catalog/pom.xml 2(+1 -1)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 4630db6..3db98c0 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-catalog</artifactId>

currency/pom.xml 2(+1 -1)

diff --git a/currency/pom.xml b/currency/pom.xml
index 157778e..0df4eb6 100644
--- a/currency/pom.xml
+++ b/currency/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/entitlement/pom.xml b/entitlement/pom.xml
index a1c4c86..c04bbef 100644
--- a/entitlement/pom.xml
+++ b/entitlement/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-entitlement</artifactId>

invoice/pom.xml 2(+1 -1)

diff --git a/invoice/pom.xml b/invoice/pom.xml
index 81c461a..19a5ff4 100644
--- a/invoice/pom.xml
+++ b/invoice/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-invoice</artifactId>

jaxrs/pom.xml 2(+1 -1)

diff --git a/jaxrs/pom.xml b/jaxrs/pom.xml
index 8304c93..0546ad0 100644
--- a/jaxrs/pom.xml
+++ b/jaxrs/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-jaxrs</artifactId>
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CustomFieldJson.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CustomFieldJson.java
index 637930c..93f7579 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CustomFieldJson.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CustomFieldJson.java
@@ -20,6 +20,7 @@ import java.util.List;
 
 import javax.annotation.Nullable;
 
+import com.ning.billing.ObjectType;
 import com.ning.billing.util.audit.AuditLog;
 import com.ning.billing.util.customfield.CustomField;
 
@@ -28,20 +29,41 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 
 public class CustomFieldJson extends JsonBase {
 
+    private final String customFieldId;
+    private final String objectId;
+    private final ObjectType objectType;
     private final String name;
     private final String value;
 
     @JsonCreator
-    public CustomFieldJson(@JsonProperty("name") @Nullable final String name,
+    public CustomFieldJson(@JsonProperty("customFieldId") final String customFieldId,
+                           @JsonProperty("objectId") final String objectId,
+                           @JsonProperty("objectType") final ObjectType objectType,
+                           @JsonProperty("name") @Nullable final String name,
                            @JsonProperty("value") @Nullable final String value,
                            @JsonProperty("auditLogs") @Nullable final List<AuditLogJson> auditLogs) {
         super(auditLogs);
+        this.customFieldId = customFieldId;
+        this.objectId = objectId;
+        this.objectType = objectType;
         this.name = name;
         this.value = value;
     }
 
     public CustomFieldJson(final CustomField input, @Nullable final List<AuditLog> auditLogs) {
-        this(input.getFieldName(), input.getFieldValue(), toAuditLogJson(auditLogs));
+        this(input.getId().toString(), input.getObjectId().toString(), input.getObjectType(), input.getFieldName(), input.getFieldValue(), toAuditLogJson(auditLogs));
+    }
+
+    public String getCustomFieldId() {
+        return customFieldId;
+    }
+
+    public String getObjectId() {
+        return objectId;
+    }
+
+    public ObjectType getObjectType() {
+        return objectType;
     }
 
     public String getName() {
@@ -55,7 +77,10 @@ public class CustomFieldJson extends JsonBase {
     @Override
     public String toString() {
         final StringBuilder sb = new StringBuilder("CustomFieldJson{");
-        sb.append("name='").append(name).append('\'');
+        sb.append("customFieldId='").append(customFieldId).append('\'');
+        sb.append(", objectId=").append(objectId);
+        sb.append(", objectType=").append(objectType);
+        sb.append(", name='").append(name).append('\'');
         sb.append(", value='").append(value).append('\'');
         sb.append('}');
         return sb.toString();
@@ -72,9 +97,18 @@ public class CustomFieldJson extends JsonBase {
 
         final CustomFieldJson that = (CustomFieldJson) o;
 
+        if (customFieldId != null ? !customFieldId.equals(that.customFieldId) : that.customFieldId != null) {
+            return false;
+        }
         if (name != null ? !name.equals(that.name) : that.name != null) {
             return false;
         }
+        if (objectId != null ? !objectId.equals(that.objectId) : that.objectId != null) {
+            return false;
+        }
+        if (objectType != that.objectType) {
+            return false;
+        }
         if (value != null ? !value.equals(that.value) : that.value != null) {
             return false;
         }
@@ -84,7 +118,10 @@ public class CustomFieldJson extends JsonBase {
 
     @Override
     public int hashCode() {
-        int result = name != null ? name.hashCode() : 0;
+        int result = customFieldId != null ? customFieldId.hashCode() : 0;
+        result = 31 * result + (objectId != null ? objectId.hashCode() : 0);
+        result = 31 * result + (objectType != null ? objectType.hashCode() : 0);
+        result = 31 * result + (name != null ? name.hashCode() : 0);
         result = 31 * result + (value != null ? value.hashCode() : 0);
         return result;
     }
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/TagDefinitionJson.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/TagDefinitionJson.java
index b955b1b..a271369 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/TagDefinitionJson.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/TagDefinitionJson.java
@@ -21,6 +21,7 @@ import java.util.List;
 import javax.annotation.Nullable;
 
 import com.ning.billing.ObjectType;
+import com.ning.billing.util.audit.AuditLog;
 import com.ning.billing.util.tag.TagDefinition;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -42,7 +43,9 @@ public class TagDefinitionJson extends JsonBase {
                              @JsonProperty("isControlTag") final Boolean isControlTag,
                              @JsonProperty("name") final String name,
                              @JsonProperty("description") @Nullable final String description,
-                             @JsonProperty("applicableObjectTypes") @Nullable final List<String> applicableObjectTypes) {
+                             @JsonProperty("applicableObjectTypes") @Nullable final List<String> applicableObjectTypes,
+                             @JsonProperty("auditLogs") @Nullable final List<AuditLogJson> auditLogs) {
+        super(auditLogs);
         this.id = id;
         this.isControlTag = isControlTag;
         this.name = name;
@@ -50,18 +53,22 @@ public class TagDefinitionJson extends JsonBase {
         this.applicableObjectTypes = applicableObjectTypes;
     }
 
-    public TagDefinitionJson(final TagDefinition tagDefinition) {
-        this(tagDefinition.getId().toString(), tagDefinition.isControlTag(), tagDefinition.getName(),
-             tagDefinition.getDescription(), ImmutableList.<String>copyOf(Collections2.transform(tagDefinition.getApplicableObjectTypes(), new Function<ObjectType, String>() {
-            @Override
-            public String apply(@Nullable final ObjectType input) {
-                if (input == null) {
-                    return "";
-                } else {
-                    return input.toString();
-                }
-            }
-        })));
+    public TagDefinitionJson(final TagDefinition tagDefinition, @Nullable final List<AuditLog> auditLogs) {
+        this(tagDefinition.getId().toString(),
+             tagDefinition.isControlTag(),
+             tagDefinition.getName(),
+             tagDefinition.getDescription(),
+             ImmutableList.<String>copyOf(Collections2.transform(tagDefinition.getApplicableObjectTypes(), new Function<ObjectType, String>() {
+                 @Override
+                 public String apply(@Nullable final ObjectType input) {
+                     if (input == null) {
+                         return "";
+                     } else {
+                         return input.toString();
+                     }
+                 }
+             })),
+             toAuditLogJson(auditLogs));
     }
 
     public String getId() {
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/JaxRsResourceBase.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/JaxRsResourceBase.java
index 76973e1..f101a9c 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/JaxRsResourceBase.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/JaxRsResourceBase.java
@@ -185,7 +185,7 @@ public abstract class JaxRsResourceBase implements JaxrsResource {
         }
 
         customFieldUserApi.addCustomFields(input, context);
-        return uriBuilder.buildResponse(uriInfo, this.getClass(), "createCustomFields", null);
+        return uriBuilder.buildResponse(uriInfo, this.getClass(), "getCustomFields", id);
     }
 
     /**
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/TagDefinitionResource.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/TagDefinitionResource.java
index 8d29465..61e7349 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/TagDefinitionResource.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/TagDefinitionResource.java
@@ -16,6 +16,7 @@
 
 package com.ning.billing.jaxrs.resources;
 
+import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.UUID;
@@ -23,12 +24,14 @@ import java.util.UUID;
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
 import javax.ws.rs.GET;
 import javax.ws.rs.HeaderParam;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 import javax.ws.rs.core.UriInfo;
@@ -43,6 +46,8 @@ import com.ning.billing.util.api.AuditUserApi;
 import com.ning.billing.util.api.CustomFieldUserApi;
 import com.ning.billing.util.api.TagDefinitionApiException;
 import com.ning.billing.util.api.TagUserApi;
+import com.ning.billing.util.audit.AuditLog;
+import com.ning.billing.util.callcontext.TenantContext;
 import com.ning.billing.util.tag.TagDefinition;
 
 import com.google.common.base.Preconditions;
@@ -68,12 +73,15 @@ public class TagDefinitionResource extends JaxRsResourceBase {
 
     @GET
     @Produces(APPLICATION_JSON)
-    public Response getTagDefinitions(@javax.ws.rs.core.Context final HttpServletRequest request) {
-        final List<TagDefinition> tagDefinitions = tagUserApi.getTagDefinitions(context.createContext(request));
-
-        final List<TagDefinitionJson> result = new LinkedList<TagDefinitionJson>();
-        for (final TagDefinition cur : tagDefinitions) {
-            result.add(new TagDefinitionJson(cur));
+    public Response getTagDefinitions(@javax.ws.rs.core.Context final HttpServletRequest request,
+                                      @QueryParam(QUERY_AUDIT) @DefaultValue("NONE") final AuditMode auditMode) {
+        final TenantContext tenantContext = context.createContext(request);
+        final List<TagDefinition> tagDefinitions = tagUserApi.getTagDefinitions(tenantContext);
+
+        final Collection<TagDefinitionJson> result = new LinkedList<TagDefinitionJson>();
+        for (final TagDefinition tagDefinition : tagDefinitions) {
+            final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(tagDefinition.getId(), ObjectType.TAG_DEFINITION, auditMode.getLevel(), tenantContext);
+            result.add(new TagDefinitionJson(tagDefinition, auditLogs));
         }
 
         return Response.status(Status.OK).entity(result).build();
@@ -83,9 +91,12 @@ public class TagDefinitionResource extends JaxRsResourceBase {
     @Path("/{tagDefinitionId:" + UUID_PATTERN + "}")
     @Produces(APPLICATION_JSON)
     public Response getTagDefinition(@PathParam("tagDefinitionId") final String tagDefId,
+                                     @QueryParam(QUERY_AUDIT) @DefaultValue("NONE") final AuditMode auditMode,
                                      @javax.ws.rs.core.Context final HttpServletRequest request) throws TagDefinitionApiException {
-        final TagDefinition tagDef = tagUserApi.getTagDefinition(UUID.fromString(tagDefId), context.createContext(request));
-        final TagDefinitionJson json = new TagDefinitionJson(tagDef);
+        final TenantContext tenantContext = context.createContext(request);
+        final TagDefinition tagDefinition = tagUserApi.getTagDefinition(UUID.fromString(tagDefId), tenantContext);
+        final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(tagDefinition.getId(), ObjectType.TAG_DEFINITION, auditMode.getLevel(), tenantContext);
+        final TagDefinitionJson json = new TagDefinitionJson(tagDefinition, auditLogs);
         return Response.status(Status.OK).entity(json).build();
     }
 
diff --git a/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestCustomFieldJson.java b/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestCustomFieldJson.java
index 97e9b64..4f2d44f 100644
--- a/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestCustomFieldJson.java
+++ b/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestCustomFieldJson.java
@@ -21,15 +21,22 @@ import java.util.UUID;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
+import com.ning.billing.ObjectType;
 import com.ning.billing.jaxrs.JaxrsTestSuiteNoDB;
 
 public class TestCustomFieldJson extends JaxrsTestSuiteNoDB {
 
     @Test(groups = "fast")
     public void testJson() throws Exception {
+        final String customFieldId = UUID.randomUUID().toString();
+        final String objectId = UUID.randomUUID().toString();
+        final ObjectType objectType = ObjectType.INVOICE;
         final String name = UUID.randomUUID().toString();
         final String value = UUID.randomUUID().toString();
-        final CustomFieldJson customFieldJson = new CustomFieldJson(name, value, null);
+        final CustomFieldJson customFieldJson = new CustomFieldJson(customFieldId, objectId, objectType, name, value, null);
+        Assert.assertEquals(customFieldJson.getCustomFieldId(), customFieldId);
+        Assert.assertEquals(customFieldJson.getObjectId(), objectId);
+        Assert.assertEquals(customFieldJson.getObjectType(), objectType);
         Assert.assertEquals(customFieldJson.getName(), name);
         Assert.assertEquals(customFieldJson.getValue(), value);
         Assert.assertNull(customFieldJson.getAuditLogs());
diff --git a/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestTagDefinitionJson.java b/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestTagDefinitionJson.java
index 21e2cbc..0f937de 100644
--- a/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestTagDefinitionJson.java
+++ b/jaxrs/src/test/java/com/ning/billing/jaxrs/json/TestTagDefinitionJson.java
@@ -34,7 +34,7 @@ public class TestTagDefinitionJson extends JaxrsTestSuiteNoDB {
         final String name = UUID.randomUUID().toString();
         final String description = UUID.randomUUID().toString();
         final ImmutableList<String> applicableObjectTypes = ImmutableList.<String>of(UUID.randomUUID().toString());
-        final TagDefinitionJson tagDefinitionJson = new TagDefinitionJson(id, isControlTag, name, description, applicableObjectTypes);
+        final TagDefinitionJson tagDefinitionJson = new TagDefinitionJson(id, isControlTag, name, description, applicableObjectTypes, null);
         Assert.assertEquals(tagDefinitionJson.getId(), id);
         Assert.assertEquals(tagDefinitionJson.isControlTag(), isControlTag);
         Assert.assertEquals(tagDefinitionJson.getName(), name);

junction/pom.xml 2(+1 -1)

diff --git a/junction/pom.xml b/junction/pom.xml
index 0065f5c..e7bdb78 100644
--- a/junction/pom.xml
+++ b/junction/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-junction</artifactId>

NEWS 5(+4 -1)

diff --git a/NEWS b/NEWS
index c7dbbbe..c67a55e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,10 @@
     Implement bundles pagination and search APIs
     Implement invoices search API
     https://github.com/killbill/killbill/issues/154
-    Update killbill-oss-parent to 0.5.23
+    https://github.com/killbill/killbill/issues/156
+    https://github.com/killbill/killbill/issues/159
+    JAX-RS bugfixes
+    Update killbill-oss-parent to 0.5.24
 
 0.8.11
     [SECURITY] Fix SQL injection in search APIs

osgi/pom.xml 2(+1 -1)

diff --git a/osgi/pom.xml b/osgi/pom.xml
index aeb0ea8..6b1756e 100644
--- a/osgi/pom.xml
+++ b/osgi/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi</artifactId>
diff --git a/osgi-bundles/bundles/jruby/pom.xml b/osgi-bundles/bundles/jruby/pom.xml
index 60094c2..957c91a 100644
--- a/osgi-bundles/bundles/jruby/pom.xml
+++ b/osgi-bundles/bundles/jruby/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>com.ning.billing</groupId>
         <artifactId>killbill-osgi-bundles</artifactId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-jruby</artifactId>
diff --git a/osgi-bundles/bundles/logger/pom.xml b/osgi-bundles/bundles/logger/pom.xml
index cdf2599..441bb1c 100644
--- a/osgi-bundles/bundles/logger/pom.xml
+++ b/osgi-bundles/bundles/logger/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-logger</artifactId>
diff --git a/osgi-bundles/bundles/pom.xml b/osgi-bundles/bundles/pom.xml
index 80bae86..69eeb58 100644
--- a/osgi-bundles/bundles/pom.xml
+++ b/osgi-bundles/bundles/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-all-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles</artifactId>
diff --git a/osgi-bundles/bundles/webconsolebranding/pom.xml b/osgi-bundles/bundles/webconsolebranding/pom.xml
index 72a8cf7..5c47d1d 100644
--- a/osgi-bundles/bundles/webconsolebranding/pom.xml
+++ b/osgi-bundles/bundles/webconsolebranding/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-webconsolebranding</artifactId>
diff --git a/osgi-bundles/defaultbundles/pom.xml b/osgi-bundles/defaultbundles/pom.xml
index 58872d4..31a7fea 100644
--- a/osgi-bundles/defaultbundles/pom.xml
+++ b/osgi-bundles/defaultbundles/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-all-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-defaultbundles</artifactId>
diff --git a/osgi-bundles/libs/killbill/pom.xml b/osgi-bundles/libs/killbill/pom.xml
index 9cfec3d..408f602 100644
--- a/osgi-bundles/libs/killbill/pom.xml
+++ b/osgi-bundles/libs/killbill/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-lib-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-lib-killbill</artifactId>
diff --git a/osgi-bundles/libs/pom.xml b/osgi-bundles/libs/pom.xml
index 14b0ef0..47a59f3 100644
--- a/osgi-bundles/libs/pom.xml
+++ b/osgi-bundles/libs/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-all-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-lib-bundles</artifactId>
diff --git a/osgi-bundles/libs/slf4j-osgi/pom.xml b/osgi-bundles/libs/slf4j-osgi/pom.xml
index 0079622..8b5c791 100644
--- a/osgi-bundles/libs/slf4j-osgi/pom.xml
+++ b/osgi-bundles/libs/slf4j-osgi/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-lib-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-lib-slf4j-osgi</artifactId>
diff --git a/osgi-bundles/pom.xml b/osgi-bundles/pom.xml
index 05d35e7..61e21bc 100644
--- a/osgi-bundles/pom.xml
+++ b/osgi-bundles/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-all-bundles</artifactId>
diff --git a/osgi-bundles/tests/beatrix/pom.xml b/osgi-bundles/tests/beatrix/pom.xml
index fe9cfc0..c3ff140 100644
--- a/osgi-bundles/tests/beatrix/pom.xml
+++ b/osgi-bundles/tests/beatrix/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-test-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-test-beatrix</artifactId>
diff --git a/osgi-bundles/tests/payment/pom.xml b/osgi-bundles/tests/payment/pom.xml
index ae7dd7b..1f7446f 100644
--- a/osgi-bundles/tests/payment/pom.xml
+++ b/osgi-bundles/tests/payment/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-test-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-bundles-test-payment</artifactId>
diff --git a/osgi-bundles/tests/pom.xml b/osgi-bundles/tests/pom.xml
index 78bdb05..76102b9 100644
--- a/osgi-bundles/tests/pom.xml
+++ b/osgi-bundles/tests/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill-osgi-all-bundles</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-osgi-test-bundles</artifactId>

overdue/pom.xml 2(+1 -1)

diff --git a/overdue/pom.xml b/overdue/pom.xml
index 09d35df..ecac0f7 100644
--- a/overdue/pom.xml
+++ b/overdue/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-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 af77090..7921f2f 100644
--- a/payment/pom.xml
+++ b/payment/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-payment</artifactId>
diff --git a/payment/src/main/resources/com/ning/billing/payment/dao/PaymentMethodSqlDao.sql.stg b/payment/src/main/resources/com/ning/billing/payment/dao/PaymentMethodSqlDao.sql.stg
index 1a55de0..1096c6a 100644
--- a/payment/src/main/resources/com/ning/billing/payment/dao/PaymentMethodSqlDao.sql.stg
+++ b/payment/src/main/resources/com/ning/billing/payment/dao/PaymentMethodSqlDao.sql.stg
@@ -42,9 +42,9 @@ where  id = :id
 unmarkPaymentMethodAsDeleted(id) ::= <<
 update <tableName()>
 set is_active = 1
-where  id = :id
 , updated_by = :updatedBy
 , updated_date = :createdDate
+where  id = :id
 <AND_CHECK_TENANT()>
 ;
 >>

pom.xml 4(+2 -2)

diff --git a/pom.xml b/pom.xml
index e5be8a7..12c3157 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,10 +19,10 @@
     <parent>
         <artifactId>killbill-oss-parent</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.5.23</version>
+        <version>0.5.24</version>
     </parent>
     <artifactId>killbill</artifactId>
-    <version>0.8.12-SNAPSHOT</version>
+    <version>0.8.13-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>killbill</name>
     <description>Library for managing recurring subscriptions and the associated billing</description>

server/pom.xml 2(+1 -1)

diff --git a/server/pom.xml b/server/pom.xml
index 53ecc5a..fe1b2c8 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-server</artifactId>
diff --git a/server/src/main/resources/update-checker/killbill-server-update-list.properties b/server/src/main/resources/update-checker/killbill-server-update-list.properties
index 3c963db..b9b7ceb 100644
--- a/server/src/main/resources/update-checker/killbill-server-update-list.properties
+++ b/server/src/main/resources/update-checker/killbill-server-update-list.properties
@@ -1,91 +1,96 @@
 ## Top level keys
 # general.notice = This notice should rarely, if ever, be used as everyone will see it
 
-## 0.8.11 -- latest release
-0.8.11.updates           =
-0.8.11.notices           = This is the latest GA release.
+## 0.8.12 -- latest release
+0.8.12.updates           =
+0.8.12.notices           = This is the latest GA release.
+0.8.12.release-notes     = http://kill-bill.org
+
+## 0.8.11
+0.8.11.updates           = 0.8.12
+0.8.11.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.11.release-notes     = http://kill-bill.org
 
 ## 0.8.10
-0.8.10.updates           = 0.8.11
-0.8.10.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.10.updates           = 0.8.12
+0.8.10.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.10.release-notes     = http://kill-bill.org
 
 ## 0.8.9
-0.8.9.updates           = 0.8.11
-0.8.9.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.9.updates           = 0.8.12
+0.8.9.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.9.release-notes     = http://kill-bill.org
 
 ## 0.8.8
-0.8.8.updates           = 0.8.11
-0.8.8.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.8.updates           = 0.8.12
+0.8.8.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.8.release-notes     = http://kill-bill.org
 
 ## 0.8.7
-0.8.7.updates           = 0.8.11
-0.8.7.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.7.updates           = 0.8.12
+0.8.7.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.7.release-notes     = http://kill-bill.org
 
 ## 0.8.6
-0.8.6.updates           = 0.8.11
-0.8.6.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.6.updates           = 0.8.12
+0.8.6.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.6.release-notes     = http://kill-bill.org
 
 ## 0.8.5
-0.8.5.updates           = 0.8.11
-0.8.5.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.5.updates           = 0.8.12
+0.8.5.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.5.release-notes     = http://kill-bill.org
 
 ## 0.8.4
-0.8.4.updates           = 0.8.11
-0.8.4.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.4.updates           = 0.8.12
+0.8.4.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.4.release-notes     = http://kill-bill.org
 
 ## 0.8.3
-0.8.3.updates           = 0.8.11
-0.8.3.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.3.updates           = 0.8.12
+0.8.3.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.3.release-notes     = http://kill-bill.org
 
 ## 0.8.2
-0.8.2.updates           = 0.8.11
-0.8.2.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.2.updates           = 0.8.12
+0.8.2.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.2.release-notes     = http://kill-bill.org
 
 ## 0.8.1
-0.8.1.updates           = 0.8.11
-0.8.1.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.1.updates           = 0.8.12
+0.8.1.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.1.release-notes     = http://kill-bill.org
 
 ## 0.8.0
-0.8.0.updates           = 0.8.11
-0.8.0.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.8.0.updates           = 0.8.12
+0.8.0.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.8.0.release-notes     = http://kill-bill.org
 
 ### 0.7.x series ###
 
 ## 0.7.2
 0.7.2.updates           =
-0.7.2.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.7.2.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.7.2.release-notes     = http://kill-bill.org
 
 ## 0.7.1
 0.7.1.updates           = 0.7.2
-0.7.1.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.7.1.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.7.1.release-notes     = http://kill-bill.org
 
 ## 0.7.0
 0.7.0.updates           = 0.7.2
-0.7.0.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.7.0.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.7.0.release-notes     = http://kill-bill.org
 
 ### 0.6.x series ###
 
 ## 0.6.17
 0.6.17.updates           =
-0.6.17.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.6.17.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.6.17.release-notes     = http://kill-bill.org
 
 ## 0.6.16
 0.6.16.updates           = 0.6.17
-0.6.16.notices           = We recommend upgrading to 0.8.11, our latest GA release.
+0.6.16.notices           = We recommend upgrading to 0.8.12, our latest GA release.
 0.6.16.release-notes     = http://kill-bill.org
diff --git a/server/src/test/java/com/ning/billing/jaxrs/TestAccount.java b/server/src/test/java/com/ning/billing/jaxrs/TestAccount.java
index 6b08e3b..86e3346 100644
--- a/server/src/test/java/com/ning/billing/jaxrs/TestAccount.java
+++ b/server/src/test/java/com/ning/billing/jaxrs/TestAccount.java
@@ -27,6 +27,7 @@ import javax.annotation.Nullable;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
+import com.ning.billing.ObjectType;
 import com.ning.billing.client.KillBillClientException;
 import com.ning.billing.client.model.Account;
 import com.ning.billing.client.model.Accounts;
@@ -225,9 +226,9 @@ public class TestAccount extends TestJaxrsBase {
         assertNotNull(accountJson);
 
         final Collection<CustomField> customFields = new LinkedList<CustomField>();
-        customFields.add(new CustomField("1", "value1", null));
-        customFields.add(new CustomField("2", "value2", null));
-        customFields.add(new CustomField("3", "value3", null));
+        customFields.add(new CustomField(null, accountJson.getAccountId(), ObjectType.ACCOUNT, "1", "value1", null));
+        customFields.add(new CustomField(null, accountJson.getAccountId(), ObjectType.ACCOUNT, "2", "value2", null));
+        customFields.add(new CustomField(null, accountJson.getAccountId(), ObjectType.ACCOUNT, "3", "value3", null));
 
         killBillClient.createAccountCustomFields(accountJson.getAccountId(), customFields, createdBy, reason, comment);
 
diff --git a/subscription/pom.xml b/subscription/pom.xml
index bd9d7ae..0b9adfa 100644
--- a/subscription/pom.xml
+++ b/subscription/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-subscription</artifactId>

tenant/pom.xml 2(+1 -1)

diff --git a/tenant/pom.xml b/tenant/pom.xml
index 78f9795..cb6b190 100644
--- a/tenant/pom.xml
+++ b/tenant/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-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 39ba106..127c132 100644
--- a/usage/pom.xml
+++ b/usage/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-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 8156ad3..7409b9a 100644
--- a/util/pom.xml
+++ b/util/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <artifactId>killbill</artifactId>
         <groupId>com.ning.billing</groupId>
-        <version>0.8.12-SNAPSHOT</version>
+        <version>0.8.13-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>killbill-util</artifactId>