diff --git a/src/main/java/com/ning/billing/recurly/RecurlyClient.java b/src/main/java/com/ning/billing/recurly/RecurlyClient.java index 59785456..7f1cb402 100644 --- a/src/main/java/com/ning/billing/recurly/RecurlyClient.java +++ b/src/main/java/com/ning/billing/recurly/RecurlyClient.java @@ -1221,6 +1221,19 @@ public ExternalSubscription getExternalSubscription(final String externalSubscri public ExternalSubscription getExternalSubscriptionByExternalId(final String externalSubscriptionExternalId) { return doGET(ExternalSubscriptions.EXTERNAL_SUBSCRIPTIONS_RESOURCE + "/" + urlEncode("external-id-"+externalSubscriptionExternalId), ExternalSubscription.class); } + + /** + * Get a specific External Subscription by uuid + *
+ * Returns the requested external subscriptions + * + * @param externalSubscriptionUuid external subscription uuid + * @return The requested external subscription + */ + public ExternalSubscription getExternalSubscriptionByUuid(final String externalSubscriptionUuid) { + return doGET(ExternalSubscriptions.EXTERNAL_SUBSCRIPTIONS_RESOURCE + "/" + urlEncode("uuid-"+externalSubscriptionUuid), ExternalSubscription.class); + } + /** * Get External Accounts of an account *
diff --git a/src/main/java/com/ning/billing/recurly/model/ExternalSubscription.java b/src/main/java/com/ning/billing/recurly/model/ExternalSubscription.java
index 30f92296..01ba9f5c 100644
--- a/src/main/java/com/ning/billing/recurly/model/ExternalSubscription.java
+++ b/src/main/java/com/ning/billing/recurly/model/ExternalSubscription.java
@@ -58,6 +58,9 @@ public class ExternalSubscription extends RecurlyObject {
@XmlElement(name = "app_identifier")
private String appIdentifier;
+ @XmlElement(name = "uuid")
+ private String uuid;
+
@XmlElement(name = "quantity")
private Integer quantity;
@@ -168,6 +171,14 @@ public void setAppIdentifier(final Object appIdentifier) {
this.appIdentifier = stringOrNull(appIdentifier);
}
+ public String getUuid() {
+ return this.uuid;
+ }
+
+ public void setUuid(final Object uuid) {
+ this.uuid = stringOrNull(uuid);
+ }
+
public Integer getQuantity() {
return quantity;
}
diff --git a/src/test/java/com/ning/billing/recurly/model/TestExternalSubscription.java b/src/test/java/com/ning/billing/recurly/model/TestExternalSubscription.java
index 9a50f09b..e37b9dee 100644
--- a/src/test/java/com/ning/billing/recurly/model/TestExternalSubscription.java
+++ b/src/test/java/com/ning/billing/recurly/model/TestExternalSubscription.java
@@ -30,6 +30,8 @@ public void testDeserialization() throws Exception {
"