From 63398e11b207fbf567437e6082a32b58ff9e9994 Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:15:33 +0530 Subject: [PATCH 1/8] feat(models): add IPO and payout model classes for ipos-smartlist-payout sync Co-Authored-By: Claude Opus 4.8 (1M context) --- .../com/upstox/api/InitiatePayoutRequest.java | 115 +++ .../java/com/upstox/api/IpoDetailsData.java | 669 ++++++++++++++++++ .../com/upstox/api/IpoDetailsResponse.java | 116 +++ .../java/com/upstox/api/IpoListingData.java | 368 ++++++++++ .../com/upstox/api/IpoListingResponse.java | 139 ++++ src/main/java/com/upstox/api/IpoMetaData.java | 93 +++ .../java/com/upstox/api/IpoRegistrarInfo.java | 207 ++++++ src/main/java/com/upstox/api/IpoTimeline.java | 253 +++++++ .../com/upstox/api/ModifyPayoutRequest.java | 92 +++ .../java/com/upstox/api/PayoutDetails.java | 299 ++++++++ .../com/upstox/api/PayoutDetailsResponse.java | 116 +++ .../java/com/upstox/api/PayoutModesData.java | 62 ++ .../com/upstox/api/PayoutModesResponse.java | 116 +++ 13 files changed, 2645 insertions(+) create mode 100644 src/main/java/com/upstox/api/InitiatePayoutRequest.java create mode 100644 src/main/java/com/upstox/api/IpoDetailsData.java create mode 100644 src/main/java/com/upstox/api/IpoDetailsResponse.java create mode 100644 src/main/java/com/upstox/api/IpoListingData.java create mode 100644 src/main/java/com/upstox/api/IpoListingResponse.java create mode 100644 src/main/java/com/upstox/api/IpoMetaData.java create mode 100644 src/main/java/com/upstox/api/IpoRegistrarInfo.java create mode 100644 src/main/java/com/upstox/api/IpoTimeline.java create mode 100644 src/main/java/com/upstox/api/ModifyPayoutRequest.java create mode 100644 src/main/java/com/upstox/api/PayoutDetails.java create mode 100644 src/main/java/com/upstox/api/PayoutDetailsResponse.java create mode 100644 src/main/java/com/upstox/api/PayoutModesData.java create mode 100644 src/main/java/com/upstox/api/PayoutModesResponse.java diff --git a/src/main/java/com/upstox/api/InitiatePayoutRequest.java b/src/main/java/com/upstox/api/InitiatePayoutRequest.java new file mode 100644 index 0000000..58c2af8 --- /dev/null +++ b/src/main/java/com/upstox/api/InitiatePayoutRequest.java @@ -0,0 +1,115 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * InitiatePayoutRequest + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class InitiatePayoutRequest { + @SerializedName("mode") + private Object mode = null; + + @SerializedName("amount") + private Object amount = null; + + public InitiatePayoutRequest mode(Object mode) { + this.mode = mode; + return this; + } + + /** + * Withdrawal mode. NEFT or IMPS + * @return mode + **/ + @Schema(example = "NEFT", required = true, description = "Withdrawal mode. NEFT or IMPS") + public Object getMode() { + return mode; + } + + public void setMode(Object mode) { + this.mode = mode; + } + + public InitiatePayoutRequest amount(Object amount) { + this.amount = amount; + return this; + } + + /** + * Withdrawal amount in INR + * @return amount + **/ + @Schema(example = "5000.0", required = true, description = "Withdrawal amount in INR") + public Object getAmount() { + return amount; + } + + public void setAmount(Object amount) { + this.amount = amount; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InitiatePayoutRequest initiatePayoutRequest = (InitiatePayoutRequest) o; + return Objects.equals(this.mode, initiatePayoutRequest.mode) && + Objects.equals(this.amount, initiatePayoutRequest.amount); + } + + @Override + public int hashCode() { + return Objects.hash(mode, amount); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InitiatePayoutRequest {\n"); + + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/IpoDetailsData.java b/src/main/java/com/upstox/api/IpoDetailsData.java new file mode 100644 index 0000000..621d623 --- /dev/null +++ b/src/main/java/com/upstox/api/IpoDetailsData.java @@ -0,0 +1,669 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.upstox.api.IpoRegistrarInfo; +import com.upstox.api.IpoTimeline; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * IpoDetailsData + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class IpoDetailsData { + @SerializedName("id") + private Object id = null; + + @SerializedName("symbol") + private Object symbol = null; + + @SerializedName("name") + private Object name = null; + + @SerializedName("status") + private Object status = null; + + @SerializedName("isin") + private Object isin = null; + + @SerializedName("issue_type") + private Object issueType = null; + + @SerializedName("issue_size") + private Object issueSize = null; + + @SerializedName("industry") + private Object industry = null; + + @SerializedName("minimum_price") + private Object minimumPrice = null; + + @SerializedName("maximum_price") + private Object maximumPrice = null; + + @SerializedName("bidding_start_date") + private Object biddingStartDate = null; + + @SerializedName("bidding_end_date") + private Object biddingEndDate = null; + + @SerializedName("daily_start_time") + private Object dailyStartTime = null; + + @SerializedName("daily_end_time") + private Object dailyEndTime = null; + + @SerializedName("face_value") + private Object faceValue = null; + + @SerializedName("tick_size") + private Object tickSize = null; + + @SerializedName("lot_size") + private Object lotSize = null; + + @SerializedName("minimum_quantity") + private Object minimumQuantity = null; + + @SerializedName("cut_off_price") + private Object cutOffPrice = null; + + @SerializedName("listing_price") + private Object listingPrice = null; + + @SerializedName("listing_exchange") + private Object listingExchange = null; + + @SerializedName("rhp_url") + private Object rhpUrl = null; + + @SerializedName("drhp_url") + private Object drhpUrl = null; + + @SerializedName("timeline") + private IpoTimeline timeline = null; + + @SerializedName("registrar_info") + private IpoRegistrarInfo registrarInfo = null; + + @SerializedName("total_subscription") + private Object totalSubscription = null; + + public IpoDetailsData id(Object id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Schema(description = "") + public Object getId() { + return id; + } + + public void setId(Object id) { + this.id = id; + } + + public IpoDetailsData symbol(Object symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * @return symbol + **/ + @Schema(description = "") + public Object getSymbol() { + return symbol; + } + + public void setSymbol(Object symbol) { + this.symbol = symbol; + } + + public IpoDetailsData name(Object name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @Schema(description = "") + public Object getName() { + return name; + } + + public void setName(Object name) { + this.name = name; + } + + public IpoDetailsData status(Object status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + public Object getStatus() { + return status; + } + + public void setStatus(Object status) { + this.status = status; + } + + public IpoDetailsData isin(Object isin) { + this.isin = isin; + return this; + } + + /** + * Get isin + * @return isin + **/ + @Schema(description = "") + public Object getIsin() { + return isin; + } + + public void setIsin(Object isin) { + this.isin = isin; + } + + public IpoDetailsData issueType(Object issueType) { + this.issueType = issueType; + return this; + } + + /** + * Get issueType + * @return issueType + **/ + @Schema(description = "") + public Object getIssueType() { + return issueType; + } + + public void setIssueType(Object issueType) { + this.issueType = issueType; + } + + public IpoDetailsData issueSize(Object issueSize) { + this.issueSize = issueSize; + return this; + } + + /** + * Get issueSize + * @return issueSize + **/ + @Schema(description = "") + public Object getIssueSize() { + return issueSize; + } + + public void setIssueSize(Object issueSize) { + this.issueSize = issueSize; + } + + public IpoDetailsData industry(Object industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @Schema(description = "") + public Object getIndustry() { + return industry; + } + + public void setIndustry(Object industry) { + this.industry = industry; + } + + public IpoDetailsData minimumPrice(Object minimumPrice) { + this.minimumPrice = minimumPrice; + return this; + } + + /** + * Get minimumPrice + * @return minimumPrice + **/ + @Schema(description = "") + public Object getMinimumPrice() { + return minimumPrice; + } + + public void setMinimumPrice(Object minimumPrice) { + this.minimumPrice = minimumPrice; + } + + public IpoDetailsData maximumPrice(Object maximumPrice) { + this.maximumPrice = maximumPrice; + return this; + } + + /** + * Get maximumPrice + * @return maximumPrice + **/ + @Schema(description = "") + public Object getMaximumPrice() { + return maximumPrice; + } + + public void setMaximumPrice(Object maximumPrice) { + this.maximumPrice = maximumPrice; + } + + public IpoDetailsData biddingStartDate(Object biddingStartDate) { + this.biddingStartDate = biddingStartDate; + return this; + } + + /** + * Get biddingStartDate + * @return biddingStartDate + **/ + @Schema(description = "") + public Object getBiddingStartDate() { + return biddingStartDate; + } + + public void setBiddingStartDate(Object biddingStartDate) { + this.biddingStartDate = biddingStartDate; + } + + public IpoDetailsData biddingEndDate(Object biddingEndDate) { + this.biddingEndDate = biddingEndDate; + return this; + } + + /** + * Get biddingEndDate + * @return biddingEndDate + **/ + @Schema(description = "") + public Object getBiddingEndDate() { + return biddingEndDate; + } + + public void setBiddingEndDate(Object biddingEndDate) { + this.biddingEndDate = biddingEndDate; + } + + public IpoDetailsData dailyStartTime(Object dailyStartTime) { + this.dailyStartTime = dailyStartTime; + return this; + } + + /** + * Get dailyStartTime + * @return dailyStartTime + **/ + @Schema(description = "") + public Object getDailyStartTime() { + return dailyStartTime; + } + + public void setDailyStartTime(Object dailyStartTime) { + this.dailyStartTime = dailyStartTime; + } + + public IpoDetailsData dailyEndTime(Object dailyEndTime) { + this.dailyEndTime = dailyEndTime; + return this; + } + + /** + * Get dailyEndTime + * @return dailyEndTime + **/ + @Schema(description = "") + public Object getDailyEndTime() { + return dailyEndTime; + } + + public void setDailyEndTime(Object dailyEndTime) { + this.dailyEndTime = dailyEndTime; + } + + public IpoDetailsData faceValue(Object faceValue) { + this.faceValue = faceValue; + return this; + } + + /** + * Get faceValue + * @return faceValue + **/ + @Schema(description = "") + public Object getFaceValue() { + return faceValue; + } + + public void setFaceValue(Object faceValue) { + this.faceValue = faceValue; + } + + public IpoDetailsData tickSize(Object tickSize) { + this.tickSize = tickSize; + return this; + } + + /** + * Get tickSize + * @return tickSize + **/ + @Schema(description = "") + public Object getTickSize() { + return tickSize; + } + + public void setTickSize(Object tickSize) { + this.tickSize = tickSize; + } + + public IpoDetailsData lotSize(Object lotSize) { + this.lotSize = lotSize; + return this; + } + + /** + * Get lotSize + * @return lotSize + **/ + @Schema(description = "") + public Object getLotSize() { + return lotSize; + } + + public void setLotSize(Object lotSize) { + this.lotSize = lotSize; + } + + public IpoDetailsData minimumQuantity(Object minimumQuantity) { + this.minimumQuantity = minimumQuantity; + return this; + } + + /** + * Get minimumQuantity + * @return minimumQuantity + **/ + @Schema(description = "") + public Object getMinimumQuantity() { + return minimumQuantity; + } + + public void setMinimumQuantity(Object minimumQuantity) { + this.minimumQuantity = minimumQuantity; + } + + public IpoDetailsData cutOffPrice(Object cutOffPrice) { + this.cutOffPrice = cutOffPrice; + return this; + } + + /** + * Get cutOffPrice + * @return cutOffPrice + **/ + @Schema(description = "") + public Object getCutOffPrice() { + return cutOffPrice; + } + + public void setCutOffPrice(Object cutOffPrice) { + this.cutOffPrice = cutOffPrice; + } + + public IpoDetailsData listingPrice(Object listingPrice) { + this.listingPrice = listingPrice; + return this; + } + + /** + * Get listingPrice + * @return listingPrice + **/ + @Schema(description = "") + public Object getListingPrice() { + return listingPrice; + } + + public void setListingPrice(Object listingPrice) { + this.listingPrice = listingPrice; + } + + public IpoDetailsData listingExchange(Object listingExchange) { + this.listingExchange = listingExchange; + return this; + } + + /** + * Get listingExchange + * @return listingExchange + **/ + @Schema(description = "") + public Object getListingExchange() { + return listingExchange; + } + + public void setListingExchange(Object listingExchange) { + this.listingExchange = listingExchange; + } + + public IpoDetailsData rhpUrl(Object rhpUrl) { + this.rhpUrl = rhpUrl; + return this; + } + + /** + * Get rhpUrl + * @return rhpUrl + **/ + @Schema(description = "") + public Object getRhpUrl() { + return rhpUrl; + } + + public void setRhpUrl(Object rhpUrl) { + this.rhpUrl = rhpUrl; + } + + public IpoDetailsData drhpUrl(Object drhpUrl) { + this.drhpUrl = drhpUrl; + return this; + } + + /** + * Get drhpUrl + * @return drhpUrl + **/ + @Schema(description = "") + public Object getDrhpUrl() { + return drhpUrl; + } + + public void setDrhpUrl(Object drhpUrl) { + this.drhpUrl = drhpUrl; + } + + public IpoDetailsData timeline(IpoTimeline timeline) { + this.timeline = timeline; + return this; + } + + /** + * Get timeline + * @return timeline + **/ + @Schema(description = "") + public IpoTimeline getTimeline() { + return timeline; + } + + public void setTimeline(IpoTimeline timeline) { + this.timeline = timeline; + } + + public IpoDetailsData registrarInfo(IpoRegistrarInfo registrarInfo) { + this.registrarInfo = registrarInfo; + return this; + } + + /** + * Get registrarInfo + * @return registrarInfo + **/ + @Schema(description = "") + public IpoRegistrarInfo getRegistrarInfo() { + return registrarInfo; + } + + public void setRegistrarInfo(IpoRegistrarInfo registrarInfo) { + this.registrarInfo = registrarInfo; + } + + public IpoDetailsData totalSubscription(Object totalSubscription) { + this.totalSubscription = totalSubscription; + return this; + } + + /** + * Get totalSubscription + * @return totalSubscription + **/ + @Schema(description = "") + public Object getTotalSubscription() { + return totalSubscription; + } + + public void setTotalSubscription(Object totalSubscription) { + this.totalSubscription = totalSubscription; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpoDetailsData ipoDetailsData = (IpoDetailsData) o; + return Objects.equals(this.id, ipoDetailsData.id) && + Objects.equals(this.symbol, ipoDetailsData.symbol) && + Objects.equals(this.name, ipoDetailsData.name) && + Objects.equals(this.status, ipoDetailsData.status) && + Objects.equals(this.isin, ipoDetailsData.isin) && + Objects.equals(this.issueType, ipoDetailsData.issueType) && + Objects.equals(this.issueSize, ipoDetailsData.issueSize) && + Objects.equals(this.industry, ipoDetailsData.industry) && + Objects.equals(this.minimumPrice, ipoDetailsData.minimumPrice) && + Objects.equals(this.maximumPrice, ipoDetailsData.maximumPrice) && + Objects.equals(this.biddingStartDate, ipoDetailsData.biddingStartDate) && + Objects.equals(this.biddingEndDate, ipoDetailsData.biddingEndDate) && + Objects.equals(this.dailyStartTime, ipoDetailsData.dailyStartTime) && + Objects.equals(this.dailyEndTime, ipoDetailsData.dailyEndTime) && + Objects.equals(this.faceValue, ipoDetailsData.faceValue) && + Objects.equals(this.tickSize, ipoDetailsData.tickSize) && + Objects.equals(this.lotSize, ipoDetailsData.lotSize) && + Objects.equals(this.minimumQuantity, ipoDetailsData.minimumQuantity) && + Objects.equals(this.cutOffPrice, ipoDetailsData.cutOffPrice) && + Objects.equals(this.listingPrice, ipoDetailsData.listingPrice) && + Objects.equals(this.listingExchange, ipoDetailsData.listingExchange) && + Objects.equals(this.rhpUrl, ipoDetailsData.rhpUrl) && + Objects.equals(this.drhpUrl, ipoDetailsData.drhpUrl) && + Objects.equals(this.timeline, ipoDetailsData.timeline) && + Objects.equals(this.registrarInfo, ipoDetailsData.registrarInfo) && + Objects.equals(this.totalSubscription, ipoDetailsData.totalSubscription); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol, name, status, isin, issueType, issueSize, industry, minimumPrice, maximumPrice, biddingStartDate, biddingEndDate, dailyStartTime, dailyEndTime, faceValue, tickSize, lotSize, minimumQuantity, cutOffPrice, listingPrice, listingExchange, rhpUrl, drhpUrl, timeline, registrarInfo, totalSubscription); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpoDetailsData {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isin: ").append(toIndentedString(isin)).append("\n"); + sb.append(" issueType: ").append(toIndentedString(issueType)).append("\n"); + sb.append(" issueSize: ").append(toIndentedString(issueSize)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" minimumPrice: ").append(toIndentedString(minimumPrice)).append("\n"); + sb.append(" maximumPrice: ").append(toIndentedString(maximumPrice)).append("\n"); + sb.append(" biddingStartDate: ").append(toIndentedString(biddingStartDate)).append("\n"); + sb.append(" biddingEndDate: ").append(toIndentedString(biddingEndDate)).append("\n"); + sb.append(" dailyStartTime: ").append(toIndentedString(dailyStartTime)).append("\n"); + sb.append(" dailyEndTime: ").append(toIndentedString(dailyEndTime)).append("\n"); + sb.append(" faceValue: ").append(toIndentedString(faceValue)).append("\n"); + sb.append(" tickSize: ").append(toIndentedString(tickSize)).append("\n"); + sb.append(" lotSize: ").append(toIndentedString(lotSize)).append("\n"); + sb.append(" minimumQuantity: ").append(toIndentedString(minimumQuantity)).append("\n"); + sb.append(" cutOffPrice: ").append(toIndentedString(cutOffPrice)).append("\n"); + sb.append(" listingPrice: ").append(toIndentedString(listingPrice)).append("\n"); + sb.append(" listingExchange: ").append(toIndentedString(listingExchange)).append("\n"); + sb.append(" rhpUrl: ").append(toIndentedString(rhpUrl)).append("\n"); + sb.append(" drhpUrl: ").append(toIndentedString(drhpUrl)).append("\n"); + sb.append(" timeline: ").append(toIndentedString(timeline)).append("\n"); + sb.append(" registrarInfo: ").append(toIndentedString(registrarInfo)).append("\n"); + sb.append(" totalSubscription: ").append(toIndentedString(totalSubscription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/IpoDetailsResponse.java b/src/main/java/com/upstox/api/IpoDetailsResponse.java new file mode 100644 index 0000000..3cbda5d --- /dev/null +++ b/src/main/java/com/upstox/api/IpoDetailsResponse.java @@ -0,0 +1,116 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.upstox.api.IpoDetailsData; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * IpoDetailsResponse + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class IpoDetailsResponse { + @SerializedName("status") + private Object status = null; + + @SerializedName("data") + private IpoDetailsData data = null; + + public IpoDetailsResponse status(Object status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + public Object getStatus() { + return status; + } + + public void setStatus(Object status) { + this.status = status; + } + + public IpoDetailsResponse data(IpoDetailsData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @Schema(description = "") + public IpoDetailsData getData() { + return data; + } + + public void setData(IpoDetailsData data) { + this.data = data; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpoDetailsResponse ipoDetailsResponse = (IpoDetailsResponse) o; + return Objects.equals(this.status, ipoDetailsResponse.status) && + Objects.equals(this.data, ipoDetailsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(status, data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpoDetailsResponse {\n"); + + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/IpoListingData.java b/src/main/java/com/upstox/api/IpoListingData.java new file mode 100644 index 0000000..e84203f --- /dev/null +++ b/src/main/java/com/upstox/api/IpoListingData.java @@ -0,0 +1,368 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * IpoListingData + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class IpoListingData { + @SerializedName("id") + private Object id = null; + + @SerializedName("symbol") + private Object symbol = null; + + @SerializedName("name") + private Object name = null; + + @SerializedName("status") + private Object status = null; + + @SerializedName("isin") + private Object isin = null; + + @SerializedName("issue_type") + private Object issueType = null; + + @SerializedName("issue_size") + private Object issueSize = null; + + @SerializedName("industry") + private Object industry = null; + + @SerializedName("minimum_price") + private Object minimumPrice = null; + + @SerializedName("maximum_price") + private Object maximumPrice = null; + + @SerializedName("bidding_start_date") + private Object biddingStartDate = null; + + @SerializedName("bidding_end_date") + private Object biddingEndDate = null; + + @SerializedName("total_subscription") + private Object totalSubscription = null; + + public IpoListingData id(Object id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Schema(description = "") + public Object getId() { + return id; + } + + public void setId(Object id) { + this.id = id; + } + + public IpoListingData symbol(Object symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * @return symbol + **/ + @Schema(description = "") + public Object getSymbol() { + return symbol; + } + + public void setSymbol(Object symbol) { + this.symbol = symbol; + } + + public IpoListingData name(Object name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @Schema(description = "") + public Object getName() { + return name; + } + + public void setName(Object name) { + this.name = name; + } + + public IpoListingData status(Object status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + public Object getStatus() { + return status; + } + + public void setStatus(Object status) { + this.status = status; + } + + public IpoListingData isin(Object isin) { + this.isin = isin; + return this; + } + + /** + * Get isin + * @return isin + **/ + @Schema(description = "") + public Object getIsin() { + return isin; + } + + public void setIsin(Object isin) { + this.isin = isin; + } + + public IpoListingData issueType(Object issueType) { + this.issueType = issueType; + return this; + } + + /** + * Get issueType + * @return issueType + **/ + @Schema(description = "") + public Object getIssueType() { + return issueType; + } + + public void setIssueType(Object issueType) { + this.issueType = issueType; + } + + public IpoListingData issueSize(Object issueSize) { + this.issueSize = issueSize; + return this; + } + + /** + * Get issueSize + * @return issueSize + **/ + @Schema(description = "") + public Object getIssueSize() { + return issueSize; + } + + public void setIssueSize(Object issueSize) { + this.issueSize = issueSize; + } + + public IpoListingData industry(Object industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @Schema(description = "") + public Object getIndustry() { + return industry; + } + + public void setIndustry(Object industry) { + this.industry = industry; + } + + public IpoListingData minimumPrice(Object minimumPrice) { + this.minimumPrice = minimumPrice; + return this; + } + + /** + * Get minimumPrice + * @return minimumPrice + **/ + @Schema(description = "") + public Object getMinimumPrice() { + return minimumPrice; + } + + public void setMinimumPrice(Object minimumPrice) { + this.minimumPrice = minimumPrice; + } + + public IpoListingData maximumPrice(Object maximumPrice) { + this.maximumPrice = maximumPrice; + return this; + } + + /** + * Get maximumPrice + * @return maximumPrice + **/ + @Schema(description = "") + public Object getMaximumPrice() { + return maximumPrice; + } + + public void setMaximumPrice(Object maximumPrice) { + this.maximumPrice = maximumPrice; + } + + public IpoListingData biddingStartDate(Object biddingStartDate) { + this.biddingStartDate = biddingStartDate; + return this; + } + + /** + * Get biddingStartDate + * @return biddingStartDate + **/ + @Schema(description = "") + public Object getBiddingStartDate() { + return biddingStartDate; + } + + public void setBiddingStartDate(Object biddingStartDate) { + this.biddingStartDate = biddingStartDate; + } + + public IpoListingData biddingEndDate(Object biddingEndDate) { + this.biddingEndDate = biddingEndDate; + return this; + } + + /** + * Get biddingEndDate + * @return biddingEndDate + **/ + @Schema(description = "") + public Object getBiddingEndDate() { + return biddingEndDate; + } + + public void setBiddingEndDate(Object biddingEndDate) { + this.biddingEndDate = biddingEndDate; + } + + public IpoListingData totalSubscription(Object totalSubscription) { + this.totalSubscription = totalSubscription; + return this; + } + + /** + * Get totalSubscription + * @return totalSubscription + **/ + @Schema(description = "") + public Object getTotalSubscription() { + return totalSubscription; + } + + public void setTotalSubscription(Object totalSubscription) { + this.totalSubscription = totalSubscription; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpoListingData ipoListingData = (IpoListingData) o; + return Objects.equals(this.id, ipoListingData.id) && + Objects.equals(this.symbol, ipoListingData.symbol) && + Objects.equals(this.name, ipoListingData.name) && + Objects.equals(this.status, ipoListingData.status) && + Objects.equals(this.isin, ipoListingData.isin) && + Objects.equals(this.issueType, ipoListingData.issueType) && + Objects.equals(this.issueSize, ipoListingData.issueSize) && + Objects.equals(this.industry, ipoListingData.industry) && + Objects.equals(this.minimumPrice, ipoListingData.minimumPrice) && + Objects.equals(this.maximumPrice, ipoListingData.maximumPrice) && + Objects.equals(this.biddingStartDate, ipoListingData.biddingStartDate) && + Objects.equals(this.biddingEndDate, ipoListingData.biddingEndDate) && + Objects.equals(this.totalSubscription, ipoListingData.totalSubscription); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol, name, status, isin, issueType, issueSize, industry, minimumPrice, maximumPrice, biddingStartDate, biddingEndDate, totalSubscription); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpoListingData {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isin: ").append(toIndentedString(isin)).append("\n"); + sb.append(" issueType: ").append(toIndentedString(issueType)).append("\n"); + sb.append(" issueSize: ").append(toIndentedString(issueSize)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" minimumPrice: ").append(toIndentedString(minimumPrice)).append("\n"); + sb.append(" maximumPrice: ").append(toIndentedString(maximumPrice)).append("\n"); + sb.append(" biddingStartDate: ").append(toIndentedString(biddingStartDate)).append("\n"); + sb.append(" biddingEndDate: ").append(toIndentedString(biddingEndDate)).append("\n"); + sb.append(" totalSubscription: ").append(toIndentedString(totalSubscription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/IpoListingResponse.java b/src/main/java/com/upstox/api/IpoListingResponse.java new file mode 100644 index 0000000..9b64608 --- /dev/null +++ b/src/main/java/com/upstox/api/IpoListingResponse.java @@ -0,0 +1,139 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.upstox.api.IpoMetaData; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * IpoListingResponse + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class IpoListingResponse { + @SerializedName("status") + private Object status = null; + + @SerializedName("data") + private Object data = null; + + @SerializedName("meta_data") + private IpoMetaData metaData = null; + + public IpoListingResponse status(Object status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + public Object getStatus() { + return status; + } + + public void setStatus(Object status) { + this.status = status; + } + + public IpoListingResponse data(Object data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @Schema(description = "") + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public IpoListingResponse metaData(IpoMetaData metaData) { + this.metaData = metaData; + return this; + } + + /** + * Get metaData + * @return metaData + **/ + @Schema(description = "") + public IpoMetaData getMetaData() { + return metaData; + } + + public void setMetaData(IpoMetaData metaData) { + this.metaData = metaData; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpoListingResponse ipoListingResponse = (IpoListingResponse) o; + return Objects.equals(this.status, ipoListingResponse.status) && + Objects.equals(this.data, ipoListingResponse.data) && + Objects.equals(this.metaData, ipoListingResponse.metaData); + } + + @Override + public int hashCode() { + return Objects.hash(status, data, metaData); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpoListingResponse {\n"); + + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" metaData: ").append(toIndentedString(metaData)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/IpoMetaData.java b/src/main/java/com/upstox/api/IpoMetaData.java new file mode 100644 index 0000000..4dccfa6 --- /dev/null +++ b/src/main/java/com/upstox/api/IpoMetaData.java @@ -0,0 +1,93 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.upstox.api.Pagination; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * IpoMetaData + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class IpoMetaData { + @SerializedName("page") + private Pagination page = null; + + public IpoMetaData page(Pagination page) { + this.page = page; + return this; + } + + /** + * Get page + * @return page + **/ + @Schema(description = "") + public Pagination getPage() { + return page; + } + + public void setPage(Pagination page) { + this.page = page; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpoMetaData ipoMetaData = (IpoMetaData) o; + return Objects.equals(this.page, ipoMetaData.page); + } + + @Override + public int hashCode() { + return Objects.hash(page); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpoMetaData {\n"); + + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/IpoRegistrarInfo.java b/src/main/java/com/upstox/api/IpoRegistrarInfo.java new file mode 100644 index 0000000..1ab7ccd --- /dev/null +++ b/src/main/java/com/upstox/api/IpoRegistrarInfo.java @@ -0,0 +1,207 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * IpoRegistrarInfo + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class IpoRegistrarInfo { + @SerializedName("name") + private Object name = null; + + @SerializedName("email") + private Object email = null; + + @SerializedName("contact_name") + private Object contactName = null; + + @SerializedName("contact_number") + private Object contactNumber = null; + + @SerializedName("website") + private Object website = null; + + @SerializedName("registrar") + private Object registrar = null; + + public IpoRegistrarInfo name(Object name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @Schema(description = "") + public Object getName() { + return name; + } + + public void setName(Object name) { + this.name = name; + } + + public IpoRegistrarInfo email(Object email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @Schema(description = "") + public Object getEmail() { + return email; + } + + public void setEmail(Object email) { + this.email = email; + } + + public IpoRegistrarInfo contactName(Object contactName) { + this.contactName = contactName; + return this; + } + + /** + * Get contactName + * @return contactName + **/ + @Schema(description = "") + public Object getContactName() { + return contactName; + } + + public void setContactName(Object contactName) { + this.contactName = contactName; + } + + public IpoRegistrarInfo contactNumber(Object contactNumber) { + this.contactNumber = contactNumber; + return this; + } + + /** + * Get contactNumber + * @return contactNumber + **/ + @Schema(description = "") + public Object getContactNumber() { + return contactNumber; + } + + public void setContactNumber(Object contactNumber) { + this.contactNumber = contactNumber; + } + + public IpoRegistrarInfo website(Object website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @Schema(description = "") + public Object getWebsite() { + return website; + } + + public void setWebsite(Object website) { + this.website = website; + } + + public IpoRegistrarInfo registrar(Object registrar) { + this.registrar = registrar; + return this; + } + + /** + * Get registrar + * @return registrar + **/ + @Schema(description = "") + public Object getRegistrar() { + return registrar; + } + + public void setRegistrar(Object registrar) { + this.registrar = registrar; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpoRegistrarInfo ipoRegistrarInfo = (IpoRegistrarInfo) o; + return Objects.equals(this.name, ipoRegistrarInfo.name) && + Objects.equals(this.email, ipoRegistrarInfo.email) && + Objects.equals(this.contactName, ipoRegistrarInfo.contactName) && + Objects.equals(this.contactNumber, ipoRegistrarInfo.contactNumber) && + Objects.equals(this.website, ipoRegistrarInfo.website) && + Objects.equals(this.registrar, ipoRegistrarInfo.registrar); + } + + @Override + public int hashCode() { + return Objects.hash(name, email, contactName, contactNumber, website, registrar); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpoRegistrarInfo {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" contactName: ").append(toIndentedString(contactName)).append("\n"); + sb.append(" contactNumber: ").append(toIndentedString(contactNumber)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" registrar: ").append(toIndentedString(registrar)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/IpoTimeline.java b/src/main/java/com/upstox/api/IpoTimeline.java new file mode 100644 index 0000000..0e3455a --- /dev/null +++ b/src/main/java/com/upstox/api/IpoTimeline.java @@ -0,0 +1,253 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * IpoTimeline + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class IpoTimeline { + @SerializedName("pre_apply_start_date") + private Object preApplyStartDate = null; + + @SerializedName("application_start_date") + private Object applicationStartDate = null; + + @SerializedName("application_end_date") + private Object applicationEndDate = null; + + @SerializedName("allotment_start_date") + private Object allotmentStartDate = null; + + @SerializedName("allotment_date") + private Object allotmentDate = null; + + @SerializedName("refund_initiation_date") + private Object refundInitiationDate = null; + + @SerializedName("listing_date") + private Object listingDate = null; + + @SerializedName("mandate_end_date") + private Object mandateEndDate = null; + + public IpoTimeline preApplyStartDate(Object preApplyStartDate) { + this.preApplyStartDate = preApplyStartDate; + return this; + } + + /** + * Get preApplyStartDate + * @return preApplyStartDate + **/ + @Schema(description = "") + public Object getPreApplyStartDate() { + return preApplyStartDate; + } + + public void setPreApplyStartDate(Object preApplyStartDate) { + this.preApplyStartDate = preApplyStartDate; + } + + public IpoTimeline applicationStartDate(Object applicationStartDate) { + this.applicationStartDate = applicationStartDate; + return this; + } + + /** + * Get applicationStartDate + * @return applicationStartDate + **/ + @Schema(description = "") + public Object getApplicationStartDate() { + return applicationStartDate; + } + + public void setApplicationStartDate(Object applicationStartDate) { + this.applicationStartDate = applicationStartDate; + } + + public IpoTimeline applicationEndDate(Object applicationEndDate) { + this.applicationEndDate = applicationEndDate; + return this; + } + + /** + * Get applicationEndDate + * @return applicationEndDate + **/ + @Schema(description = "") + public Object getApplicationEndDate() { + return applicationEndDate; + } + + public void setApplicationEndDate(Object applicationEndDate) { + this.applicationEndDate = applicationEndDate; + } + + public IpoTimeline allotmentStartDate(Object allotmentStartDate) { + this.allotmentStartDate = allotmentStartDate; + return this; + } + + /** + * Get allotmentStartDate + * @return allotmentStartDate + **/ + @Schema(description = "") + public Object getAllotmentStartDate() { + return allotmentStartDate; + } + + public void setAllotmentStartDate(Object allotmentStartDate) { + this.allotmentStartDate = allotmentStartDate; + } + + public IpoTimeline allotmentDate(Object allotmentDate) { + this.allotmentDate = allotmentDate; + return this; + } + + /** + * Get allotmentDate + * @return allotmentDate + **/ + @Schema(description = "") + public Object getAllotmentDate() { + return allotmentDate; + } + + public void setAllotmentDate(Object allotmentDate) { + this.allotmentDate = allotmentDate; + } + + public IpoTimeline refundInitiationDate(Object refundInitiationDate) { + this.refundInitiationDate = refundInitiationDate; + return this; + } + + /** + * Get refundInitiationDate + * @return refundInitiationDate + **/ + @Schema(description = "") + public Object getRefundInitiationDate() { + return refundInitiationDate; + } + + public void setRefundInitiationDate(Object refundInitiationDate) { + this.refundInitiationDate = refundInitiationDate; + } + + public IpoTimeline listingDate(Object listingDate) { + this.listingDate = listingDate; + return this; + } + + /** + * Get listingDate + * @return listingDate + **/ + @Schema(description = "") + public Object getListingDate() { + return listingDate; + } + + public void setListingDate(Object listingDate) { + this.listingDate = listingDate; + } + + public IpoTimeline mandateEndDate(Object mandateEndDate) { + this.mandateEndDate = mandateEndDate; + return this; + } + + /** + * Get mandateEndDate + * @return mandateEndDate + **/ + @Schema(description = "") + public Object getMandateEndDate() { + return mandateEndDate; + } + + public void setMandateEndDate(Object mandateEndDate) { + this.mandateEndDate = mandateEndDate; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpoTimeline ipoTimeline = (IpoTimeline) o; + return Objects.equals(this.preApplyStartDate, ipoTimeline.preApplyStartDate) && + Objects.equals(this.applicationStartDate, ipoTimeline.applicationStartDate) && + Objects.equals(this.applicationEndDate, ipoTimeline.applicationEndDate) && + Objects.equals(this.allotmentStartDate, ipoTimeline.allotmentStartDate) && + Objects.equals(this.allotmentDate, ipoTimeline.allotmentDate) && + Objects.equals(this.refundInitiationDate, ipoTimeline.refundInitiationDate) && + Objects.equals(this.listingDate, ipoTimeline.listingDate) && + Objects.equals(this.mandateEndDate, ipoTimeline.mandateEndDate); + } + + @Override + public int hashCode() { + return Objects.hash(preApplyStartDate, applicationStartDate, applicationEndDate, allotmentStartDate, allotmentDate, refundInitiationDate, listingDate, mandateEndDate); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpoTimeline {\n"); + + sb.append(" preApplyStartDate: ").append(toIndentedString(preApplyStartDate)).append("\n"); + sb.append(" applicationStartDate: ").append(toIndentedString(applicationStartDate)).append("\n"); + sb.append(" applicationEndDate: ").append(toIndentedString(applicationEndDate)).append("\n"); + sb.append(" allotmentStartDate: ").append(toIndentedString(allotmentStartDate)).append("\n"); + sb.append(" allotmentDate: ").append(toIndentedString(allotmentDate)).append("\n"); + sb.append(" refundInitiationDate: ").append(toIndentedString(refundInitiationDate)).append("\n"); + sb.append(" listingDate: ").append(toIndentedString(listingDate)).append("\n"); + sb.append(" mandateEndDate: ").append(toIndentedString(mandateEndDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/ModifyPayoutRequest.java b/src/main/java/com/upstox/api/ModifyPayoutRequest.java new file mode 100644 index 0000000..6c01d4c --- /dev/null +++ b/src/main/java/com/upstox/api/ModifyPayoutRequest.java @@ -0,0 +1,92 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * ModifyPayoutRequest + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class ModifyPayoutRequest { + @SerializedName("amount") + private Object amount = null; + + public ModifyPayoutRequest amount(Object amount) { + this.amount = amount; + return this; + } + + /** + * Withdrawal amount in INR + * @return amount + **/ + @Schema(example = "5000.0", required = true, description = "Withdrawal amount in INR") + public Object getAmount() { + return amount; + } + + public void setAmount(Object amount) { + this.amount = amount; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyPayoutRequest modifyPayoutRequest = (ModifyPayoutRequest) o; + return Objects.equals(this.amount, modifyPayoutRequest.amount); + } + + @Override + public int hashCode() { + return Objects.hash(amount); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyPayoutRequest {\n"); + + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/PayoutDetails.java b/src/main/java/com/upstox/api/PayoutDetails.java new file mode 100644 index 0000000..bd64208 --- /dev/null +++ b/src/main/java/com/upstox/api/PayoutDetails.java @@ -0,0 +1,299 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * PayoutDetails + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class PayoutDetails { + @SerializedName("status") + private Object status = null; + + @SerializedName("mode") + private Object mode = null; + + @SerializedName("amount") + private Object amount = null; + + @SerializedName("currency") + private Object currency = null; + + @SerializedName("eta") + private Object eta = null; + + @SerializedName("message") + private Object message = null; + + @SerializedName("transaction_id") + private Object transactionId = null; + + @SerializedName("created_at") + private Object createdAt = null; + + @SerializedName("bank_name") + private Object bankName = null; + + @SerializedName("transaction_fee") + private Object transactionFee = null; + + public PayoutDetails status(Object status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + public Object getStatus() { + return status; + } + + public void setStatus(Object status) { + this.status = status; + } + + public PayoutDetails mode(Object mode) { + this.mode = mode; + return this; + } + + /** + * Get mode + * @return mode + **/ + @Schema(description = "") + public Object getMode() { + return mode; + } + + public void setMode(Object mode) { + this.mode = mode; + } + + public PayoutDetails amount(Object amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @Schema(description = "") + public Object getAmount() { + return amount; + } + + public void setAmount(Object amount) { + this.amount = amount; + } + + public PayoutDetails currency(Object currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @Schema(description = "") + public Object getCurrency() { + return currency; + } + + public void setCurrency(Object currency) { + this.currency = currency; + } + + public PayoutDetails eta(Object eta) { + this.eta = eta; + return this; + } + + /** + * Get eta + * @return eta + **/ + @Schema(description = "") + public Object getEta() { + return eta; + } + + public void setEta(Object eta) { + this.eta = eta; + } + + public PayoutDetails message(Object message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @Schema(description = "") + public Object getMessage() { + return message; + } + + public void setMessage(Object message) { + this.message = message; + } + + public PayoutDetails transactionId(Object transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * Get transactionId + * @return transactionId + **/ + @Schema(description = "") + public Object getTransactionId() { + return transactionId; + } + + public void setTransactionId(Object transactionId) { + this.transactionId = transactionId; + } + + public PayoutDetails createdAt(Object createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @Schema(description = "") + public Object getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Object createdAt) { + this.createdAt = createdAt; + } + + public PayoutDetails bankName(Object bankName) { + this.bankName = bankName; + return this; + } + + /** + * Get bankName + * @return bankName + **/ + @Schema(description = "") + public Object getBankName() { + return bankName; + } + + public void setBankName(Object bankName) { + this.bankName = bankName; + } + + public PayoutDetails transactionFee(Object transactionFee) { + this.transactionFee = transactionFee; + return this; + } + + /** + * Get transactionFee + * @return transactionFee + **/ + @Schema(description = "") + public Object getTransactionFee() { + return transactionFee; + } + + public void setTransactionFee(Object transactionFee) { + this.transactionFee = transactionFee; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutDetails payoutDetails = (PayoutDetails) o; + return Objects.equals(this.status, payoutDetails.status) && + Objects.equals(this.mode, payoutDetails.mode) && + Objects.equals(this.amount, payoutDetails.amount) && + Objects.equals(this.currency, payoutDetails.currency) && + Objects.equals(this.eta, payoutDetails.eta) && + Objects.equals(this.message, payoutDetails.message) && + Objects.equals(this.transactionId, payoutDetails.transactionId) && + Objects.equals(this.createdAt, payoutDetails.createdAt) && + Objects.equals(this.bankName, payoutDetails.bankName) && + Objects.equals(this.transactionFee, payoutDetails.transactionFee); + } + + @Override + public int hashCode() { + return Objects.hash(status, mode, amount, currency, eta, message, transactionId, createdAt, bankName, transactionFee); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutDetails {\n"); + + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" eta: ").append(toIndentedString(eta)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" transactionFee: ").append(toIndentedString(transactionFee)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/PayoutDetailsResponse.java b/src/main/java/com/upstox/api/PayoutDetailsResponse.java new file mode 100644 index 0000000..7f4fd62 --- /dev/null +++ b/src/main/java/com/upstox/api/PayoutDetailsResponse.java @@ -0,0 +1,116 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.upstox.api.PayoutDetails; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * PayoutDetailsResponse + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class PayoutDetailsResponse { + @SerializedName("status") + private Object status = null; + + @SerializedName("data") + private PayoutDetails data = null; + + public PayoutDetailsResponse status(Object status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + public Object getStatus() { + return status; + } + + public void setStatus(Object status) { + this.status = status; + } + + public PayoutDetailsResponse data(PayoutDetails data) { + this.data = data; + return this; + } + + /** + * Response data for initiate payout request + * @return data + **/ + @Schema(description = "Response data for initiate payout request") + public PayoutDetails getData() { + return data; + } + + public void setData(PayoutDetails data) { + this.data = data; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutDetailsResponse payoutDetailsResponse = (PayoutDetailsResponse) o; + return Objects.equals(this.status, payoutDetailsResponse.status) && + Objects.equals(this.data, payoutDetailsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(status, data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutDetailsResponse {\n"); + + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/PayoutModesData.java b/src/main/java/com/upstox/api/PayoutModesData.java new file mode 100644 index 0000000..3e65459 --- /dev/null +++ b/src/main/java/com/upstox/api/PayoutModesData.java @@ -0,0 +1,62 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +/** + * PayoutModesData + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class PayoutModesData { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutModesData {\n"); + + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/com/upstox/api/PayoutModesResponse.java b/src/main/java/com/upstox/api/PayoutModesResponse.java new file mode 100644 index 0000000..a8828d8 --- /dev/null +++ b/src/main/java/com/upstox/api/PayoutModesResponse.java @@ -0,0 +1,116 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.upstox.api; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.upstox.api.PayoutModesData; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * PayoutModesResponse + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:07:12.239739+05:30[Asia/Kolkata]") + +public class PayoutModesResponse { + @SerializedName("status") + private Object status = null; + + @SerializedName("data") + private PayoutModesData data = null; + + public PayoutModesResponse status(Object status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + public Object getStatus() { + return status; + } + + public void setStatus(Object status) { + this.status = status; + } + + public PayoutModesResponse data(PayoutModesData data) { + this.data = data; + return this; + } + + /** + * Available payout modes with eligibility details + * @return data + **/ + @Schema(description = "Available payout modes with eligibility details") + public PayoutModesData getData() { + return data; + } + + public void setData(PayoutModesData data) { + this.data = data; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutModesResponse payoutModesResponse = (PayoutModesResponse) o; + return Objects.equals(this.status, payoutModesResponse.status) && + Objects.equals(this.data, payoutModesResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(status, data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutModesResponse {\n"); + + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} From cf25e98ccbf7b1f805ba08bd84da768359ea54bd Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:15:40 +0530 Subject: [PATCH 2/8] feat(api): add IpoApi with getIpoListing and getIpoDetails Co-Authored-By: Claude Opus 4.8 (1M context) --- .../java/io/swagger/client/api/IpoApi.java | 334 ++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 src/main/java/io/swagger/client/api/IpoApi.java diff --git a/src/main/java/io/swagger/client/api/IpoApi.java b/src/main/java/io/swagger/client/api/IpoApi.java new file mode 100644 index 0000000..b3ef72b --- /dev/null +++ b/src/main/java/io/swagger/client/api/IpoApi.java @@ -0,0 +1,334 @@ +/* + * OpenAPI definition + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: v0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.api; + +import com.upstox.ApiCallback; +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.ApiResponse; +import com.upstox.Configuration; +import com.upstox.Pair; +import com.upstox.ProgressRequestBody; +import com.upstox.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.upstox.api.ApiGatewayErrorResponse; +import com.upstox.api.IpoDetailsResponse; +import com.upstox.api.IpoListingResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class IpoApi { + private ApiClient apiClient; + private Map headers; + + public IpoApi() { + this(Configuration.getDefaultApiClient()); + } + + public IpoApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public void setHeadersOverrides(Map headers) { + this.headers = headers; + } + + /** + * Build call for getIpoDetails + * @param id IPO slug ID (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getIpoDetailsCall(Object id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/ipos/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getIpoDetailsValidateBeforeCall(Object id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getIpoDetails(Async)"); + } + + com.squareup.okhttp.Call call = getIpoDetailsCall(id, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Get IPO Details + * Fetches detailed information for an IPO by its slug ID. + * @param id IPO slug ID (required) + * @return IpoDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public IpoDetailsResponse getIpoDetails(Object id) throws ApiException { + ApiResponse resp = getIpoDetailsWithHttpInfo(id); + return resp.getData(); + } + + /** + * Get IPO Details + * Fetches detailed information for an IPO by its slug ID. + * @param id IPO slug ID (required) + * @return ApiResponse<IpoDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getIpoDetailsWithHttpInfo(Object id) throws ApiException { + com.squareup.okhttp.Call call = getIpoDetailsValidateBeforeCall(id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get IPO Details (asynchronously) + * Fetches detailed information for an IPO by its slug ID. + * @param id IPO slug ID (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getIpoDetailsAsync(Object id, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getIpoDetailsValidateBeforeCall(id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getIpoListing + * @param status IPO status. Allowed values: open, closed, listed, upcoming (optional, default to open) + * @param issueType Issue type filter. Allowed values: regular, sme (optional) + * @param pageNumber Page number (default: 1) (optional, default to 1) + * @param records Number of records per page (default: 20, max: 30) (optional, default to 20) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getIpoListingCall(Object status, Object issueType, Object pageNumber, Object records, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/ipos"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (status != null) + localVarQueryParams.addAll(apiClient.parameterToPair("status", status)); + if (issueType != null) + localVarQueryParams.addAll(apiClient.parameterToPair("issue_type", issueType)); + if (pageNumber != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page_number", pageNumber)); + if (records != null) + localVarQueryParams.addAll(apiClient.parameterToPair("records", records)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getIpoListingValidateBeforeCall(Object status, Object issueType, Object pageNumber, Object records, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + com.squareup.okhttp.Call call = getIpoListingCall(status, issueType, pageNumber, records, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Get IPO Listing + * Fetches list of IPOs filtered by status. + * @param status IPO status. Allowed values: open, closed, listed, upcoming (optional, default to open) + * @param issueType Issue type filter. Allowed values: regular, sme (optional) + * @param pageNumber Page number (default: 1) (optional, default to 1) + * @param records Number of records per page (default: 20, max: 30) (optional, default to 20) + * @return IpoListingResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public IpoListingResponse getIpoListing(Object status, Object issueType, Object pageNumber, Object records) throws ApiException { + ApiResponse resp = getIpoListingWithHttpInfo(status, issueType, pageNumber, records); + return resp.getData(); + } + + /** + * Get IPO Listing + * Fetches list of IPOs filtered by status. + * @param status IPO status. Allowed values: open, closed, listed, upcoming (optional, default to open) + * @param issueType Issue type filter. Allowed values: regular, sme (optional) + * @param pageNumber Page number (default: 1) (optional, default to 1) + * @param records Number of records per page (default: 20, max: 30) (optional, default to 20) + * @return ApiResponse<IpoListingResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getIpoListingWithHttpInfo(Object status, Object issueType, Object pageNumber, Object records) throws ApiException { + com.squareup.okhttp.Call call = getIpoListingValidateBeforeCall(status, issueType, pageNumber, records, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get IPO Listing (asynchronously) + * Fetches list of IPOs filtered by status. + * @param status IPO status. Allowed values: open, closed, listed, upcoming (optional, default to open) + * @param issueType Issue type filter. Allowed values: regular, sme (optional) + * @param pageNumber Page number (default: 1) (optional, default to 1) + * @param records Number of records per page (default: 20, max: 30) (optional, default to 20) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getIpoListingAsync(Object status, Object issueType, Object pageNumber, Object records, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getIpoListingValidateBeforeCall(status, issueType, pageNumber, records, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} From 7937150d196af076256f24a5e0d44253d4f08d19 Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:15:40 +0530 Subject: [PATCH 3/8] feat(api): add smartlist futures/mtf/options endpoints to MarketApi Co-Authored-By: Claude Opus 4.8 (1M context) --- .../java/io/swagger/client/api/MarketApi.java | 419 ++++++++++++++++++ 1 file changed, 419 insertions(+) diff --git a/src/main/java/io/swagger/client/api/MarketApi.java b/src/main/java/io/swagger/client/api/MarketApi.java index 4c3ad37..a2eab75 100644 --- a/src/main/java/io/swagger/client/api/MarketApi.java +++ b/src/main/java/io/swagger/client/api/MarketApi.java @@ -945,4 +945,423 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + + /** + * Build call for getSmartlistFutures + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, PREMIUM, DISCOUNT (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmartlistFuturesCall(Object assetType, Object category, Object pageNumber, Object pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/market/smartlist/futures"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (assetType != null) + localVarQueryParams.addAll(apiClient.parameterToPair("asset_type", assetType)); + if (category != null) + localVarQueryParams.addAll(apiClient.parameterToPair("category", category)); + if (pageNumber != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page_number", pageNumber)); + if (pageSize != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page_size", pageSize)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmartlistFuturesValidateBeforeCall(Object assetType, Object category, Object pageNumber, Object pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + com.squareup.okhttp.Call call = getSmartlistFuturesCall(assetType, category, pageNumber, pageSize, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Get Smartlist Futures + * Fetches the smartlist of futures for the given asset type and category. + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, PREMIUM, DISCOUNT (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @return AnalyticsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public AnalyticsResponse getSmartlistFutures(Object assetType, Object category, Object pageNumber, Object pageSize) throws ApiException { + ApiResponse resp = getSmartlistFuturesWithHttpInfo(assetType, category, pageNumber, pageSize); + return resp.getData(); + } + + /** + * Get Smartlist Futures + * Fetches the smartlist of futures for the given asset type and category. + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, PREMIUM, DISCOUNT (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @return ApiResponse<AnalyticsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmartlistFuturesWithHttpInfo(Object assetType, Object category, Object pageNumber, Object pageSize) throws ApiException { + com.squareup.okhttp.Call call = getSmartlistFuturesValidateBeforeCall(assetType, category, pageNumber, pageSize, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get Smartlist Futures (asynchronously) + * Fetches the smartlist of futures for the given asset type and category. + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, PREMIUM, DISCOUNT (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmartlistFuturesAsync(Object assetType, Object category, Object pageNumber, Object pageSize, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmartlistFuturesValidateBeforeCall(assetType, category, pageNumber, pageSize, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getSmartlistMtf + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmartlistMtfCall(Object pageNumber, Object pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/market/smartlist/mtf"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pageNumber != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page_number", pageNumber)); + if (pageSize != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page_size", pageSize)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmartlistMtfValidateBeforeCall(Object pageNumber, Object pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + com.squareup.okhttp.Call call = getSmartlistMtfCall(pageNumber, pageSize, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Get Smartlist MTF + * Fetches the smartlist of MTF (Margin Trade Funding) stocks. Prices are enriched with live LTP data. + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @return AnalyticsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public AnalyticsResponse getSmartlistMtf(Object pageNumber, Object pageSize) throws ApiException { + ApiResponse resp = getSmartlistMtfWithHttpInfo(pageNumber, pageSize); + return resp.getData(); + } + + /** + * Get Smartlist MTF + * Fetches the smartlist of MTF (Margin Trade Funding) stocks. Prices are enriched with live LTP data. + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @return ApiResponse<AnalyticsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmartlistMtfWithHttpInfo(Object pageNumber, Object pageSize) throws ApiException { + com.squareup.okhttp.Call call = getSmartlistMtfValidateBeforeCall(pageNumber, pageSize, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get Smartlist MTF (asynchronously) + * Fetches the smartlist of MTF (Margin Trade Funding) stocks. Prices are enriched with live LTP data. + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmartlistMtfAsync(Object pageNumber, Object pageSize, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmartlistMtfValidateBeforeCall(pageNumber, pageSize, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getSmartlistOptions + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, IV_GAINERS, IV_LOSERS, UNDER_5000, UNDER_10000 (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmartlistOptionsCall(Object assetType, Object category, Object pageNumber, Object pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/market/smartlist/options"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (assetType != null) + localVarQueryParams.addAll(apiClient.parameterToPair("asset_type", assetType)); + if (category != null) + localVarQueryParams.addAll(apiClient.parameterToPair("category", category)); + if (pageNumber != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page_number", pageNumber)); + if (pageSize != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page_size", pageSize)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmartlistOptionsValidateBeforeCall(Object assetType, Object category, Object pageNumber, Object pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + com.squareup.okhttp.Call call = getSmartlistOptionsCall(assetType, category, pageNumber, pageSize, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Get Smartlist Options + * Fetches the smartlist of options for the given asset type and category. + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, IV_GAINERS, IV_LOSERS, UNDER_5000, UNDER_10000 (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @return AnalyticsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public AnalyticsResponse getSmartlistOptions(Object assetType, Object category, Object pageNumber, Object pageSize) throws ApiException { + ApiResponse resp = getSmartlistOptionsWithHttpInfo(assetType, category, pageNumber, pageSize); + return resp.getData(); + } + + /** + * Get Smartlist Options + * Fetches the smartlist of options for the given asset type and category. + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, IV_GAINERS, IV_LOSERS, UNDER_5000, UNDER_10000 (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @return ApiResponse<AnalyticsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmartlistOptionsWithHttpInfo(Object assetType, Object category, Object pageNumber, Object pageSize) throws ApiException { + com.squareup.okhttp.Call call = getSmartlistOptionsValidateBeforeCall(assetType, category, pageNumber, pageSize, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get Smartlist Options (asynchronously) + * Fetches the smartlist of options for the given asset type and category. + * @param assetType Asset type. Allowed values: INDEX, STOCK, COMMODITY (optional) + * @param category Category. Allowed values: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS, PRICE_GAINERS, PRICE_LOSERS, IV_GAINERS, IV_LOSERS, UNDER_5000, UNDER_10000 (COMMODITY supports only: TOP_TRADED, MOST_ACTIVE, OI_GAINERS, OI_LOSERS) (optional) + * @param pageNumber Page number (optional, 1-indexed) (optional) + * @param pageSize Page size (optional, max 50) (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmartlistOptionsAsync(Object assetType, Object category, Object pageNumber, Object pageSize, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmartlistOptionsValidateBeforeCall(assetType, category, pageNumber, pageSize, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + } From 94cebe7fdbc2ba0c83412bac86d68deb8007e9d4 Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:15:40 +0530 Subject: [PATCH 4/8] feat(api): add payout management endpoints to UserApi Co-Authored-By: Claude Opus 4.8 (1M context) --- .../java/io/swagger/client/api/UserApi.java | 517 ++++++++++++++++++ 1 file changed, 517 insertions(+) diff --git a/src/main/java/io/swagger/client/api/UserApi.java b/src/main/java/io/swagger/client/api/UserApi.java index fce9f87..c13da1f 100644 --- a/src/main/java/io/swagger/client/api/UserApi.java +++ b/src/main/java/io/swagger/client/api/UserApi.java @@ -27,6 +27,10 @@ import com.upstox.api.ApiGatewayErrorResponse; +import com.upstox.api.InitiatePayoutRequest; +import com.upstox.api.ModifyPayoutRequest; +import com.upstox.api.PayoutDetailsResponse; +import com.upstox.api.PayoutModesResponse; import com.upstox.api.GetProfileResponse; import com.upstox.api.GetUserFundMarginResponse; import com.upstox.api.GetUserFundMarginV3Response; @@ -1178,4 +1182,517 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + + /** + * Build call for cancelPayout + * @param transactionId Payout transaction id (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call cancelPayoutCall(Object transactionId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/user/payments/payout/{transaction_id}" + .replaceAll("\\{" + "transaction_id" + "\\}", apiClient.escapeString(transactionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call cancelPayoutValidateBeforeCall(Object transactionId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new ApiException("Missing the required parameter 'transactionId' when calling cancelPayout(Async)"); + } + + com.squareup.okhttp.Call call = cancelPayoutCall(transactionId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * + * + * @param transactionId Payout transaction id (required) + * @return PayoutDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PayoutDetailsResponse cancelPayout(Object transactionId) throws ApiException { + ApiResponse resp = cancelPayoutWithHttpInfo(transactionId); + return resp.getData(); + } + + /** + * + * + * @param transactionId Payout transaction id (required) + * @return ApiResponse<PayoutDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse cancelPayoutWithHttpInfo(Object transactionId) throws ApiException { + com.squareup.okhttp.Call call = cancelPayoutValidateBeforeCall(transactionId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param transactionId Payout transaction id (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call cancelPayoutAsync(Object transactionId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = cancelPayoutValidateBeforeCall(transactionId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + + /** + * Build call for getPayoutModes + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getPayoutModesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/user/payments/payout/modes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getPayoutModesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + com.squareup.okhttp.Call call = getPayoutModesCall(progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * + * + * @return PayoutModesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PayoutModesResponse getPayoutModes() throws ApiException { + ApiResponse resp = getPayoutModesWithHttpInfo(); + return resp.getData(); + } + + /** + * + * + * @return ApiResponse<PayoutModesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getPayoutModesWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getPayoutModesValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getPayoutModesAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getPayoutModesValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for initiatePayout + * @param body (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call initiatePayoutCall(InitiatePayoutRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v2/user/payments/payout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call initiatePayoutValidateBeforeCall(InitiatePayoutRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling initiatePayout(Async)"); + } + + com.squareup.okhttp.Call call = initiatePayoutCall(body, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * + * + * @param body (required) + * @return PayoutDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PayoutDetailsResponse initiatePayout(InitiatePayoutRequest body) throws ApiException { + ApiResponse resp = initiatePayoutWithHttpInfo(body); + return resp.getData(); + } + + /** + * + * + * @param body (required) + * @return ApiResponse<PayoutDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse initiatePayoutWithHttpInfo(InitiatePayoutRequest body) throws ApiException { + com.squareup.okhttp.Call call = initiatePayoutValidateBeforeCall(body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param body (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call initiatePayoutAsync(InitiatePayoutRequest body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = initiatePayoutValidateBeforeCall(body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for modifyPayout + * @param body (required) + * @param transactionId Payout transaction id (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call modifyPayoutCall(ModifyPayoutRequest body, Object transactionId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v2/user/payments/payout/{transaction_id}" + .replaceAll("\\{" + "transaction_id" + "\\}", apiClient.escapeString(transactionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "OAUTH2" }; + if (headers != null) { + localVarHeaderParams.putAll(headers); + } + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call modifyPayoutValidateBeforeCall(ModifyPayoutRequest body, Object transactionId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling modifyPayout(Async)"); + } + // verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new ApiException("Missing the required parameter 'transactionId' when calling modifyPayout(Async)"); + } + + com.squareup.okhttp.Call call = modifyPayoutCall(body, transactionId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * + * + * @param body (required) + * @param transactionId Payout transaction id (required) + * @return PayoutDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PayoutDetailsResponse modifyPayout(ModifyPayoutRequest body, Object transactionId) throws ApiException { + ApiResponse resp = modifyPayoutWithHttpInfo(body, transactionId); + return resp.getData(); + } + + /** + * + * + * @param body (required) + * @param transactionId Payout transaction id (required) + * @return ApiResponse<PayoutDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse modifyPayoutWithHttpInfo(ModifyPayoutRequest body, Object transactionId) throws ApiException { + com.squareup.okhttp.Call call = modifyPayoutValidateBeforeCall(body, transactionId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param body (required) + * @param transactionId Payout transaction id (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call modifyPayoutAsync(ModifyPayoutRequest body, Object transactionId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = modifyPayoutValidateBeforeCall(body, transactionId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + } From d6544858dc97af013a0cdea09bb01ac8879d1489 Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:15:48 +0530 Subject: [PATCH 5/8] test(ipos-smartlist-payout): add SDK tests for new features Co-Authored-By: Claude Opus 4.8 (1M context) --- .../java/com/upstox/sanity/IpoApiTest.java | 44 ++++++++++++++ .../java/com/upstox/sanity/PayoutApiTest.java | 59 +++++++++++++++++++ .../java/com/upstox/sanity/SanityTest.java | 3 + .../com/upstox/sanity/SmartlistApiTest.java | 43 ++++++++++++++ 4 files changed, 149 insertions(+) create mode 100644 src/test/java/com/upstox/sanity/IpoApiTest.java create mode 100644 src/test/java/com/upstox/sanity/PayoutApiTest.java create mode 100644 src/test/java/com/upstox/sanity/SmartlistApiTest.java diff --git a/src/test/java/com/upstox/sanity/IpoApiTest.java b/src/test/java/com/upstox/sanity/IpoApiTest.java new file mode 100644 index 0000000..83ecf71 --- /dev/null +++ b/src/test/java/com/upstox/sanity/IpoApiTest.java @@ -0,0 +1,44 @@ +package com.upstox.sanity; + +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.IpoDetailsResponse; +import com.upstox.api.IpoListingResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.IpoApi; + +public class IpoApiTest { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken(DataToken.accessToken); + + IpoApi apiInstance = new IpoApi(); + + try { + IpoListingResponse result = apiInstance.getIpoListing("open", "regular", 1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpoApi#getIpoListing"); + System.out.println(e.getResponseBody()); + } + + try { + IpoListingResponse result = apiInstance.getIpoListing(null, null, null, null); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpoApi#getIpoListing (no params)"); + System.out.println(e.getResponseBody()); + } + + try { + IpoDetailsResponse result = apiInstance.getIpoDetails("sample-ipo-slug"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpoApi#getIpoDetails"); + System.out.println(e.getResponseBody()); + } + } +} diff --git a/src/test/java/com/upstox/sanity/PayoutApiTest.java b/src/test/java/com/upstox/sanity/PayoutApiTest.java new file mode 100644 index 0000000..699c51e --- /dev/null +++ b/src/test/java/com/upstox/sanity/PayoutApiTest.java @@ -0,0 +1,59 @@ +package com.upstox.sanity; + +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.InitiatePayoutRequest; +import com.upstox.api.ModifyPayoutRequest; +import com.upstox.api.PayoutDetailsResponse; +import com.upstox.api.PayoutModesResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.UserApi; + +public class PayoutApiTest { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken(DataToken.accessToken); + + UserApi apiInstance = new UserApi(); + + try { + PayoutModesResponse result = apiInstance.getPayoutModes(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getPayoutModes"); + System.out.println(e.getResponseBody()); + } + + InitiatePayoutRequest initiateBody = new InitiatePayoutRequest(); + initiateBody.setMode("NEFT"); + initiateBody.setAmount(5000.0); + try { + PayoutDetailsResponse result = apiInstance.initiatePayout(initiateBody); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#initiatePayout"); + System.out.println(e.getResponseBody()); + } + + ModifyPayoutRequest modifyBody = new ModifyPayoutRequest(); + modifyBody.setAmount(6000.0); + try { + PayoutDetailsResponse result = apiInstance.modifyPayout(modifyBody, "sample-transaction-id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#modifyPayout"); + System.out.println(e.getResponseBody()); + } + + try { + PayoutDetailsResponse result = apiInstance.cancelPayout("sample-transaction-id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#cancelPayout"); + System.out.println(e.getResponseBody()); + } + } +} diff --git a/src/test/java/com/upstox/sanity/SanityTest.java b/src/test/java/com/upstox/sanity/SanityTest.java index f31046d..549647c 100644 --- a/src/test/java/com/upstox/sanity/SanityTest.java +++ b/src/test/java/com/upstox/sanity/SanityTest.java @@ -81,6 +81,9 @@ public static void main(String[] args) throws ApiException { PaymentsApiTest.main(null); FundamentalsApiSanityTest.main(null); MarketApiSanityTest.main(null); + IpoApiTest.main(null); + SmartlistApiTest.main(null); + PayoutApiTest.main(null); } catch (ApiException e){ e.printStackTrace(); diff --git a/src/test/java/com/upstox/sanity/SmartlistApiTest.java b/src/test/java/com/upstox/sanity/SmartlistApiTest.java new file mode 100644 index 0000000..72a898e --- /dev/null +++ b/src/test/java/com/upstox/sanity/SmartlistApiTest.java @@ -0,0 +1,43 @@ +package com.upstox.sanity; + +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.AnalyticsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.MarketApi; + +public class SmartlistApiTest { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken(DataToken.accessToken); + + MarketApi apiInstance = new MarketApi(); + + try { + AnalyticsResponse result = apiInstance.getSmartlistFutures("EQUITY", "active", 1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#getSmartlistFutures"); + System.out.println(e.getResponseBody()); + } + + try { + AnalyticsResponse result = apiInstance.getSmartlistMtf(1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#getSmartlistMtf"); + System.out.println(e.getResponseBody()); + } + + try { + AnalyticsResponse result = apiInstance.getSmartlistOptions("EQUITY", "active", 1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#getSmartlistOptions"); + System.out.println(e.getResponseBody()); + } + } +} From de1f8042996f37e481d11d2182468503b9840989 Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:15:48 +0530 Subject: [PATCH 6/8] docs(ipos-smartlist-payout): add usage examples for new features Co-Authored-By: Claude Opus 4.8 (1M context) --- examples/ipo/README.md | 11 ++++++ examples/ipo/code/get-ipo-details.md | 31 +++++++++++++++++ examples/ipo/code/get-ipo-listing.md | 30 ++++++++++++++++ examples/payments-api/README.md | 7 ++++ examples/payments-api/code/cancel-payout.md | 31 +++++++++++++++++ .../payments-api/code/get-payout-modes.md | 29 ++++++++++++++++ examples/payments-api/code/initiate-payout.md | 34 +++++++++++++++++++ examples/payments-api/code/modify-payout.md | 34 +++++++++++++++++++ examples/smartlist/README.md | 15 ++++++++ .../smartlist/code/get-smartlist-futures.md | 29 ++++++++++++++++ examples/smartlist/code/get-smartlist-mtf.md | 29 ++++++++++++++++ .../smartlist/code/get-smartlist-options.md | 29 ++++++++++++++++ 12 files changed, 309 insertions(+) create mode 100644 examples/ipo/README.md create mode 100644 examples/ipo/code/get-ipo-details.md create mode 100644 examples/ipo/code/get-ipo-listing.md create mode 100644 examples/payments-api/code/cancel-payout.md create mode 100644 examples/payments-api/code/get-payout-modes.md create mode 100644 examples/payments-api/code/initiate-payout.md create mode 100644 examples/payments-api/code/modify-payout.md create mode 100644 examples/smartlist/README.md create mode 100644 examples/smartlist/code/get-smartlist-futures.md create mode 100644 examples/smartlist/code/get-smartlist-mtf.md create mode 100644 examples/smartlist/code/get-smartlist-options.md diff --git a/examples/ipo/README.md b/examples/ipo/README.md new file mode 100644 index 0000000..58e151f --- /dev/null +++ b/examples/ipo/README.md @@ -0,0 +1,11 @@ +# IPO API – Example code + +Links to all IPO-related examples in the `code/` folder. + +## 1. IPO Listing + +- 1.1 [Get IPO listing](code/get-ipo-listing.md#get-ipo-listing) + +## 2. IPO Details + +- 2.1 [Get IPO details](code/get-ipo-details.md#get-ipo-details) diff --git a/examples/ipo/code/get-ipo-details.md b/examples/ipo/code/get-ipo-details.md new file mode 100644 index 0000000..d5859b1 --- /dev/null +++ b/examples/ipo/code/get-ipo-details.md @@ -0,0 +1,31 @@ +## Get IPO details + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.IpoDetailsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.IpoApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + IpoApi apiInstance = new IpoApi(); + + String id = "{ipo_slug_id}"; + + try { + IpoDetailsResponse result = apiInstance.getIpoDetails(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpoApi#getIpoDetails"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/ipo/code/get-ipo-listing.md b/examples/ipo/code/get-ipo-listing.md new file mode 100644 index 0000000..5eb191c --- /dev/null +++ b/examples/ipo/code/get-ipo-listing.md @@ -0,0 +1,30 @@ +## Get IPO listing + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.IpoListingResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.IpoApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + IpoApi apiInstance = new IpoApi(); + + // status: open, closed, listed, upcoming | issueType: regular, sme + try { + IpoListingResponse result = apiInstance.getIpoListing("open", "regular", 1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpoApi#getIpoListing"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/payments-api/README.md b/examples/payments-api/README.md index 6f3e65d..245a53e 100644 --- a/examples/payments-api/README.md +++ b/examples/payments-api/README.md @@ -9,3 +9,10 @@ Links to all payments-related examples in the `code/` folder. ## 2. Get Payout History - 2.1 [Get payout history for the user](code/get-payout-history.md#get-payout-history-for-the-user) + +## 3. Payout Management + +- 3.1 [Get available payout modes](code/get-payout-modes.md#get-available-payout-modes) +- 3.2 [Initiate a payout](code/initiate-payout.md#initiate-a-payout) +- 3.3 [Modify a pending payout](code/modify-payout.md#modify-a-pending-payout) +- 3.4 [Cancel a pending payout](code/cancel-payout.md#cancel-a-pending-payout) diff --git a/examples/payments-api/code/cancel-payout.md b/examples/payments-api/code/cancel-payout.md new file mode 100644 index 0000000..8db4946 --- /dev/null +++ b/examples/payments-api/code/cancel-payout.md @@ -0,0 +1,31 @@ +## Cancel a pending payout + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.PayoutDetailsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.UserApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + UserApi apiInstance = new UserApi(); + + String transactionId = "{your_transaction_id}"; + + try { + PayoutDetailsResponse result = apiInstance.cancelPayout(transactionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#cancelPayout"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/payments-api/code/get-payout-modes.md b/examples/payments-api/code/get-payout-modes.md new file mode 100644 index 0000000..f2c1f38 --- /dev/null +++ b/examples/payments-api/code/get-payout-modes.md @@ -0,0 +1,29 @@ +## Get available payout modes + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.PayoutModesResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.UserApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + UserApi apiInstance = new UserApi(); + + try { + PayoutModesResponse result = apiInstance.getPayoutModes(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getPayoutModes"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/payments-api/code/initiate-payout.md b/examples/payments-api/code/initiate-payout.md new file mode 100644 index 0000000..643143e --- /dev/null +++ b/examples/payments-api/code/initiate-payout.md @@ -0,0 +1,34 @@ +## Initiate a payout + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.InitiatePayoutRequest; +import com.upstox.api.PayoutDetailsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.UserApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + UserApi apiInstance = new UserApi(); + + InitiatePayoutRequest body = new InitiatePayoutRequest(); + body.setMode("NEFT"); + body.setAmount(5000.0); + + try { + PayoutDetailsResponse result = apiInstance.initiatePayout(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#initiatePayout"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/payments-api/code/modify-payout.md b/examples/payments-api/code/modify-payout.md new file mode 100644 index 0000000..9a66111 --- /dev/null +++ b/examples/payments-api/code/modify-payout.md @@ -0,0 +1,34 @@ +## Modify a pending payout + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.ModifyPayoutRequest; +import com.upstox.api.PayoutDetailsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.UserApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + UserApi apiInstance = new UserApi(); + + ModifyPayoutRequest body = new ModifyPayoutRequest(); + body.setAmount(6000.0); + String transactionId = "{your_transaction_id}"; + + try { + PayoutDetailsResponse result = apiInstance.modifyPayout(body, transactionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#modifyPayout"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/smartlist/README.md b/examples/smartlist/README.md new file mode 100644 index 0000000..4948411 --- /dev/null +++ b/examples/smartlist/README.md @@ -0,0 +1,15 @@ +# Smartlist API – Example code + +Links to all smartlist-related examples in the `code/` folder. + +## 1. Smartlist Futures + +- 1.1 [Get smartlist futures](code/get-smartlist-futures.md#get-smartlist-futures) + +## 2. Smartlist MTF + +- 2.1 [Get smartlist MTF](code/get-smartlist-mtf.md#get-smartlist-mtf) + +## 3. Smartlist Options + +- 3.1 [Get smartlist options](code/get-smartlist-options.md#get-smartlist-options) diff --git a/examples/smartlist/code/get-smartlist-futures.md b/examples/smartlist/code/get-smartlist-futures.md new file mode 100644 index 0000000..9a86950 --- /dev/null +++ b/examples/smartlist/code/get-smartlist-futures.md @@ -0,0 +1,29 @@ +## Get smartlist futures + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.AnalyticsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.MarketApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + MarketApi apiInstance = new MarketApi(); + + try { + AnalyticsResponse result = apiInstance.getSmartlistFutures("EQUITY", "active", 1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#getSmartlistFutures"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/smartlist/code/get-smartlist-mtf.md b/examples/smartlist/code/get-smartlist-mtf.md new file mode 100644 index 0000000..809929a --- /dev/null +++ b/examples/smartlist/code/get-smartlist-mtf.md @@ -0,0 +1,29 @@ +## Get smartlist MTF + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.AnalyticsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.MarketApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + MarketApi apiInstance = new MarketApi(); + + try { + AnalyticsResponse result = apiInstance.getSmartlistMtf(1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#getSmartlistMtf"); + e.printStackTrace(); + } + } +} +``` diff --git a/examples/smartlist/code/get-smartlist-options.md b/examples/smartlist/code/get-smartlist-options.md new file mode 100644 index 0000000..3d5a8a6 --- /dev/null +++ b/examples/smartlist/code/get-smartlist-options.md @@ -0,0 +1,29 @@ +## Get smartlist options + +```java +import com.upstox.ApiClient; +import com.upstox.ApiException; +import com.upstox.Configuration; +import com.upstox.api.AnalyticsResponse; +import com.upstox.auth.OAuth; +import io.swagger.client.api.MarketApi; + +public class Main { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + OAuth OAUTH2 = (OAuth) defaultClient.getAuthentication("OAUTH2"); + OAUTH2.setAccessToken("{your_access_token}"); + + MarketApi apiInstance = new MarketApi(); + + try { + AnalyticsResponse result = apiInstance.getSmartlistOptions("EQUITY", "active", 1, 20); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#getSmartlistOptions"); + e.printStackTrace(); + } + } +} +``` From a22c43e84ec8e78d8d46ebb80cf1b701e4e03dbf Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:15:48 +0530 Subject: [PATCH 7/8] chore(release): bump version to 1.27 Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 4 ++-- pom.xml | 2 +- src/main/java/com/upstox/ApiClient.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 64a07f8..80b8801 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Add this dependency to your project's POM: com.upstox.api upstox-java-sdk - 1.26 + 1.27 compile ``` @@ -40,7 +40,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.upstox.api:upstox-java-sdk:1.26" +compile "com.upstox.api:upstox-java-sdk:1.27" ``` ## Sandbox Mode diff --git a/pom.xml b/pom.xml index 47a31bf..b92baeb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ upstox-java-sdk jar upstox-java-sdk - 1.26 + 1.27 https://upstox.com/uplink/ The official Java client for communicating with the Upstox API diff --git a/src/main/java/com/upstox/ApiClient.java b/src/main/java/com/upstox/ApiClient.java index 58266f0..3af420f 100644 --- a/src/main/java/com/upstox/ApiClient.java +++ b/src/main/java/com/upstox/ApiClient.java @@ -1014,7 +1014,7 @@ public Call buildCall(String path, String method, List queryParams, List

queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { updateParamsForAuth(authNames, queryParams, headerParams); headerParams.put("X-Upstox-SDK-Language","java"); - headerParams.put("X-Upstox-SDK-Version","1.26"); + headerParams.put("X-Upstox-SDK-Version","1.27"); final String url = buildUrl(path, queryParams, collectionQueryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); From 1053c718b7ac1a301519b91ca7e25da92b0e76d2 Mon Sep 17 00:00:00 2001 From: Anand Sajankar Date: Thu, 25 Jun 2026 20:39:17 +0530 Subject: [PATCH 8/8] fix(models): add currency, eta, created_at fields to PaymentHistoryData --- .../com/upstox/api/PaymentHistoryData.java | 75 ++++++++++++++++++- .../com/upstox/sanity/SmartlistApiTest.java | 4 +- 2 files changed, 74 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/upstox/api/PaymentHistoryData.java b/src/main/java/com/upstox/api/PaymentHistoryData.java index bfca0b8..9f473c9 100644 --- a/src/main/java/com/upstox/api/PaymentHistoryData.java +++ b/src/main/java/com/upstox/api/PaymentHistoryData.java @@ -25,7 +25,7 @@ * PaymentHistoryData */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-04T14:20:20.627024+05:30[Asia/Kolkata]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-25T20:33:13.163478+05:30[Asia/Kolkata]") public class PaymentHistoryData { @SerializedName("amount") @@ -40,6 +40,12 @@ public class PaymentHistoryData { @SerializedName("reason") private Object reason = null; + @SerializedName("currency") + private Object currency = null; + + @SerializedName("eta") + private Object eta = null; + @SerializedName("last_updated_at") private Object lastUpdatedAt = null; @@ -55,6 +61,9 @@ public class PaymentHistoryData { @SerializedName("charges_category") private Object chargesCategory = null; + @SerializedName("created_at") + private Object createdAt = null; + public PaymentHistoryData amount(Object amount) { this.amount = amount; return this; @@ -127,6 +136,42 @@ public void setReason(Object reason) { this.reason = reason; } + public PaymentHistoryData currency(Object currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @Schema(description = "") + public Object getCurrency() { + return currency; + } + + public void setCurrency(Object currency) { + this.currency = currency; + } + + public PaymentHistoryData eta(Object eta) { + this.eta = eta; + return this; + } + + /** + * Get eta + * @return eta + **/ + @Schema(description = "") + public Object getEta() { + return eta; + } + + public void setEta(Object eta) { + this.eta = eta; + } + public PaymentHistoryData lastUpdatedAt(Object lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; return this; @@ -217,6 +262,24 @@ public void setChargesCategory(Object chargesCategory) { this.chargesCategory = chargesCategory; } + public PaymentHistoryData createdAt(Object createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @Schema(description = "") + public Object getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Object createdAt) { + this.createdAt = createdAt; + } + @Override public boolean equals(java.lang.Object o) { @@ -231,16 +294,19 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mode, paymentHistoryData.mode) && Objects.equals(this.status, paymentHistoryData.status) && Objects.equals(this.reason, paymentHistoryData.reason) && + Objects.equals(this.currency, paymentHistoryData.currency) && + Objects.equals(this.eta, paymentHistoryData.eta) && Objects.equals(this.lastUpdatedAt, paymentHistoryData.lastUpdatedAt) && Objects.equals(this.bankName, paymentHistoryData.bankName) && Objects.equals(this.transactionId, paymentHistoryData.transactionId) && Objects.equals(this.totalCharges, paymentHistoryData.totalCharges) && - Objects.equals(this.chargesCategory, paymentHistoryData.chargesCategory); + Objects.equals(this.chargesCategory, paymentHistoryData.chargesCategory) && + Objects.equals(this.createdAt, paymentHistoryData.createdAt); } @Override public int hashCode() { - return Objects.hash(amount, mode, status, reason, lastUpdatedAt, bankName, transactionId, totalCharges, chargesCategory); + return Objects.hash(amount, mode, status, reason, currency, eta, lastUpdatedAt, bankName, transactionId, totalCharges, chargesCategory, createdAt); } @@ -253,11 +319,14 @@ public String toString() { sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" eta: ").append(toIndentedString(eta)).append("\n"); sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n"); sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); sb.append(" totalCharges: ").append(toIndentedString(totalCharges)).append("\n"); sb.append(" chargesCategory: ").append(toIndentedString(chargesCategory)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/test/java/com/upstox/sanity/SmartlistApiTest.java b/src/test/java/com/upstox/sanity/SmartlistApiTest.java index 72a898e..3dfaf4c 100644 --- a/src/test/java/com/upstox/sanity/SmartlistApiTest.java +++ b/src/test/java/com/upstox/sanity/SmartlistApiTest.java @@ -17,7 +17,7 @@ public static void main(String[] args) { MarketApi apiInstance = new MarketApi(); try { - AnalyticsResponse result = apiInstance.getSmartlistFutures("EQUITY", "active", 1, 20); + AnalyticsResponse result = apiInstance.getSmartlistFutures("INDEX", "TOP_TRADED", 1, 20); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MarketApi#getSmartlistFutures"); @@ -33,7 +33,7 @@ public static void main(String[] args) { } try { - AnalyticsResponse result = apiInstance.getSmartlistOptions("EQUITY", "active", 1, 20); + AnalyticsResponse result = apiInstance.getSmartlistOptions("INDEX", "TOP_TRADED", 1, 20); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MarketApi#getSmartlistOptions");