From b81ba38a54baed6be9daaf3cc7a2ccfde0d9aa6b Mon Sep 17 00:00:00 2001 From: saflukeahmed Date: Thu, 6 Aug 2026 22:15:12 +0100 Subject: [PATCH] DEV-374-Add subscription type for twitter user get request --- .../com/twitter/clientlib/model/User.java | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/twitter/clientlib/model/User.java b/src/main/java/com/twitter/clientlib/model/User.java index 5dc06f7..52a2f96 100644 --- a/src/main/java/com/twitter/clientlib/model/User.java +++ b/src/main/java/com/twitter/clientlib/model/User.java @@ -116,6 +116,10 @@ public class User { @SerializedName(SERIALIZED_NAME_VERIFIED) private Boolean verified; + public static final String SERIALIZED_NAME_SUBSCRIPTION_TYPE = "subscription_type"; + @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_TYPE) + private String subscriptionType; + public static final String SERIALIZED_NAME_WITHHELD = "withheld"; @SerializedName(SERIALIZED_NAME_WITHHELD) private UserWithheld withheld; @@ -422,6 +426,29 @@ public void setVerified(Boolean verified) { } + public User subscriptionType(String subscriptionType) { + + this.subscriptionType = subscriptionType; + return this; + } + + /** + * The X subscription type for this User, if available. + * @return subscriptionType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The X subscription type for this User, if available.") + + public String getSubscriptionType() { + return subscriptionType; + } + + + public void setSubscriptionType(String subscriptionType) { + this.subscriptionType = subscriptionType; + } + + public User withheld(UserWithheld withheld) { this.withheld = withheld; @@ -468,12 +495,13 @@ public boolean equals(Object o) { Objects.equals(this.url, user.url) && Objects.equals(this.username, user.username) && Objects.equals(this.verified, user.verified) && + Objects.equals(this.subscriptionType, user.subscriptionType) && Objects.equals(this.withheld, user.withheld); } @Override public int hashCode() { - return Objects.hash(createdAt, description, entities, id, location, name, pinnedTweetId, profileImageUrl, _protected, publicMetrics, url, username, verified, withheld); + return Objects.hash(createdAt, description, entities, id, location, name, pinnedTweetId, profileImageUrl, _protected, publicMetrics, url, username, verified, subscriptionType, withheld); } @Override @@ -493,6 +521,7 @@ public String toString() { sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); + sb.append(" subscriptionType: ").append(toIndentedString(subscriptionType)).append("\n"); sb.append(" withheld: ").append(toIndentedString(withheld)).append("\n"); sb.append("}"); return sb.toString(); @@ -529,6 +558,7 @@ private String toIndentedString(Object o) { openapiFields.add("url"); openapiFields.add("username"); openapiFields.add("verified"); + openapiFields.add("subscription_type"); openapiFields.add("withheld"); // a set of required properties/fields (JSON key names)