diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/json/PaymentMethodJson.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/json/PaymentMethodJson.java
index 7e0c04b..6a6d997 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/json/PaymentMethodJson.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/json/PaymentMethodJson.java
@@ -187,15 +187,6 @@ public class PaymentMethodJson extends JsonBase {
return externalKey;
}
- @JsonIgnore
- public boolean isEmpty() {
- return (externalKey == null &&
- paymentMethodId == null &&
- accountId == null &&
- isDefault == null &&
- pluginName == null &&
- pluginInfo == null);
- }
@Override
public String toString() {
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/ComboPaymentResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/ComboPaymentResource.java
index 2bb01e2..1dc5bdf 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/ComboPaymentResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/ComboPaymentResource.java
@@ -81,8 +81,8 @@ public abstract class ComboPaymentResource extends JaxRsResourceBase {
protected UUID getOrCreatePaymentMethod(final Account account, @Nullable final PaymentMethodJson paymentMethodJson, final Iterable<PluginProperty> pluginProperties, final CallContext callContext) throws PaymentApiException {
- // No info about payment method was passed, we default to null payment Method ID (which is allowed to be overiden in payment control plugins)
- if (paymentMethodJson == null || paymentMethodJson.isEmpty()) {
+ // No info about payment method was passed, we default to null payment Method ID (which is allowed to be overridden in payment control plugins)
+ if (paymentMethodJson == null || paymentMethodJson.getPluginName() == null) {
return null;
}