diff --git a/.run/Run Demo.run.xml b/.run/Run Demo.run.xml
deleted file mode 100644
index ab7e1f7..0000000
--- a/.run/Run Demo.run.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e69de29..3336258 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -0,0 +1,2 @@
+## 1.0.0
+Initial release
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6fa8de5..7b138c7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -33,10 +33,10 @@ You should have the following things installed:
* Ensure that the JDK/Java-Version is correct
-## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/openapi-client-maven-template/release.yml?branch=master)](https://github.com/xdev-software/openapi-client-maven-template/actions/workflows/release.yml)
+## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/brevo-java-client/release.yml?branch=master)](https://github.com/xdev-software/brevo-java-client/actions/workflows/release.yml)
Before releasing:
-* Consider doing a [test-deployment](https://github.com/xdev-software/openapi-client-maven-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
+* Consider doing a [test-deployment](https://github.com/xdev-software/brevo-java-client/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
* Check the [changelog](CHANGELOG.md)
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes
diff --git a/README.md b/README.md
index bf4b7c7..c0d0a9d 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,38 @@
-[![Latest version](https://img.shields.io/maven-central/v/software.xdev/openapi-client-maven-template?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/openapi-client-maven-template)
-[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/openapi-client-maven-template/checkBuild.yml?branch=develop)](https://github.com/xdev-software/openapi-client-maven-template/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
-[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_openapi-client-maven-template&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_openapi-client-maven-template)
-[![API Specification Editor](https://img.shields.io/badge/API--Spec-Editor-85ea2d?logo=swagger)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/xdev-software/openapi-client-maven-template/develop/openapi/openapi.yml)
+[![Latest version](https://img.shields.io/maven-central/v/software.xdev/brevo-java-client?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/brevo-java-client)
+[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/brevo-java-client/checkBuild.yml?branch=develop)](https://github.com/xdev-software/brevo-java-client/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
+[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_brevo-java-client&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_brevo-java-client)
+[![API Specification Editor](https://img.shields.io/badge/API--Spec-Editor-85ea2d?logo=swagger)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/xdev-software/brevo-java-client/develop/openapi/openapi.yml)
-# openapi-client-maven-template
+# [brevo](https://brevo.com)-java-client
-This client [is generated](./openapi-client-maven-template/pom.xml) from an [``openapi.yml``](./openapi/openapi.yml) using [OpenAPI Generator](https://openapi-generator.tech/).
+A Java client for the [Brevo](https://brevo.com) (formerly [SendinBlue](https://help.brevo.com/hc/en-us/articles/11279317272722-FAQs-Sendinblue-becomes-Brevo)) API
+
+> [!IMPORTANT]
+> An API-Key is required.
+> You can get it at https://app.brevo.com/settings/keys/api
+
+This client [is generated](./brevo-java-client/pom.xml) from an [``openapi.yml``](./openapi/openapi.yml) using [OpenAPI Generator](https://openapi-generator.tech/).
+
+> [!NOTE]
+> Why did you create this API client and not use the official one?
+>
+> We had some problems (as of March 2024) with the "official" client:
+> * The client looks seriously outdated:
+> * it is still called "SendinBlue"
+> * was last updated over a year ago and there was no activity (on issues/PR) since then
+> * There is at least one CVE in the underlying HTTP client
+> * It looks like there are problems with the underlying dependencies:
+> * ``maven-gpg-plugin`` is declared as compile dependency
+> * There is a [dependency for Java 7](https://www.threeten.org/threetenbp/) however the client is built for Java 8+
+> * ...
+>
+>
## Installation
-[Installation guide for the latest release](https://github.com/xdev-software/openapi-client-maven-template/releases/latest#Installation)
+[Installation guide for the latest release](https://github.com/xdev-software/brevo-java-client/releases/latest#Installation)
## Demo
-A minimal demo is also available [here](./openapi-client-maven-template-demo/src/main/java/software/xdev/Application.java).
+A minimal demo is also available [here](./brevo-java-client-demo/src/main/java/software/xdev/Application.java).
## Support
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
@@ -20,4 +41,6 @@ If you need support as soon as possible and you can't wait for any pull request,
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
## Dependencies and Licenses
-View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/openapi-client-maven-template/dependencies/)
+View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/brevo-java-client/dependencies/)
+
+Disclaimer: This is not an official Brevo product and not associated with Brevo
diff --git a/SECURITY.md b/SECURITY.md
index 5c8df81..c15e549 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,4 +2,4 @@
## Reporting a Vulnerability
-Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/openapi-client-maven-template/security/advisories/new).
+Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/brevo-java-client/security/advisories/new).
diff --git a/openapi-client-maven-template-demo/pom.xml b/brevo-java-client-demo/pom.xml
similarity index 96%
rename from openapi-client-maven-template-demo/pom.xml
rename to brevo-java-client-demo/pom.xml
index d511190..b4e4625 100644
--- a/openapi-client-maven-template-demo/pom.xml
+++ b/brevo-java-client-demo/pom.xml
@@ -5,7 +5,7 @@
4.0.0
software.xdev
- openapi-client-maven-template-demo
+ brevo-java-client-demo
1.0.0-SNAPSHOT
jar
@@ -31,7 +31,7 @@
software.xdev
- openapi-client-maven-template
+ brevo-java-client
${project.version}
diff --git a/brevo-java-client-demo/src/main/java/software/xdev/Application.java b/brevo-java-client-demo/src/main/java/software/xdev/Application.java
new file mode 100644
index 0000000..c2d6383
--- /dev/null
+++ b/brevo-java-client-demo/src/main/java/software/xdev/Application.java
@@ -0,0 +1,107 @@
+package software.xdev;
+
+import java.util.List;
+import java.util.Optional;
+import java.util.Scanner;
+import java.util.function.Function;
+
+import org.apache.hc.core5.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import software.xdev.brevo.api.ContactsApi;
+import software.xdev.brevo.client.ApiClient;
+import software.xdev.brevo.client.ApiException;
+import software.xdev.brevo.model.CreateContact;
+import software.xdev.brevo.model.CreateUpdateContactModel;
+import software.xdev.brevo.model.GetContactInfoIdentifierParameter;
+import software.xdev.brevo.model.GetExtendedContactDetails;
+import software.xdev.brevo.model.UpdateContact;
+
+
+public final class Application
+{
+ private static final Logger LOG = LoggerFactory.getLogger(Application.class);
+
+ // Tries to add an email/contact to a list
+ public static void main(final String[] args)
+ {
+ final ApiClient apiClient = new ApiClient();
+ apiClient.setApiKey(getProperty("API-KEY", Function.identity()));
+ apiClient.setUserAgent("Brevo Java Client");
+
+ final long listId = getProperty("LIST-ID", Long::parseLong);
+ final String email = getProperty("EMAIL-FOR-LIST", Function.identity());
+
+ final ContactsApi contactsApi = new ContactsApi(apiClient);
+ try
+ {
+ final GetContactInfoIdentifierParameter identifier =
+ new GetContactInfoIdentifierStringParameter(email);
+ final GetExtendedContactDetails contactInfo = contactsApi.getContactInfo(
+ identifier,
+ null,
+ null);
+ LOG.info("Got contact[email={},listIds={}]", contactInfo.getEmail(), contactInfo.getListIds());
+ if(!contactInfo.getListIds().contains(listId))
+ {
+ contactsApi.updateContact(identifier, new UpdateContact().listIds(List.of(listId)));
+ LOG.info("Updated contact to include listId={}", listId);
+ }
+ }
+ catch(final ApiException ex)
+ {
+ if(ex.getCode() == HttpStatus.SC_NOT_FOUND)
+ {
+ final CreateUpdateContactModel createdContact = contactsApi.createContact(new CreateContact()
+ .email(email)
+ .listIds(List.of(listId)));
+ LOG.info("Created contact[id={}, email={},listIds={}]", createdContact.getId(), email, listId);
+ }
+ }
+ }
+
+ private static T getProperty(final String identifier, final Function caster)
+ {
+ String value = Optional.ofNullable(System.getenv(identifier))
+ .orElseGet(() -> System.getProperty(identifier));
+ if(value == null)
+ {
+ LOG.error("Required {} not set in environment variables or system properties", identifier);
+
+ LOG.info("Please provide {} over console:", identifier);
+ try(final Scanner scanner = new Scanner(System.in))
+ {
+ value = scanner.nextLine();
+ }
+
+ if(value == null || value.isBlank())
+ {
+ LOG.error("Invalid input; Aborting");
+ System.exit(1);
+ }
+ }
+ return caster.apply(value);
+ }
+
+ private Application()
+ {
+ }
+
+ @SuppressWarnings("java:S2160")
+ public static class GetContactInfoIdentifierStringParameter extends GetContactInfoIdentifierParameter
+ {
+ private final String value;
+
+ public GetContactInfoIdentifierStringParameter(final String value)
+ {
+ this.value = value;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.value;
+ }
+ }
+}
diff --git a/brevo-java-client-demo/src/main/resources/log4j2.xml b/brevo-java-client-demo/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..f492456
--- /dev/null
+++ b/brevo-java-client-demo/src/main/resources/log4j2.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ %d{HH:mm:ss} %-5p [%t] [%-25.25c] %m %n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/openapi-client-maven-template/pom.xml b/brevo-java-client/pom.xml
similarity index 93%
rename from openapi-client-maven-template/pom.xml
rename to brevo-java-client/pom.xml
index d4821de..07320cd 100644
--- a/openapi-client-maven-template/pom.xml
+++ b/brevo-java-client/pom.xml
@@ -5,20 +5,20 @@
4.0.0
software.xdev
- openapi-client-maven-template
+ brevo-java-client
1.0.0-SNAPSHOT
jar
- openapi-client-maven-template
- openapi-client-maven-template
- https://github.com/xdev-software/openapi-client-maven-template
+ brevo-java-client
+ brevo-java-client
+ https://github.com/xdev-software/brevo-java-client
- https://github.com/xdev-software/openapi-client-maven-template
- https://github.com/xdev-software/openapi-client-maven-template.git
+ https://github.com/xdev-software/brevo-java-client
+ https://github.com/xdev-software/brevo-java-client.git
- 2023
+ 2024
XDEV Software
@@ -283,7 +283,7 @@
openapi-generator
- INSERT_NAME_HERE
+ brevo
${project.basedir}/${generatedDirRelative}
src/gen
@@ -348,12 +348,12 @@
true
true
-
- false
- false
- false
- false
+
+ false
+ false
+ false
+ false
diff --git a/brevo-java-client/src/generated/java/software/xdev/brevo/api/AccountApi.java b/brevo-java-client/src/generated/java/software/xdev/brevo/api/AccountApi.java
new file mode 100644
index 0000000..623f7e4
--- /dev/null
+++ b/brevo-java-client/src/generated/java/software/xdev/brevo/api/AccountApi.java
@@ -0,0 +1,202 @@
+/*
+ * Brevo API
+ * Brevo API documentation by XDEV Software based on https://api.brevo.com/v3/swagger_definition_v3.yml
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package software.xdev.brevo.api;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+
+import software.xdev.brevo.client.ApiException;
+import software.xdev.brevo.client.ApiClient;
+import software.xdev.brevo.client.Configuration;
+import software.xdev.brevo.client.Pair;
+
+import software.xdev.brevo.model.ErrorModel;
+import software.xdev.brevo.model.GetAccount;
+import software.xdev.brevo.model.GetAccountActivity;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringJoiner;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AccountApi {
+
+
+ private ApiClient apiClient;
+
+ public AccountApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AccountApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get your account information, plan and credits details
+ *
+ * @return GetAccount
+ * @throws ApiException if fails to make API call
+ */
+ public GetAccount getAccount() throws ApiException {
+ return this.getAccount(Collections.emptyMap());
+ }
+
+
+ /**
+ * Get your account information, plan and credits details
+ *
+ * @param additionalHeaders additionalHeaders for this call
+ * @return GetAccount
+ * @throws ApiException if fails to make API call
+ */
+ public GetAccount getAccount(Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/account";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Get user activity logs
+ *
+ * @param startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional)
+ * @param endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional)
+ * @param limit Number of documents per page (optional, default to 10)
+ * @param offset Index of the first document in the page. (optional, default to 0)
+ * @return GetAccountActivity
+ * @throws ApiException if fails to make API call
+ */
+ public GetAccountActivity getAccountActivity(String startDate, String endDate, Long limit, Long offset) throws ApiException {
+ return this.getAccountActivity(startDate, endDate, limit, offset, Collections.emptyMap());
+ }
+
+
+ /**
+ * Get user activity logs
+ *
+ * @param startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional)
+ * @param endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional)
+ * @param limit Number of documents per page (optional, default to 10)
+ * @param offset Index of the first document in the page. (optional, default to 0)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return GetAccountActivity
+ * @throws ApiException if fails to make API call
+ */
+ public GetAccountActivity getAccountActivity(String startDate, String endDate, Long limit, Long offset, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/organization/activities";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPair("startDate", startDate));
+ localVarQueryParams.addAll(apiClient.parameterToPair("endDate", endDate));
+ localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
+ localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset));
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+}
diff --git a/brevo-java-client/src/generated/java/software/xdev/brevo/api/CompaniesApi.java b/brevo-java-client/src/generated/java/software/xdev/brevo/api/CompaniesApi.java
new file mode 100644
index 0000000..fdf85a4
--- /dev/null
+++ b/brevo-java-client/src/generated/java/software/xdev/brevo/api/CompaniesApi.java
@@ -0,0 +1,598 @@
+/*
+ * Brevo API
+ * Brevo API documentation by XDEV Software based on https://api.brevo.com/v3/swagger_definition_v3.yml
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package software.xdev.brevo.api;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+
+import software.xdev.brevo.client.ApiException;
+import software.xdev.brevo.client.ApiClient;
+import software.xdev.brevo.client.Configuration;
+import software.xdev.brevo.client.Pair;
+
+import software.xdev.brevo.model.CompaniesIdPatchRequest;
+import software.xdev.brevo.model.CompaniesLinkUnlinkIdPatchRequest;
+import software.xdev.brevo.model.CompaniesList;
+import software.xdev.brevo.model.CompaniesPost200Response;
+import software.xdev.brevo.model.CompaniesPostRequest;
+import software.xdev.brevo.model.Company;
+import software.xdev.brevo.model.CompanyAttributesInner;
+import software.xdev.brevo.model.ErrorModel;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringJoiner;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class CompaniesApi {
+
+
+ private ApiClient apiClient;
+
+ public CompaniesApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public CompaniesApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get company attributes
+ *
+ * @return List<CompanyAttributesInner>
+ * @throws ApiException if fails to make API call
+ */
+ public List companiesAttributesGet() throws ApiException {
+ return this.companiesAttributesGet(Collections.emptyMap());
+ }
+
+
+ /**
+ * Get company attributes
+ *
+ * @param additionalHeaders additionalHeaders for this call
+ * @return List<CompanyAttributesInner>
+ * @throws ApiException if fails to make API call
+ */
+ public List companiesAttributesGet(Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/companies/attributes";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference> localVarReturnType = new TypeReference>() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Get all Companies
+ *
+ * @param filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"6299dcf3874a14eacbc65c46\"} (optional)
+ * @param linkedContactsIds Filter by linked contacts ids (optional)
+ * @param linkedDealsIds Filter by linked Deals ids (optional)
+ * @param page Index of the first document of the page (optional)
+ * @param limit Number of documents per page (optional)
+ * @param sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional)
+ * @param sortBy The field used to sort field names. (optional)
+ * @return CompaniesList
+ * @throws ApiException if fails to make API call
+ */
+ public CompaniesList companiesGet(String filters, Long linkedContactsIds, String linkedDealsIds, Long page, Long limit, String sort, String sortBy) throws ApiException {
+ return this.companiesGet(filters, linkedContactsIds, linkedDealsIds, page, limit, sort, sortBy, Collections.emptyMap());
+ }
+
+
+ /**
+ * Get all Companies
+ *
+ * @param filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"6299dcf3874a14eacbc65c46\"} (optional)
+ * @param linkedContactsIds Filter by linked contacts ids (optional)
+ * @param linkedDealsIds Filter by linked Deals ids (optional)
+ * @param page Index of the first document of the page (optional)
+ * @param limit Number of documents per page (optional)
+ * @param sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional)
+ * @param sortBy The field used to sort field names. (optional)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return CompaniesList
+ * @throws ApiException if fails to make API call
+ */
+ public CompaniesList companiesGet(String filters, Long linkedContactsIds, String linkedDealsIds, Long page, Long limit, String sort, String sortBy, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/companies";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPair("filters", filters));
+ localVarQueryParams.addAll(apiClient.parameterToPair("linkedContactsIds", linkedContactsIds));
+ localVarQueryParams.addAll(apiClient.parameterToPair("linkedDealsIds", linkedDealsIds));
+ localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
+ localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
+ localVarQueryParams.addAll(apiClient.parameterToPair("sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPair("sortBy", sortBy));
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Delete a company
+ *
+ * @param id Company ID to delete (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void companiesIdDelete(String id) throws ApiException {
+ this.companiesIdDelete(id, Collections.emptyMap());
+ }
+
+
+ /**
+ * Delete a company
+ *
+ * @param id Company ID to delete (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void companiesIdDelete(String id, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(400, "Missing the required parameter 'id' when calling companiesIdDelete");
+ }
+
+ // create path and map variables
+ String localVarPath = "/companies/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "DELETE",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * Get a company
+ *
+ * @param id Get Company Details (required)
+ * @return Company
+ * @throws ApiException if fails to make API call
+ */
+ public Company companiesIdGet(String id) throws ApiException {
+ return this.companiesIdGet(id, Collections.emptyMap());
+ }
+
+
+ /**
+ * Get a company
+ *
+ * @param id Get Company Details (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return Company
+ * @throws ApiException if fails to make API call
+ */
+ public Company companiesIdGet(String id, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(400, "Missing the required parameter 'id' when calling companiesIdGet");
+ }
+
+ // create path and map variables
+ String localVarPath = "/companies/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Update a company
+ *
+ * @param id (required)
+ * @param companiesIdPatchRequest Updated company details. (required)
+ * @return Company
+ * @throws ApiException if fails to make API call
+ */
+ public Company companiesIdPatch(String id, CompaniesIdPatchRequest companiesIdPatchRequest) throws ApiException {
+ return this.companiesIdPatch(id, companiesIdPatchRequest, Collections.emptyMap());
+ }
+
+
+ /**
+ * Update a company
+ *
+ * @param id (required)
+ * @param companiesIdPatchRequest Updated company details. (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return Company
+ * @throws ApiException if fails to make API call
+ */
+ public Company companiesIdPatch(String id, CompaniesIdPatchRequest companiesIdPatchRequest, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = companiesIdPatchRequest;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(400, "Missing the required parameter 'id' when calling companiesIdPatch");
+ }
+
+ // verify the required parameter 'companiesIdPatchRequest' is set
+ if (companiesIdPatchRequest == null) {
+ throw new ApiException(400, "Missing the required parameter 'companiesIdPatchRequest' when calling companiesIdPatch");
+ }
+
+ // create path and map variables
+ String localVarPath = "/companies/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "PATCH",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Link and Unlink company with contact and deal
+ *
+ * @param id (required)
+ * @param companiesLinkUnlinkIdPatchRequest Linked / Unlinked contacts and deals ids. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void companiesLinkUnlinkIdPatch(String id, CompaniesLinkUnlinkIdPatchRequest companiesLinkUnlinkIdPatchRequest) throws ApiException {
+ this.companiesLinkUnlinkIdPatch(id, companiesLinkUnlinkIdPatchRequest, Collections.emptyMap());
+ }
+
+
+ /**
+ * Link and Unlink company with contact and deal
+ *
+ * @param id (required)
+ * @param companiesLinkUnlinkIdPatchRequest Linked / Unlinked contacts and deals ids. (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void companiesLinkUnlinkIdPatch(String id, CompaniesLinkUnlinkIdPatchRequest companiesLinkUnlinkIdPatchRequest, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = companiesLinkUnlinkIdPatchRequest;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(400, "Missing the required parameter 'id' when calling companiesLinkUnlinkIdPatch");
+ }
+
+ // verify the required parameter 'companiesLinkUnlinkIdPatchRequest' is set
+ if (companiesLinkUnlinkIdPatchRequest == null) {
+ throw new ApiException(400, "Missing the required parameter 'companiesLinkUnlinkIdPatchRequest' when calling companiesLinkUnlinkIdPatch");
+ }
+
+ // create path and map variables
+ String localVarPath = "/companies/link-unlink/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "PATCH",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * Create a company
+ *
+ * @param companiesPostRequest Company create data. (required)
+ * @return CompaniesPost200Response
+ * @throws ApiException if fails to make API call
+ */
+ public CompaniesPost200Response companiesPost(CompaniesPostRequest companiesPostRequest) throws ApiException {
+ return this.companiesPost(companiesPostRequest, Collections.emptyMap());
+ }
+
+
+ /**
+ * Create a company
+ *
+ * @param companiesPostRequest Company create data. (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return CompaniesPost200Response
+ * @throws ApiException if fails to make API call
+ */
+ public CompaniesPost200Response companiesPost(CompaniesPostRequest companiesPostRequest, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = companiesPostRequest;
+
+ // verify the required parameter 'companiesPostRequest' is set
+ if (companiesPostRequest == null) {
+ throw new ApiException(400, "Missing the required parameter 'companiesPostRequest' when calling companiesPost");
+ }
+
+ // create path and map variables
+ String localVarPath = "/companies";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+}
diff --git a/brevo-java-client/src/generated/java/software/xdev/brevo/api/ContactsApi.java b/brevo-java-client/src/generated/java/software/xdev/brevo/api/ContactsApi.java
new file mode 100644
index 0000000..86e30ad
--- /dev/null
+++ b/brevo-java-client/src/generated/java/software/xdev/brevo/api/ContactsApi.java
@@ -0,0 +1,2347 @@
+/*
+ * Brevo API
+ * Brevo API documentation by XDEV Software based on https://api.brevo.com/v3/swagger_definition_v3.yml
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package software.xdev.brevo.api;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+
+import software.xdev.brevo.client.ApiException;
+import software.xdev.brevo.client.ApiClient;
+import software.xdev.brevo.client.Configuration;
+import software.xdev.brevo.client.Pair;
+
+import software.xdev.brevo.model.AddContactToListRequest;
+import software.xdev.brevo.model.CreateAttribute;
+import software.xdev.brevo.model.CreateContact;
+import software.xdev.brevo.model.CreateDoiContact;
+import software.xdev.brevo.model.CreateList;
+import software.xdev.brevo.model.CreateModel;
+import software.xdev.brevo.model.CreateUpdateContactModel;
+import software.xdev.brevo.model.CreateUpdateFolder;
+import software.xdev.brevo.model.CreatedProcessId;
+import software.xdev.brevo.model.ErrorModel;
+import software.xdev.brevo.model.GetAttributes;
+import software.xdev.brevo.model.GetContactCampaignStats;
+import software.xdev.brevo.model.GetContactInfoIdentifierParameter;
+import software.xdev.brevo.model.GetContacts;
+import software.xdev.brevo.model.GetExtendedContactDetails;
+import software.xdev.brevo.model.GetExtendedList;
+import software.xdev.brevo.model.GetFolder;
+import software.xdev.brevo.model.GetFolderLists;
+import software.xdev.brevo.model.GetFolders;
+import software.xdev.brevo.model.GetLists;
+import software.xdev.brevo.model.GetSegments;
+import software.xdev.brevo.model.PostContactInfo;
+import software.xdev.brevo.model.RemoveContactFromListRequest;
+import software.xdev.brevo.model.RequestContactExport;
+import software.xdev.brevo.model.RequestContactImport;
+import software.xdev.brevo.model.UpdateAttribute;
+import software.xdev.brevo.model.UpdateBatchContacts;
+import software.xdev.brevo.model.UpdateContact;
+import software.xdev.brevo.model.UpdateList;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringJoiner;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class ContactsApi {
+
+
+ private ApiClient apiClient;
+
+ public ContactsApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public ContactsApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Add existing contacts to a list
+ *
+ * @param listId Id of the list (required)
+ * @param addContactToListRequest Emails addresses OR IDs of the contacts (required)
+ * @return PostContactInfo
+ * @throws ApiException if fails to make API call
+ */
+ public PostContactInfo addContactToList(Long listId, AddContactToListRequest addContactToListRequest) throws ApiException {
+ return this.addContactToList(listId, addContactToListRequest, Collections.emptyMap());
+ }
+
+
+ /**
+ * Add existing contacts to a list
+ *
+ * @param listId Id of the list (required)
+ * @param addContactToListRequest Emails addresses OR IDs of the contacts (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return PostContactInfo
+ * @throws ApiException if fails to make API call
+ */
+ public PostContactInfo addContactToList(Long listId, AddContactToListRequest addContactToListRequest, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = addContactToListRequest;
+
+ // verify the required parameter 'listId' is set
+ if (listId == null) {
+ throw new ApiException(400, "Missing the required parameter 'listId' when calling addContactToList");
+ }
+
+ // verify the required parameter 'addContactToListRequest' is set
+ if (addContactToListRequest == null) {
+ throw new ApiException(400, "Missing the required parameter 'addContactToListRequest' when calling addContactToList");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/lists/{listId}/contacts/add"
+ .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Create contact attribute
+ *
+ * @param attributeCategory Category of the attribute (required)
+ * @param attributeName Name of the attribute (required)
+ * @param createAttribute Values to create an attribute (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void createAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute) throws ApiException {
+ this.createAttribute(attributeCategory, attributeName, createAttribute, Collections.emptyMap());
+ }
+
+
+ /**
+ * Create contact attribute
+ *
+ * @param attributeCategory Category of the attribute (required)
+ * @param attributeName Name of the attribute (required)
+ * @param createAttribute Values to create an attribute (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void createAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = createAttribute;
+
+ // verify the required parameter 'attributeCategory' is set
+ if (attributeCategory == null) {
+ throw new ApiException(400, "Missing the required parameter 'attributeCategory' when calling createAttribute");
+ }
+
+ // verify the required parameter 'attributeName' is set
+ if (attributeName == null) {
+ throw new ApiException(400, "Missing the required parameter 'attributeName' when calling createAttribute");
+ }
+
+ // verify the required parameter 'createAttribute' is set
+ if (createAttribute == null) {
+ throw new ApiException(400, "Missing the required parameter 'createAttribute' when calling createAttribute");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"
+ .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString()))
+ .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * Create a contact
+ *
+ * @param createContact Values to create a contact (required)
+ * @return CreateUpdateContactModel
+ * @throws ApiException if fails to make API call
+ */
+ public CreateUpdateContactModel createContact(CreateContact createContact) throws ApiException {
+ return this.createContact(createContact, Collections.emptyMap());
+ }
+
+
+ /**
+ * Create a contact
+ *
+ * @param createContact Values to create a contact (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return CreateUpdateContactModel
+ * @throws ApiException if fails to make API call
+ */
+ public CreateUpdateContactModel createContact(CreateContact createContact, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = createContact;
+
+ // verify the required parameter 'createContact' is set
+ if (createContact == null) {
+ throw new ApiException(400, "Missing the required parameter 'createContact' when calling createContact");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Create Contact via DOI (Double-Opt-In) Flow
+ *
+ * @param createDoiContact Values to create the Double opt-in (DOI) contact (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void createDoiContact(CreateDoiContact createDoiContact) throws ApiException {
+ this.createDoiContact(createDoiContact, Collections.emptyMap());
+ }
+
+
+ /**
+ * Create Contact via DOI (Double-Opt-In) Flow
+ *
+ * @param createDoiContact Values to create the Double opt-in (DOI) contact (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void createDoiContact(CreateDoiContact createDoiContact, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = createDoiContact;
+
+ // verify the required parameter 'createDoiContact' is set
+ if (createDoiContact == null) {
+ throw new ApiException(400, "Missing the required parameter 'createDoiContact' when calling createDoiContact");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/doubleOptinConfirmation";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * Create a folder
+ *
+ * @param createFolder Name of the folder (required)
+ * @return CreateModel
+ * @throws ApiException if fails to make API call
+ */
+ public CreateModel createFolder(CreateUpdateFolder createFolder) throws ApiException {
+ return this.createFolder(createFolder, Collections.emptyMap());
+ }
+
+
+ /**
+ * Create a folder
+ *
+ * @param createFolder Name of the folder (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return CreateModel
+ * @throws ApiException if fails to make API call
+ */
+ public CreateModel createFolder(CreateUpdateFolder createFolder, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = createFolder;
+
+ // verify the required parameter 'createFolder' is set
+ if (createFolder == null) {
+ throw new ApiException(400, "Missing the required parameter 'createFolder' when calling createFolder");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/folders";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Create a list
+ *
+ * @param createList Values to create a list (required)
+ * @return CreateModel
+ * @throws ApiException if fails to make API call
+ */
+ public CreateModel createList(CreateList createList) throws ApiException {
+ return this.createList(createList, Collections.emptyMap());
+ }
+
+
+ /**
+ * Create a list
+ *
+ * @param createList Values to create a list (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return CreateModel
+ * @throws ApiException if fails to make API call
+ */
+ public CreateModel createList(CreateList createList, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = createList;
+
+ // verify the required parameter 'createList' is set
+ if (createList == null) {
+ throw new ApiException(400, "Missing the required parameter 'createList' when calling createList");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/lists";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Delete an attribute
+ *
+ * @param attributeCategory Category of the attribute (required)
+ * @param attributeName Name of the existing attribute (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteAttribute(String attributeCategory, String attributeName) throws ApiException {
+ this.deleteAttribute(attributeCategory, attributeName, Collections.emptyMap());
+ }
+
+
+ /**
+ * Delete an attribute
+ *
+ * @param attributeCategory Category of the attribute (required)
+ * @param attributeName Name of the existing attribute (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteAttribute(String attributeCategory, String attributeName, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'attributeCategory' is set
+ if (attributeCategory == null) {
+ throw new ApiException(400, "Missing the required parameter 'attributeCategory' when calling deleteAttribute");
+ }
+
+ // verify the required parameter 'attributeName' is set
+ if (attributeName == null) {
+ throw new ApiException(400, "Missing the required parameter 'attributeName' when calling deleteAttribute");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"
+ .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString()))
+ .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "DELETE",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * Delete a contact
+ *
+ * @param identifier Email (urlencoded) OR ID of the contact (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteContact(GetContactInfoIdentifierParameter identifier) throws ApiException {
+ this.deleteContact(identifier, Collections.emptyMap());
+ }
+
+
+ /**
+ * Delete a contact
+ *
+ * @param identifier Email (urlencoded) OR ID of the contact (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteContact(GetContactInfoIdentifierParameter identifier, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'identifier' is set
+ if (identifier == null) {
+ throw new ApiException(400, "Missing the required parameter 'identifier' when calling deleteContact");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/{identifier}"
+ .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "DELETE",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * Delete a folder (and all its lists)
+ *
+ * @param folderId Id of the folder (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteFolder(Long folderId) throws ApiException {
+ this.deleteFolder(folderId, Collections.emptyMap());
+ }
+
+
+ /**
+ * Delete a folder (and all its lists)
+ *
+ * @param folderId Id of the folder (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteFolder(Long folderId, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'folderId' is set
+ if (folderId == null) {
+ throw new ApiException(400, "Missing the required parameter 'folderId' when calling deleteFolder");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/folders/{folderId}"
+ .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "DELETE",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * Delete a list
+ *
+ * @param listId Id of the list (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteList(Long listId) throws ApiException {
+ this.deleteList(listId, Collections.emptyMap());
+ }
+
+
+ /**
+ * Delete a list
+ *
+ * @param listId Id of the list (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteList(Long listId, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'listId' is set
+ if (listId == null) {
+ throw new ApiException(400, "Missing the required parameter 'listId' when calling deleteList");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/lists/{listId}"
+ .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "DELETE",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ * List all attributes
+ *
+ * @return GetAttributes
+ * @throws ApiException if fails to make API call
+ */
+ public GetAttributes getAttributes() throws ApiException {
+ return this.getAttributes(Collections.emptyMap());
+ }
+
+
+ /**
+ * List all attributes
+ *
+ * @param additionalHeaders additionalHeaders for this call
+ * @return GetAttributes
+ * @throws ApiException if fails to make API call
+ */
+ public GetAttributes getAttributes(Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/contacts/attributes";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "api-key" };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Get a contact's details
+ * Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.
+ * @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required)
+ * @param startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)
+ * @param endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional)
+ * @return GetExtendedContactDetails
+ * @throws ApiException if fails to make API call
+ */
+ public GetExtendedContactDetails getContactInfo(GetContactInfoIdentifierParameter identifier, String startDate, String endDate) throws ApiException {
+ return this.getContactInfo(identifier, startDate, endDate, Collections.emptyMap());
+ }
+
+
+ /**
+ * Get a contact's details
+ * Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.
+ * @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required)
+ * @param startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)
+ * @param endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return GetExtendedContactDetails
+ * @throws ApiException if fails to make API call
+ */
+ public GetExtendedContactDetails getContactInfo(GetContactInfoIdentifierParameter identifier, String startDate, String endDate, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'identifier' is set
+ if (identifier == null) {
+ throw new ApiException(400, "Missing the required parameter 'identifier' when calling getContactInfo");
+ }
+
+ // create path and map variables
+ String localVarPath = "/contacts/{identifier}"
+ .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList