+ * This method allows you to get logs of sent Number Context requests.
+ *
+ * @return GetNumberContextLogsRequest
+ */
+ public GetNumberContextLogsRequest getNumberContextLogs() {
+ return new GetNumberContextLogsRequest();
+ }
+
+ private RequestDefinition numberContextLookupDefinition(NumberLookupQueryRequest numberLookupQueryRequest) {
+ RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/number/1/query")
+ .body(numberLookupQueryRequest)
+ .requiresAuthentication(true)
+ .accept("application/json")
+ .contentType("application/json");
+
+ return builder.build();
+ }
+
+ /**
+ * numberContextLookup request builder class.
+ */
+ public class NumberContextLookupRequest {
+ private final NumberLookupQueryRequest numberLookupQueryRequest;
+
+ private NumberContextLookupRequest(NumberLookupQueryRequest numberLookupQueryRequest) {
+ this.numberLookupQueryRequest = Objects.requireNonNull(
+ numberLookupQueryRequest, "The required parameter 'numberLookupQueryRequest' is missing.");
+ }
+
+ /**
+ * Executes the numberContextLookup request.
+ *
+ * @return NumberLookupResponse The deserialized response.
+ * @throws ApiException If the API call fails or an error occurs during the request or response processing.
+ */
+ public NumberLookupResponse execute() throws ApiException {
+ RequestDefinition numberContextLookupDefinition = numberContextLookupDefinition(numberLookupQueryRequest);
+ return apiClient.execute(
+ numberContextLookupDefinition, new TypeReference
+ * This method allows you to get Number Context information for the requested phone numbers. For package change, contact your account manager or [support](https://www.infobip.com/contact).
+ *
+ * @param numberLookupQueryRequest (required)
+ * @return NumberContextLookupRequest
+ */
+ public NumberContextLookupRequest numberContextLookup(NumberLookupQueryRequest numberLookupQueryRequest) {
+ return new NumberContextLookupRequest(numberLookupQueryRequest);
+ }
+
+ private RequestDefinition numberContextLookupAsyncDefinition(NumberLookupNotifyRequest numberLookupNotifyRequest) {
+ RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/number/1/notify")
+ .body(numberLookupNotifyRequest)
+ .requiresAuthentication(true)
+ .accept("application/json")
+ .contentType("application/json");
+
+ return builder.build();
+ }
+
+ /**
+ * numberContextLookupAsync request builder class.
+ */
+ public class NumberContextLookupAsyncRequest {
+ private final NumberLookupNotifyRequest numberLookupNotifyRequest;
+
+ private NumberContextLookupAsyncRequest(NumberLookupNotifyRequest numberLookupNotifyRequest) {
+ this.numberLookupNotifyRequest = Objects.requireNonNull(
+ numberLookupNotifyRequest, "The required parameter 'numberLookupNotifyRequest' is missing.");
+ }
+
+ /**
+ * Executes the numberContextLookupAsync request.
+ *
+ * @return NumberLookupResponseAsync The deserialized response.
+ * @throws ApiException If the API call fails or an error occurs during the request or response processing.
+ */
+ public NumberLookupResponseAsync execute() throws ApiException {
+ RequestDefinition numberContextLookupAsyncDefinition =
+ numberContextLookupAsyncDefinition(numberLookupNotifyRequest);
+ return apiClient.execute(
+ numberContextLookupAsyncDefinition, new TypeReference
+ * This method allows you to get number context information for requested phone numbers and receive information at some endpoint asynchronously. Information may vary per country and your package. For package change, contact your account manager or [support](https://www.infobip.com/contact).
+ *
+ * @param numberLookupNotifyRequest (required)
+ * @return NumberContextLookupAsyncRequest
+ */
+ public NumberContextLookupAsyncRequest numberContextLookupAsync(
+ NumberLookupNotifyRequest numberLookupNotifyRequest) {
+ return new NumberContextLookupAsyncRequest(numberLookupNotifyRequest);
+ }
+}
diff --git a/src/main/java/com/infobip/model/NumberLookupLog.java b/src/main/java/com/infobip/model/NumberLookupLog.java
new file mode 100644
index 00000000..1c09de94
--- /dev/null
+++ b/src/main/java/com/infobip/model/NumberLookupLog.java
@@ -0,0 +1,442 @@
+/*
+ * This class is auto generated from the Infobip OpenAPI specification
+ * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
+ * powered by the OpenAPI Generator (https://openapi-generator.tech).
+ *
+ * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
+ * or contact us @ support@infobip.com.
+ */
+
+package com.infobip.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Objects;
+
+/**
+ * Collection of logs.
+ */
+public class NumberLookupLog {
+
+ private String bulkId;
+
+ private String messageId;
+
+ private String to;
+
+ private OffsetDateTime sentAt;
+
+ private OffsetDateTime doneAt;
+
+ private String mccMnc;
+
+ private NumberLookupLogPrice price;
+
+ private MessageStatus status;
+
+ private MessageError error;
+
+ /**
+ * Sets bulkId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @param bulkId
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog bulkId(String bulkId) {
+ this.bulkId = bulkId;
+ return this;
+ }
+
+ /**
+ * Returns bulkId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @return bulkId
+ */
+ @JsonProperty("bulkId")
+ public String getBulkId() {
+ return bulkId;
+ }
+
+ /**
+ * Sets bulkId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @param bulkId
+ */
+ @JsonProperty("bulkId")
+ public void setBulkId(String bulkId) {
+ this.bulkId = bulkId;
+ }
+
+ /**
+ * Sets messageId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the performed lookup.
+ *
+ * @param messageId
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog messageId(String messageId) {
+ this.messageId = messageId;
+ return this;
+ }
+
+ /**
+ * Returns messageId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the performed lookup.
+ *
+ * @return messageId
+ */
+ @JsonProperty("messageId")
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Sets messageId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the performed lookup.
+ *
+ * @param messageId
+ */
+ @JsonProperty("messageId")
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ /**
+ * Sets to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @param to
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog to(String to) {
+ this.to = to;
+ return this;
+ }
+
+ /**
+ * Returns to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @return to
+ */
+ @JsonProperty("to")
+ public String getTo() {
+ return to;
+ }
+
+ /**
+ * Sets to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @param to
+ */
+ @JsonProperty("to")
+ public void setTo(String to) {
+ this.to = to;
+ }
+
+ /**
+ * Sets sentAt.
+ *
+ * Field description:
+ * Tells when the lookup was performed. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ *
+ * @param sentAt
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog sentAt(OffsetDateTime sentAt) {
+ this.sentAt = sentAt;
+ return this;
+ }
+
+ /**
+ * Returns sentAt.
+ *
+ * Field description:
+ * Tells when the lookup was performed. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ *
+ * @return sentAt
+ */
+ @JsonProperty("sentAt")
+ public OffsetDateTime getSentAt() {
+ return sentAt;
+ }
+
+ /**
+ * Sets sentAt.
+ *
+ * Field description:
+ * Tells when the lookup was performed. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ *
+ * @param sentAt
+ */
+ @JsonProperty("sentAt")
+ public void setSentAt(OffsetDateTime sentAt) {
+ this.sentAt = sentAt;
+ }
+
+ /**
+ * Sets doneAt.
+ *
+ * Field description:
+ * Tells when Infobip finished processing the lookup (e.g. lookup request was delivered to the destination network). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ *
+ * @param doneAt
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog doneAt(OffsetDateTime doneAt) {
+ this.doneAt = doneAt;
+ return this;
+ }
+
+ /**
+ * Returns doneAt.
+ *
+ * Field description:
+ * Tells when Infobip finished processing the lookup (e.g. lookup request was delivered to the destination network). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ *
+ * @return doneAt
+ */
+ @JsonProperty("doneAt")
+ public OffsetDateTime getDoneAt() {
+ return doneAt;
+ }
+
+ /**
+ * Sets doneAt.
+ *
+ * Field description:
+ * Tells when Infobip finished processing the lookup (e.g. lookup request was delivered to the destination network). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ *
+ * @param doneAt
+ */
+ @JsonProperty("doneAt")
+ public void setDoneAt(OffsetDateTime doneAt) {
+ this.doneAt = doneAt;
+ }
+
+ /**
+ * Sets mccMnc.
+ *
+ * Field description:
+ * Mobile country and network codes.
+ *
+ * @param mccMnc
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog mccMnc(String mccMnc) {
+ this.mccMnc = mccMnc;
+ return this;
+ }
+
+ /**
+ * Returns mccMnc.
+ *
+ * Field description:
+ * Mobile country and network codes.
+ *
+ * @return mccMnc
+ */
+ @JsonProperty("mccMnc")
+ public String getMccMnc() {
+ return mccMnc;
+ }
+
+ /**
+ * Sets mccMnc.
+ *
+ * Field description:
+ * Mobile country and network codes.
+ *
+ * @param mccMnc
+ */
+ @JsonProperty("mccMnc")
+ public void setMccMnc(String mccMnc) {
+ this.mccMnc = mccMnc;
+ }
+
+ /**
+ * Sets price.
+ *
+ * @param price
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog price(NumberLookupLogPrice price) {
+ this.price = price;
+ return this;
+ }
+
+ /**
+ * Returns price.
+ *
+ * @return price
+ */
+ @JsonProperty("price")
+ public NumberLookupLogPrice getPrice() {
+ return price;
+ }
+
+ /**
+ * Sets price.
+ *
+ * @param price
+ */
+ @JsonProperty("price")
+ public void setPrice(NumberLookupLogPrice price) {
+ this.price = price;
+ }
+
+ /**
+ * Sets status.
+ *
+ * @param status
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog status(MessageStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Returns status.
+ *
+ * @return status
+ */
+ @JsonProperty("status")
+ public MessageStatus getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets status.
+ *
+ * @param status
+ */
+ @JsonProperty("status")
+ public void setStatus(MessageStatus status) {
+ this.status = status;
+ }
+
+ /**
+ * Sets error.
+ *
+ * @param error
+ * @return This {@link NumberLookupLog instance}.
+ */
+ public NumberLookupLog error(MessageError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Returns error.
+ *
+ * @return error
+ */
+ @JsonProperty("error")
+ public MessageError getError() {
+ return error;
+ }
+
+ /**
+ * Sets error.
+ *
+ * @param error
+ */
+ @JsonProperty("error")
+ public void setError(MessageError error) {
+ this.error = error;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NumberLookupLog numberLookupLog = (NumberLookupLog) o;
+ return Objects.equals(this.bulkId, numberLookupLog.bulkId)
+ && Objects.equals(this.messageId, numberLookupLog.messageId)
+ && Objects.equals(this.to, numberLookupLog.to)
+ && Objects.equals(this.sentAt, numberLookupLog.sentAt)
+ && Objects.equals(this.doneAt, numberLookupLog.doneAt)
+ && Objects.equals(this.mccMnc, numberLookupLog.mccMnc)
+ && Objects.equals(this.price, numberLookupLog.price)
+ && Objects.equals(this.status, numberLookupLog.status)
+ && Objects.equals(this.error, numberLookupLog.error);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(bulkId, messageId, to, sentAt, doneAt, mccMnc, price, status, error);
+ }
+
+ @Override
+ public String toString() {
+ String newLine = System.lineSeparator();
+ return new StringBuilder()
+ .append("class NumberLookupLog {")
+ .append(newLine)
+ .append(" bulkId: ")
+ .append(toIndentedString(bulkId))
+ .append(newLine)
+ .append(" messageId: ")
+ .append(toIndentedString(messageId))
+ .append(newLine)
+ .append(" to: ")
+ .append(toIndentedString(to))
+ .append(newLine)
+ .append(" sentAt: ")
+ .append(toIndentedString(sentAt))
+ .append(newLine)
+ .append(" doneAt: ")
+ .append(toIndentedString(doneAt))
+ .append(newLine)
+ .append(" mccMnc: ")
+ .append(toIndentedString(mccMnc))
+ .append(newLine)
+ .append(" price: ")
+ .append(toIndentedString(price))
+ .append(newLine)
+ .append(" status: ")
+ .append(toIndentedString(status))
+ .append(newLine)
+ .append(" error: ")
+ .append(toIndentedString(error))
+ .append(newLine)
+ .append("}")
+ .toString();
+ }
+
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ String lineSeparator = System.lineSeparator();
+ String lineSeparatorFollowedByIndentation = lineSeparator + " ";
+ return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
+ }
+}
diff --git a/src/main/java/com/infobip/model/NumberLookupLogPrice.java b/src/main/java/com/infobip/model/NumberLookupLogPrice.java
new file mode 100644
index 00000000..dced5ba3
--- /dev/null
+++ b/src/main/java/com/infobip/model/NumberLookupLogPrice.java
@@ -0,0 +1,146 @@
+/*
+ * This class is auto generated from the Infobip OpenAPI specification
+ * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
+ * powered by the OpenAPI Generator (https://openapi-generator.tech).
+ *
+ * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
+ * or contact us @ support@infobip.com.
+ */
+
+package com.infobip.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Objects;
+
+/**
+ * Represents NumberLookupLogPrice model.
+ */
+public class NumberLookupLogPrice {
+
+ private String currency;
+
+ private Double pricePerLookup;
+
+ /**
+ * Sets currency.
+ *
+ * Field description:
+ * The currency in which the price is expressed.
+ *
+ * @param currency
+ * @return This {@link NumberLookupLogPrice instance}.
+ */
+ public NumberLookupLogPrice currency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * Returns currency.
+ *
+ * Field description:
+ * The currency in which the price is expressed.
+ *
+ * @return currency
+ */
+ @JsonProperty("currency")
+ public String getCurrency() {
+ return currency;
+ }
+
+ /**
+ * Sets currency.
+ *
+ * Field description:
+ * The currency in which the price is expressed.
+ *
+ * @param currency
+ */
+ @JsonProperty("currency")
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ /**
+ * Sets pricePerLookup.
+ *
+ * Field description:
+ * Price per one NC lookup.
+ *
+ * @param pricePerLookup
+ * @return This {@link NumberLookupLogPrice instance}.
+ */
+ public NumberLookupLogPrice pricePerLookup(Double pricePerLookup) {
+ this.pricePerLookup = pricePerLookup;
+ return this;
+ }
+
+ /**
+ * Returns pricePerLookup.
+ *
+ * Field description:
+ * Price per one NC lookup.
+ *
+ * @return pricePerLookup
+ */
+ @JsonProperty("pricePerLookup")
+ public Double getPricePerLookup() {
+ return pricePerLookup;
+ }
+
+ /**
+ * Sets pricePerLookup.
+ *
+ * Field description:
+ * Price per one NC lookup.
+ *
+ * @param pricePerLookup
+ */
+ @JsonProperty("pricePerLookup")
+ public void setPricePerLookup(Double pricePerLookup) {
+ this.pricePerLookup = pricePerLookup;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NumberLookupLogPrice numberLookupLogPrice = (NumberLookupLogPrice) o;
+ return Objects.equals(this.currency, numberLookupLogPrice.currency)
+ && Objects.equals(this.pricePerLookup, numberLookupLogPrice.pricePerLookup);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(currency, pricePerLookup);
+ }
+
+ @Override
+ public String toString() {
+ String newLine = System.lineSeparator();
+ return new StringBuilder()
+ .append("class NumberLookupLogPrice {")
+ .append(newLine)
+ .append(" currency: ")
+ .append(toIndentedString(currency))
+ .append(newLine)
+ .append(" pricePerLookup: ")
+ .append(toIndentedString(pricePerLookup))
+ .append(newLine)
+ .append("}")
+ .toString();
+ }
+
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ String lineSeparator = System.lineSeparator();
+ String lineSeparatorFollowedByIndentation = lineSeparator + " ";
+ return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
+ }
+}
diff --git a/src/main/java/com/infobip/model/NumberLookupLogResponse.java b/src/main/java/com/infobip/model/NumberLookupLogResponse.java
new file mode 100644
index 00000000..0ce550fe
--- /dev/null
+++ b/src/main/java/com/infobip/model/NumberLookupLogResponse.java
@@ -0,0 +1,119 @@
+/*
+ * This class is auto generated from the Infobip OpenAPI specification
+ * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
+ * powered by the OpenAPI Generator (https://openapi-generator.tech).
+ *
+ * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
+ * or contact us @ support@infobip.com.
+ */
+
+package com.infobip.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Represents NumberLookupLogResponse model.
+ */
+public class NumberLookupLogResponse {
+
+ private List
+ * Field description:
+ * Collection of logs.
+ *
+ * @param results
+ * @return This {@link NumberLookupLogResponse instance}.
+ */
+ public NumberLookupLogResponse results(List
+ * Field description:
+ * Collection of logs.
+ *
+ * @param resultsItem The item to be added to the list.
+ * @return This {@link NumberLookupLogResponse instance}.
+ */
+ public NumberLookupLogResponse addResultsItem(NumberLookupLog resultsItem) {
+ if (this.results == null) {
+ this.results = new ArrayList<>();
+ }
+ this.results.add(resultsItem);
+ return this;
+ }
+
+ /**
+ * Returns results.
+ *
+ * Field description:
+ * Collection of logs.
+ *
+ * @return results
+ */
+ @JsonProperty("results")
+ public List
+ * Field description:
+ * Collection of logs.
+ *
+ * @param results
+ */
+ @JsonProperty("results")
+ public void setResults(List
+ * Field description:
+ * Optional human readable name of the network.
+ *
+ * @param networkName
+ * @return This {@link NumberLookupNetwork instance}.
+ */
+ public NumberLookupNetwork networkName(String networkName) {
+ this.networkName = networkName;
+ return this;
+ }
+
+ /**
+ * Returns networkName.
+ *
+ * Field description:
+ * Optional human readable name of the network.
+ *
+ * @return networkName
+ */
+ @JsonProperty("networkName")
+ public String getNetworkName() {
+ return networkName;
+ }
+
+ /**
+ * Sets networkName.
+ *
+ * Field description:
+ * Optional human readable name of the network.
+ *
+ * @param networkName
+ */
+ @JsonProperty("networkName")
+ public void setNetworkName(String networkName) {
+ this.networkName = networkName;
+ }
+
+ /**
+ * Sets networkPrefix.
+ *
+ * Field description:
+ * Network prefix.
+ *
+ * @param networkPrefix
+ * @return This {@link NumberLookupNetwork instance}.
+ */
+ public NumberLookupNetwork networkPrefix(String networkPrefix) {
+ this.networkPrefix = networkPrefix;
+ return this;
+ }
+
+ /**
+ * Returns networkPrefix.
+ *
+ * Field description:
+ * Network prefix.
+ *
+ * @return networkPrefix
+ */
+ @JsonProperty("networkPrefix")
+ public String getNetworkPrefix() {
+ return networkPrefix;
+ }
+
+ /**
+ * Sets networkPrefix.
+ *
+ * Field description:
+ * Network prefix.
+ *
+ * @param networkPrefix
+ */
+ @JsonProperty("networkPrefix")
+ public void setNetworkPrefix(String networkPrefix) {
+ this.networkPrefix = networkPrefix;
+ }
+
+ /**
+ * Sets countryName.
+ *
+ * Field description:
+ * Optional name of the country the network operates in.
+ *
+ * @param countryName
+ * @return This {@link NumberLookupNetwork instance}.
+ */
+ public NumberLookupNetwork countryName(String countryName) {
+ this.countryName = countryName;
+ return this;
+ }
+
+ /**
+ * Returns countryName.
+ *
+ * Field description:
+ * Optional name of the country the network operates in.
+ *
+ * @return countryName
+ */
+ @JsonProperty("countryName")
+ public String getCountryName() {
+ return countryName;
+ }
+
+ /**
+ * Sets countryName.
+ *
+ * Field description:
+ * Optional name of the country the network operates in.
+ *
+ * @param countryName
+ */
+ @JsonProperty("countryName")
+ public void setCountryName(String countryName) {
+ this.countryName = countryName;
+ }
+
+ /**
+ * Sets countryPrefix.
+ *
+ * Field description:
+ * Country prefix.
+ *
+ * @param countryPrefix
+ * @return This {@link NumberLookupNetwork instance}.
+ */
+ public NumberLookupNetwork countryPrefix(String countryPrefix) {
+ this.countryPrefix = countryPrefix;
+ return this;
+ }
+
+ /**
+ * Returns countryPrefix.
+ *
+ * Field description:
+ * Country prefix.
+ *
+ * @return countryPrefix
+ */
+ @JsonProperty("countryPrefix")
+ public String getCountryPrefix() {
+ return countryPrefix;
+ }
+
+ /**
+ * Sets countryPrefix.
+ *
+ * Field description:
+ * Country prefix.
+ *
+ * @param countryPrefix
+ */
+ @JsonProperty("countryPrefix")
+ public void setCountryPrefix(String countryPrefix) {
+ this.countryPrefix = countryPrefix;
+ }
+
+ /**
+ * Sets networkId.
+ *
+ * Field description:
+ * ID of the network.
+ *
+ * @param networkId
+ * @return This {@link NumberLookupNetwork instance}.
+ */
+ public NumberLookupNetwork networkId(Integer networkId) {
+ this.networkId = networkId;
+ return this;
+ }
+
+ /**
+ * Returns networkId.
+ *
+ * Field description:
+ * ID of the network.
+ *
+ * @return networkId
+ */
+ @JsonProperty("networkId")
+ public Integer getNetworkId() {
+ return networkId;
+ }
+
+ /**
+ * Sets networkId.
+ *
+ * Field description:
+ * ID of the network.
+ *
+ * @param networkId
+ */
+ @JsonProperty("networkId")
+ public void setNetworkId(Integer networkId) {
+ this.networkId = networkId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NumberLookupNetwork numberLookupNetwork = (NumberLookupNetwork) o;
+ return Objects.equals(this.networkName, numberLookupNetwork.networkName)
+ && Objects.equals(this.networkPrefix, numberLookupNetwork.networkPrefix)
+ && Objects.equals(this.countryName, numberLookupNetwork.countryName)
+ && Objects.equals(this.countryPrefix, numberLookupNetwork.countryPrefix)
+ && Objects.equals(this.networkId, numberLookupNetwork.networkId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(networkName, networkPrefix, countryName, countryPrefix, networkId);
+ }
+
+ @Override
+ public String toString() {
+ String newLine = System.lineSeparator();
+ return new StringBuilder()
+ .append("class NumberLookupNetwork {")
+ .append(newLine)
+ .append(" networkName: ")
+ .append(toIndentedString(networkName))
+ .append(newLine)
+ .append(" networkPrefix: ")
+ .append(toIndentedString(networkPrefix))
+ .append(newLine)
+ .append(" countryName: ")
+ .append(toIndentedString(countryName))
+ .append(newLine)
+ .append(" countryPrefix: ")
+ .append(toIndentedString(countryPrefix))
+ .append(newLine)
+ .append(" networkId: ")
+ .append(toIndentedString(networkId))
+ .append(newLine)
+ .append("}")
+ .toString();
+ }
+
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ String lineSeparator = System.lineSeparator();
+ String lineSeparatorFollowedByIndentation = lineSeparator + " ";
+ return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
+ }
+}
diff --git a/src/main/java/com/infobip/model/NumberLookupNotifyRequest.java b/src/main/java/com/infobip/model/NumberLookupNotifyRequest.java
new file mode 100644
index 00000000..f23a39c2
--- /dev/null
+++ b/src/main/java/com/infobip/model/NumberLookupNotifyRequest.java
@@ -0,0 +1,219 @@
+/*
+ * This class is auto generated from the Infobip OpenAPI specification
+ * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
+ * powered by the OpenAPI Generator (https://openapi-generator.tech).
+ *
+ * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
+ * or contact us @ support@infobip.com.
+ */
+
+package com.infobip.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Represents NumberLookupNotifyRequest model.
+ */
+public class NumberLookupNotifyRequest {
+
+ private String notifyContentType;
+
+ private String notifyUrl;
+
+ private List
+ * Field description:
+ * Preferred lookup report content type. Can be `application/json` or `application/xml`.
+ *
+ * @param notifyContentType
+ * @return This {@link NumberLookupNotifyRequest instance}.
+ */
+ public NumberLookupNotifyRequest notifyContentType(String notifyContentType) {
+ this.notifyContentType = notifyContentType;
+ return this;
+ }
+
+ /**
+ * Returns notifyContentType.
+ *
+ * Field description:
+ * Preferred lookup report content type. Can be `application/json` or `application/xml`.
+ *
+ * @return notifyContentType
+ */
+ @JsonProperty("notifyContentType")
+ public String getNotifyContentType() {
+ return notifyContentType;
+ }
+
+ /**
+ * Sets notifyContentType.
+ *
+ * Field description:
+ * Preferred lookup report content type. Can be `application/json` or `application/xml`.
+ *
+ * @param notifyContentType
+ */
+ @JsonProperty("notifyContentType")
+ public void setNotifyContentType(String notifyContentType) {
+ this.notifyContentType = notifyContentType;
+ }
+
+ /**
+ * Sets notifyUrl.
+ *
+ * Field description:
+ * The URL on your call back server on which the lookup report will be sent.
+ *
+ * @param notifyUrl
+ * @return This {@link NumberLookupNotifyRequest instance}.
+ */
+ public NumberLookupNotifyRequest notifyUrl(String notifyUrl) {
+ this.notifyUrl = notifyUrl;
+ return this;
+ }
+
+ /**
+ * Returns notifyUrl.
+ *
+ * Field description:
+ * The URL on your call back server on which the lookup report will be sent.
+ *
+ * @return notifyUrl
+ */
+ @JsonProperty("notifyUrl")
+ public String getNotifyUrl() {
+ return notifyUrl;
+ }
+
+ /**
+ * Sets notifyUrl.
+ *
+ * Field description:
+ * The URL on your call back server on which the lookup report will be sent.
+ *
+ * @param notifyUrl
+ */
+ @JsonProperty("notifyUrl")
+ public void setNotifyUrl(String notifyUrl) {
+ this.notifyUrl = notifyUrl;
+ }
+
+ /**
+ * Sets to.
+ *
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @param to
+ * @return This {@link NumberLookupNotifyRequest instance}.
+ */
+ public NumberLookupNotifyRequest to(List
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @param toItem The item to be added to the list.
+ * @return This {@link NumberLookupNotifyRequest instance}.
+ */
+ public NumberLookupNotifyRequest addToItem(String toItem) {
+ if (this.to == null) {
+ this.to = new ArrayList<>();
+ }
+ this.to.add(toItem);
+ return this;
+ }
+
+ /**
+ * Returns to.
+ *
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @return to
+ */
+ @JsonProperty("to")
+ public List
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @param to
+ */
+ @JsonProperty("to")
+ public void setTo(List
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @param to
+ * @return This {@link NumberLookupQueryRequest instance}.
+ */
+ public NumberLookupQueryRequest to(List
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @param toItem The item to be added to the list.
+ * @return This {@link NumberLookupQueryRequest instance}.
+ */
+ public NumberLookupQueryRequest addToItem(String toItem) {
+ if (this.to == null) {
+ this.to = new ArrayList<>();
+ }
+ this.to.add(toItem);
+ return this;
+ }
+
+ /**
+ * Returns to.
+ *
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @return to
+ */
+ @JsonProperty("to")
+ public List
+ * Field description:
+ * Array of phone numbers to look up. Numbers must be in international format (Example: `41793026727`).
+ *
+ * The field is required.
+ *
+ * @param to
+ */
+ @JsonProperty("to")
+ public void setTo(List
+ * Field description:
+ * Collection of lookup results.
+ *
+ * @param results
+ * @return This {@link NumberLookupResponse instance}.
+ */
+ public NumberLookupResponse results(List
+ * Field description:
+ * Collection of lookup results.
+ *
+ * @param resultsItem The item to be added to the list.
+ * @return This {@link NumberLookupResponse instance}.
+ */
+ public NumberLookupResponse addResultsItem(NumberLookupResponseDetails resultsItem) {
+ if (this.results == null) {
+ this.results = new ArrayList<>();
+ }
+ this.results.add(resultsItem);
+ return this;
+ }
+
+ /**
+ * Returns results.
+ *
+ * Field description:
+ * Collection of lookup results.
+ *
+ * @return results
+ */
+ @JsonProperty("results")
+ public List
+ * Field description:
+ * Collection of lookup results.
+ *
+ * @param results
+ */
+ @JsonProperty("results")
+ public void setResults(List
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @param bulkId
+ * @return This {@link NumberLookupResponse instance}.
+ */
+ public NumberLookupResponse bulkId(String bulkId) {
+ this.bulkId = bulkId;
+ return this;
+ }
+
+ /**
+ * Returns bulkId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @return bulkId
+ */
+ @JsonProperty("bulkId")
+ public String getBulkId() {
+ return bulkId;
+ }
+
+ /**
+ * Sets bulkId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @param bulkId
+ */
+ @JsonProperty("bulkId")
+ public void setBulkId(String bulkId) {
+ this.bulkId = bulkId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NumberLookupResponse numberLookupResponse = (NumberLookupResponse) o;
+ return Objects.equals(this.results, numberLookupResponse.results)
+ && Objects.equals(this.bulkId, numberLookupResponse.bulkId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(results, bulkId);
+ }
+
+ @Override
+ public String toString() {
+ String newLine = System.lineSeparator();
+ return new StringBuilder()
+ .append("class NumberLookupResponse {")
+ .append(newLine)
+ .append(" results: ")
+ .append(toIndentedString(results))
+ .append(newLine)
+ .append(" bulkId: ")
+ .append(toIndentedString(bulkId))
+ .append(newLine)
+ .append("}")
+ .toString();
+ }
+
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ String lineSeparator = System.lineSeparator();
+ String lineSeparatorFollowedByIndentation = lineSeparator + " ";
+ return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
+ }
+}
diff --git a/src/main/java/com/infobip/model/NumberLookupResponseAsync.java b/src/main/java/com/infobip/model/NumberLookupResponseAsync.java
new file mode 100644
index 00000000..35eb0e1a
--- /dev/null
+++ b/src/main/java/com/infobip/model/NumberLookupResponseAsync.java
@@ -0,0 +1,165 @@
+/*
+ * This class is auto generated from the Infobip OpenAPI specification
+ * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
+ * powered by the OpenAPI Generator (https://openapi-generator.tech).
+ *
+ * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
+ * or contact us @ support@infobip.com.
+ */
+
+package com.infobip.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Represents NumberLookupResponseAsync model.
+ */
+public class NumberLookupResponseAsync {
+
+ private List
+ * Field description:
+ * Collection of preliminary lookup results.
+ *
+ * @param results
+ * @return This {@link NumberLookupResponseAsync instance}.
+ */
+ public NumberLookupResponseAsync results(List
+ * Field description:
+ * Collection of preliminary lookup results.
+ *
+ * @param resultsItem The item to be added to the list.
+ * @return This {@link NumberLookupResponseAsync instance}.
+ */
+ public NumberLookupResponseAsync addResultsItem(NumberLookupResponseAsyncDetails resultsItem) {
+ if (this.results == null) {
+ this.results = new ArrayList<>();
+ }
+ this.results.add(resultsItem);
+ return this;
+ }
+
+ /**
+ * Returns results.
+ *
+ * Field description:
+ * Collection of preliminary lookup results.
+ *
+ * @return results
+ */
+ @JsonProperty("results")
+ public List
+ * Field description:
+ * Collection of preliminary lookup results.
+ *
+ * @param results
+ */
+ @JsonProperty("results")
+ public void setResults(List
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @param bulkId
+ * @return This {@link NumberLookupResponseAsync instance}.
+ */
+ public NumberLookupResponseAsync bulkId(String bulkId) {
+ this.bulkId = bulkId;
+ return this;
+ }
+
+ /**
+ * Returns bulkId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @return bulkId
+ */
+ @JsonProperty("bulkId")
+ public String getBulkId() {
+ return bulkId;
+ }
+
+ /**
+ * Sets bulkId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the request.
+ *
+ * @param bulkId
+ */
+ @JsonProperty("bulkId")
+ public void setBulkId(String bulkId) {
+ this.bulkId = bulkId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NumberLookupResponseAsync numberLookupResponseAsync = (NumberLookupResponseAsync) o;
+ return Objects.equals(this.results, numberLookupResponseAsync.results)
+ && Objects.equals(this.bulkId, numberLookupResponseAsync.bulkId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(results, bulkId);
+ }
+
+ @Override
+ public String toString() {
+ String newLine = System.lineSeparator();
+ return new StringBuilder()
+ .append("class NumberLookupResponseAsync {")
+ .append(newLine)
+ .append(" results: ")
+ .append(toIndentedString(results))
+ .append(newLine)
+ .append(" bulkId: ")
+ .append(toIndentedString(bulkId))
+ .append(newLine)
+ .append("}")
+ .toString();
+ }
+
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ String lineSeparator = System.lineSeparator();
+ String lineSeparatorFollowedByIndentation = lineSeparator + " ";
+ return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
+ }
+}
diff --git a/src/main/java/com/infobip/model/NumberLookupResponseAsyncDetails.java b/src/main/java/com/infobip/model/NumberLookupResponseAsyncDetails.java
new file mode 100644
index 00000000..9ca3f1c2
--- /dev/null
+++ b/src/main/java/com/infobip/model/NumberLookupResponseAsyncDetails.java
@@ -0,0 +1,183 @@
+/*
+ * This class is auto generated from the Infobip OpenAPI specification
+ * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
+ * powered by the OpenAPI Generator (https://openapi-generator.tech).
+ *
+ * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
+ * or contact us @ support@infobip.com.
+ */
+
+package com.infobip.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Objects;
+
+/**
+ * Collection of preliminary lookup results.
+ */
+public class NumberLookupResponseAsyncDetails {
+
+ private String to;
+
+ private MessageStatus status;
+
+ private String messageId;
+
+ /**
+ * Sets to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @param to
+ * @return This {@link NumberLookupResponseAsyncDetails instance}.
+ */
+ public NumberLookupResponseAsyncDetails to(String to) {
+ this.to = to;
+ return this;
+ }
+
+ /**
+ * Returns to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @return to
+ */
+ @JsonProperty("to")
+ public String getTo() {
+ return to;
+ }
+
+ /**
+ * Sets to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @param to
+ */
+ @JsonProperty("to")
+ public void setTo(String to) {
+ this.to = to;
+ }
+
+ /**
+ * Sets status.
+ *
+ * @param status
+ * @return This {@link NumberLookupResponseAsyncDetails instance}.
+ */
+ public NumberLookupResponseAsyncDetails status(MessageStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Returns status.
+ *
+ * @return status
+ */
+ @JsonProperty("status")
+ public MessageStatus getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets status.
+ *
+ * @param status
+ */
+ @JsonProperty("status")
+ public void setStatus(MessageStatus status) {
+ this.status = status;
+ }
+
+ /**
+ * Sets messageId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the performed lookup.
+ *
+ * @param messageId
+ * @return This {@link NumberLookupResponseAsyncDetails instance}.
+ */
+ public NumberLookupResponseAsyncDetails messageId(String messageId) {
+ this.messageId = messageId;
+ return this;
+ }
+
+ /**
+ * Returns messageId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the performed lookup.
+ *
+ * @return messageId
+ */
+ @JsonProperty("messageId")
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Sets messageId.
+ *
+ * Field description:
+ * The ID that uniquely identifies the performed lookup.
+ *
+ * @param messageId
+ */
+ @JsonProperty("messageId")
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NumberLookupResponseAsyncDetails numberLookupResponseAsyncDetails = (NumberLookupResponseAsyncDetails) o;
+ return Objects.equals(this.to, numberLookupResponseAsyncDetails.to)
+ && Objects.equals(this.status, numberLookupResponseAsyncDetails.status)
+ && Objects.equals(this.messageId, numberLookupResponseAsyncDetails.messageId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(to, status, messageId);
+ }
+
+ @Override
+ public String toString() {
+ String newLine = System.lineSeparator();
+ return new StringBuilder()
+ .append("class NumberLookupResponseAsyncDetails {")
+ .append(newLine)
+ .append(" to: ")
+ .append(toIndentedString(to))
+ .append(newLine)
+ .append(" status: ")
+ .append(toIndentedString(status))
+ .append(newLine)
+ .append(" messageId: ")
+ .append(toIndentedString(messageId))
+ .append(newLine)
+ .append("}")
+ .toString();
+ }
+
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ String lineSeparator = System.lineSeparator();
+ String lineSeparatorFollowedByIndentation = lineSeparator + " ";
+ return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
+ }
+}
diff --git a/src/main/java/com/infobip/model/NumberLookupResponseDetails.java b/src/main/java/com/infobip/model/NumberLookupResponseDetails.java
new file mode 100644
index 00000000..c4fdf051
--- /dev/null
+++ b/src/main/java/com/infobip/model/NumberLookupResponseDetails.java
@@ -0,0 +1,526 @@
+/*
+ * This class is auto generated from the Infobip OpenAPI specification
+ * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
+ * powered by the OpenAPI Generator (https://openapi-generator.tech).
+ *
+ * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
+ * or contact us @ support@infobip.com.
+ */
+
+package com.infobip.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Objects;
+
+/**
+ * Collection of lookup results.
+ */
+public class NumberLookupResponseDetails {
+
+ private String to;
+
+ private String mccMnc;
+
+ private String imsi;
+
+ private NumberLookupNetwork originalNetwork;
+
+ private Boolean ported;
+
+ private NumberLookupNetwork portedNetwork;
+
+ private Boolean roaming;
+
+ private NumberLookupNetwork roamingNetwork;
+
+ private String servingMSC;
+
+ private MessageStatus status;
+
+ private MessageError error;
+
+ /**
+ * Sets to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @param to
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails to(String to) {
+ this.to = to;
+ return this;
+ }
+
+ /**
+ * Returns to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @return to
+ */
+ @JsonProperty("to")
+ public String getTo() {
+ return to;
+ }
+
+ /**
+ * Sets to.
+ *
+ * Field description:
+ * The looked up phone number.
+ *
+ * @param to
+ */
+ @JsonProperty("to")
+ public void setTo(String to) {
+ this.to = to;
+ }
+
+ /**
+ * Sets mccMnc.
+ *
+ * Field description:
+ * Mobile country code and mobile network code concatenated. MccMnc will start with the MCC, and it will always have three digits, followed by the MNC (length of the MNC depends on the value of the MCC, and it can be two or three).
+ *
+ * @param mccMnc
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails mccMnc(String mccMnc) {
+ this.mccMnc = mccMnc;
+ return this;
+ }
+
+ /**
+ * Returns mccMnc.
+ *
+ * Field description:
+ * Mobile country code and mobile network code concatenated. MccMnc will start with the MCC, and it will always have three digits, followed by the MNC (length of the MNC depends on the value of the MCC, and it can be two or three).
+ *
+ * @return mccMnc
+ */
+ @JsonProperty("mccMnc")
+ public String getMccMnc() {
+ return mccMnc;
+ }
+
+ /**
+ * Sets mccMnc.
+ *
+ * Field description:
+ * Mobile country code and mobile network code concatenated. MccMnc will start with the MCC, and it will always have three digits, followed by the MNC (length of the MNC depends on the value of the MCC, and it can be two or three).
+ *
+ * @param mccMnc
+ */
+ @JsonProperty("mccMnc")
+ public void setMccMnc(String mccMnc) {
+ this.mccMnc = mccMnc;
+ }
+
+ /**
+ * Sets imsi.
+ *
+ * Field description:
+ * International Mobile Subscriber Identity, used to uniquely identify the user of a mobile network.
+ *
+ * @param imsi
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails imsi(String imsi) {
+ this.imsi = imsi;
+ return this;
+ }
+
+ /**
+ * Returns imsi.
+ *
+ * Field description:
+ * International Mobile Subscriber Identity, used to uniquely identify the user of a mobile network.
+ *
+ * @return imsi
+ */
+ @JsonProperty("imsi")
+ public String getImsi() {
+ return imsi;
+ }
+
+ /**
+ * Sets imsi.
+ *
+ * Field description:
+ * International Mobile Subscriber Identity, used to uniquely identify the user of a mobile network.
+ *
+ * @param imsi
+ */
+ @JsonProperty("imsi")
+ public void setImsi(String imsi) {
+ this.imsi = imsi;
+ }
+
+ /**
+ * Sets originalNetwork.
+ *
+ * @param originalNetwork
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails originalNetwork(NumberLookupNetwork originalNetwork) {
+ this.originalNetwork = originalNetwork;
+ return this;
+ }
+
+ /**
+ * Returns originalNetwork.
+ *
+ * @return originalNetwork
+ */
+ @JsonProperty("originalNetwork")
+ public NumberLookupNetwork getOriginalNetwork() {
+ return originalNetwork;
+ }
+
+ /**
+ * Sets originalNetwork.
+ *
+ * @param originalNetwork
+ */
+ @JsonProperty("originalNetwork")
+ public void setOriginalNetwork(NumberLookupNetwork originalNetwork) {
+ this.originalNetwork = originalNetwork;
+ }
+
+ /**
+ * Sets ported.
+ *
+ * Field description:
+ * True if number has been ported.
+ *
+ * @param ported
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails ported(Boolean ported) {
+ this.ported = ported;
+ return this;
+ }
+
+ /**
+ * Returns ported.
+ *
+ * Field description:
+ * True if number has been ported.
+ *
+ * @return ported
+ */
+ @JsonProperty("ported")
+ public Boolean getPorted() {
+ return ported;
+ }
+
+ /**
+ * Sets ported.
+ *
+ * Field description:
+ * True if number has been ported.
+ *
+ * @param ported
+ */
+ @JsonProperty("ported")
+ public void setPorted(Boolean ported) {
+ this.ported = ported;
+ }
+
+ /**
+ * Sets portedNetwork.
+ *
+ * @param portedNetwork
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails portedNetwork(NumberLookupNetwork portedNetwork) {
+ this.portedNetwork = portedNetwork;
+ return this;
+ }
+
+ /**
+ * Returns portedNetwork.
+ *
+ * @return portedNetwork
+ */
+ @JsonProperty("portedNetwork")
+ public NumberLookupNetwork getPortedNetwork() {
+ return portedNetwork;
+ }
+
+ /**
+ * Sets portedNetwork.
+ *
+ * @param portedNetwork
+ */
+ @JsonProperty("portedNetwork")
+ public void setPortedNetwork(NumberLookupNetwork portedNetwork) {
+ this.portedNetwork = portedNetwork;
+ }
+
+ /**
+ * Sets roaming.
+ *
+ * Field description:
+ * True if number is currently in roaming.
+ *
+ * @param roaming
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails roaming(Boolean roaming) {
+ this.roaming = roaming;
+ return this;
+ }
+
+ /**
+ * Returns roaming.
+ *
+ * Field description:
+ * True if number is currently in roaming.
+ *
+ * @return roaming
+ */
+ @JsonProperty("roaming")
+ public Boolean getRoaming() {
+ return roaming;
+ }
+
+ /**
+ * Sets roaming.
+ *
+ * Field description:
+ * True if number is currently in roaming.
+ *
+ * @param roaming
+ */
+ @JsonProperty("roaming")
+ public void setRoaming(Boolean roaming) {
+ this.roaming = roaming;
+ }
+
+ /**
+ * Sets roamingNetwork.
+ *
+ * @param roamingNetwork
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails roamingNetwork(NumberLookupNetwork roamingNetwork) {
+ this.roamingNetwork = roamingNetwork;
+ return this;
+ }
+
+ /**
+ * Returns roamingNetwork.
+ *
+ * @return roamingNetwork
+ */
+ @JsonProperty("roamingNetwork")
+ public NumberLookupNetwork getRoamingNetwork() {
+ return roamingNetwork;
+ }
+
+ /**
+ * Sets roamingNetwork.
+ *
+ * @param roamingNetwork
+ */
+ @JsonProperty("roamingNetwork")
+ public void setRoamingNetwork(NumberLookupNetwork roamingNetwork) {
+ this.roamingNetwork = roamingNetwork;
+ }
+
+ /**
+ * Sets servingMSC.
+ *
+ * Field description:
+ * Serving mobile switching center.
+ *
+ * @param servingMSC
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails servingMSC(String servingMSC) {
+ this.servingMSC = servingMSC;
+ return this;
+ }
+
+ /**
+ * Returns servingMSC.
+ *
+ * Field description:
+ * Serving mobile switching center.
+ *
+ * @return servingMSC
+ */
+ @JsonProperty("servingMSC")
+ public String getServingMSC() {
+ return servingMSC;
+ }
+
+ /**
+ * Sets servingMSC.
+ *
+ * Field description:
+ * Serving mobile switching center.
+ *
+ * @param servingMSC
+ */
+ @JsonProperty("servingMSC")
+ public void setServingMSC(String servingMSC) {
+ this.servingMSC = servingMSC;
+ }
+
+ /**
+ * Sets status.
+ *
+ * @param status
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails status(MessageStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Returns status.
+ *
+ * @return status
+ */
+ @JsonProperty("status")
+ public MessageStatus getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets status.
+ *
+ * @param status
+ */
+ @JsonProperty("status")
+ public void setStatus(MessageStatus status) {
+ this.status = status;
+ }
+
+ /**
+ * Sets error.
+ *
+ * @param error
+ * @return This {@link NumberLookupResponseDetails instance}.
+ */
+ public NumberLookupResponseDetails error(MessageError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Returns error.
+ *
+ * @return error
+ */
+ @JsonProperty("error")
+ public MessageError getError() {
+ return error;
+ }
+
+ /**
+ * Sets error.
+ *
+ * @param error
+ */
+ @JsonProperty("error")
+ public void setError(MessageError error) {
+ this.error = error;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NumberLookupResponseDetails numberLookupResponseDetails = (NumberLookupResponseDetails) o;
+ return Objects.equals(this.to, numberLookupResponseDetails.to)
+ && Objects.equals(this.mccMnc, numberLookupResponseDetails.mccMnc)
+ && Objects.equals(this.imsi, numberLookupResponseDetails.imsi)
+ && Objects.equals(this.originalNetwork, numberLookupResponseDetails.originalNetwork)
+ && Objects.equals(this.ported, numberLookupResponseDetails.ported)
+ && Objects.equals(this.portedNetwork, numberLookupResponseDetails.portedNetwork)
+ && Objects.equals(this.roaming, numberLookupResponseDetails.roaming)
+ && Objects.equals(this.roamingNetwork, numberLookupResponseDetails.roamingNetwork)
+ && Objects.equals(this.servingMSC, numberLookupResponseDetails.servingMSC)
+ && Objects.equals(this.status, numberLookupResponseDetails.status)
+ && Objects.equals(this.error, numberLookupResponseDetails.error);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ to,
+ mccMnc,
+ imsi,
+ originalNetwork,
+ ported,
+ portedNetwork,
+ roaming,
+ roamingNetwork,
+ servingMSC,
+ status,
+ error);
+ }
+
+ @Override
+ public String toString() {
+ String newLine = System.lineSeparator();
+ return new StringBuilder()
+ .append("class NumberLookupResponseDetails {")
+ .append(newLine)
+ .append(" to: ")
+ .append(toIndentedString(to))
+ .append(newLine)
+ .append(" mccMnc: ")
+ .append(toIndentedString(mccMnc))
+ .append(newLine)
+ .append(" imsi: ")
+ .append(toIndentedString(imsi))
+ .append(newLine)
+ .append(" originalNetwork: ")
+ .append(toIndentedString(originalNetwork))
+ .append(newLine)
+ .append(" ported: ")
+ .append(toIndentedString(ported))
+ .append(newLine)
+ .append(" portedNetwork: ")
+ .append(toIndentedString(portedNetwork))
+ .append(newLine)
+ .append(" roaming: ")
+ .append(toIndentedString(roaming))
+ .append(newLine)
+ .append(" roamingNetwork: ")
+ .append(toIndentedString(roamingNetwork))
+ .append(newLine)
+ .append(" servingMSC: ")
+ .append(toIndentedString(servingMSC))
+ .append(newLine)
+ .append(" status: ")
+ .append(toIndentedString(status))
+ .append(newLine)
+ .append(" error: ")
+ .append(toIndentedString(error))
+ .append(newLine)
+ .append("}")
+ .toString();
+ }
+
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ String lineSeparator = System.lineSeparator();
+ String lineSeparatorFollowedByIndentation = lineSeparator + " ";
+ return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
+ }
+}
diff --git a/src/test/java/com/infobip/RequestFactoryTest.java b/src/test/java/com/infobip/RequestFactoryTest.java
index 6dad1357..e30217f1 100644
--- a/src/test/java/com/infobip/RequestFactoryTest.java
+++ b/src/test/java/com/infobip/RequestFactoryTest.java
@@ -38,7 +38,7 @@ class RequestFactoryTest {
private static final String GIVEN_API_KEY_VALUE = "apiKeyValue";
private static final ApiKey GIVEN_API_KEY = ApiKey.from(GIVEN_API_KEY_VALUE);
- private static final String EXPECTED_USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.4.1";
+ private static final String EXPECTED_USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.5.0";
private final OkHttpClient client = new OkHttpClient();
private final JSON json = new JSON();
diff --git a/src/test/java/com/infobip/api/NumberLookupApiTest.java b/src/test/java/com/infobip/api/NumberLookupApiTest.java
new file mode 100644
index 00000000..ee1e8b20
--- /dev/null
+++ b/src/test/java/com/infobip/api/NumberLookupApiTest.java
@@ -0,0 +1,455 @@
+package com.infobip.api;
+
+import static org.assertj.core.api.BDDAssertions.then;
+
+import com.infobip.model.*;
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import org.junit.jupiter.api.Test;
+
+class NumberLookupApiTest extends ApiTest {
+
+ private static final String NUMBER_CONTEXT_LOOKUP_ASYNC = "/number/1/notify";
+ private static final String NUMBER_CONTEXT_LOOKUP = "/number/1/query";
+ private static final String NUMBER_CONTEXT_LOGS = "/number/1/logs";
+
+ @Test
+ void shouldNumberContextLookupAsync() {
+ String givenNotifyContentType = "application/json";
+ String givenNotifyUrl = "https://www.example.com/number/lookup/report";
+ String givenTo1 = "41793026727";
+ String givenTo2 = "41793026834";
+
+ String givenResultTo1 = "3859851212";
+ Integer givenResultGroupId1 = 1;
+ String givenResultGroupName1 = "PENDING";
+ Integer givenResultStatusId1 = 3;
+ String givenResultStatusName1 = "PENDING_WAITING_DELIVERY";
+ String givenResultDescription1 = "Message sent, waiting for delivery report";
+ String givenResultMessageId1 = "2b691c32-1233-4716-a763-4f70cc929eae";
+
+ String givenResultTo2 = "3816038923";
+ Integer givenResultGroupId2 = 1;
+ String givenResultGroupName2 = "PENDING";
+ Integer givenResultStatusId2 = 3;
+ String givenResultStatusName2 = "PENDING_WAITING_DELIVERY";
+ String givenResultDescription2 = "Message sent, waiting for delivery report";
+ String givenResultMessageId2 = "24c753c7-8113-4983-9ddb-c50978ba47dc";
+
+ String givenBulkId = "BULK-ID-123-xyz";
+
+ String givenResponse = String.format(
+ "{\n"
+ + " \"results\": [\n"
+ + " {\n"
+ + " \"to\": \"%s\",\n"
+ + " \"status\": {\n"
+ + " \"groupId\": %d,\n"
+ + " \"groupName\": \"%s\",\n"
+ + " \"id\": %d,\n"
+ + " \"name\": \"%s\",\n"
+ + " \"description\": \"%s\"\n"
+ + " },\n"
+ + " \"messageId\": \"%s\"\n"
+ + " },\n"
+ + " {\n"
+ + " \"to\": \"%s\",\n"
+ + " \"status\": {\n"
+ + " \"groupId\": %d,\n"
+ + " \"groupName\": \"%s\",\n"
+ + " \"id\": %d,\n"
+ + " \"name\": \"%s\",\n"
+ + " \"description\": \"%s\"\n"
+ + " },\n"
+ + " \"messageId\": \"%s\"\n"
+ + " }\n"
+ + " ],\n"
+ + " \"bulkId\": \"%s\"\n"
+ + "}\n",
+ givenResultTo1,
+ givenResultGroupId1,
+ givenResultGroupName1,
+ givenResultStatusId1,
+ givenResultStatusName1,
+ givenResultDescription1,
+ givenResultMessageId1,
+ givenResultTo2,
+ givenResultGroupId2,
+ givenResultGroupName2,
+ givenResultStatusId2,
+ givenResultStatusName2,
+ givenResultDescription2,
+ givenResultMessageId2,
+ givenBulkId);
+
+ String expectedRequest = String.format(
+ "{\n"
+ + " \"notifyContentType\": \"%s\",\n"
+ + " \"notifyUrl\": \"%s\",\n"
+ + " \"to\": [\n"
+ + " \"%s\",\n"
+ + " \"%s\"\n"
+ + " ]\n"
+ + "}\n",
+ givenNotifyContentType, givenNotifyUrl, givenTo1, givenTo2);
+
+ setUpSuccessPostRequest(NUMBER_CONTEXT_LOOKUP_ASYNC, expectedRequest, givenResponse);
+
+ NumberLookupApi api = new NumberLookupApi(getApiClient());
+
+ NumberLookupNotifyRequest request = new NumberLookupNotifyRequest()
+ .notifyContentType(givenNotifyContentType)
+ .notifyUrl(givenNotifyUrl)
+ .to(List.of(givenTo1, givenTo2));
+
+ Consumer