diff --git a/.github/settings.xml b/.github/settings.xml
new file mode 100644
index 0000000..6cc0fe2
--- /dev/null
+++ b/.github/settings.xml
@@ -0,0 +1,19 @@
+
+
+
+
+ github
+ ${env.MAVEN_USERNAME}
+ ${env.MAVEN_PASSWORD}
+
+
+ central
+ ${{env.OSSRH_USERNAME_TOKEN }}
+ ${{env.OSSRH_PASSWORD_TOKEN }}
+
+
+
+
\ No newline at end of file
diff --git a/.github/workflows/maven-central.yml b/.github/workflows/maven-central.yml
new file mode 100644
index 0000000..3116191
--- /dev/null
+++ b/.github/workflows/maven-central.yml
@@ -0,0 +1,98 @@
+name: Publish to Maven Central
+
+on:
+ push:
+ tags:
+ - 'v*'
+ branches:
+ - 'feature/release-*'
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: maven
+
+ - name: Setup GPG
+ env:
+ GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
+ GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+ run: |
+ echo "Setting up GPG..."
+ mkdir -p ~/.gnupg
+ chmod 700 ~/.gnupg
+
+ # Debug: Sprawdź długość klucza
+ echo "GPG_PRIVATE_KEY length: ${#GPG_PRIVATE_KEY}"
+
+ # Debug: Sprawdź początek klucza (bez ujawniania tajemnicy)
+ echo "GPG_KEYNAME: $GPG_KEYNAME"
+ echo "GPG_PASSPHRASE length: ${#GPG_PASSPHRASE}"
+ echo "First 10 chars of GPG_PRIVATE_KEY: ${GPG_PRIVATE_KEY:0:10}"
+
+ # Tepporary write key for debug
+ echo "$GPG_PRIVATE_KEY" > private.tmp
+ echo "File content (first line): $(head -1 private.tmp)"
+
+ # Import key
+ echo "Importing GPG key..."
+ gpg --batch --import private.tmp || echo "Import failed!"
+ rm private.tmp
+
+ - name: Configure Maven
+ run: |
+ mkdir -p ~/.m2
+ cat > ~/.m2/settings.xml << EOF
+
+
+
+ central
+ ${{ secrets.OSSRH_USERNAME_TOKEN }}
+ ${{ secrets.OSSRH_PASSWORD_TOKEN }}
+
+
+
+
+ central
+
+ true
+
+
+ gpg
+ ${{ secrets.GPG_PASSPHRASE }}
+
+
+
+
+ EOF
+
+ - name: Build and Publish
+ env:
+ OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }}
+ OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD_TOKEN }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+ GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
+ run: |
+ echo "Starting Maven build and deploy..."
+ mvn clean deploy -P release \
+ -Dmaven.javadoc.skip=false \
+ -Dmaven.deploy.skip=false \
+ -Dgpg.keyname=$GPG_KEYNAME \
+ -Dgpg.useagent=false \
+ -Dgpg.passphrase=$GPG_PASSPHRASE \
+ -Dmaven.test.failure.ignore=false \
+ -DaltDeploymentRepository=ossrh::default::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
+ -DrepositoryId=ossrh \
+ -Dusername=$OSSRH_USERNAME \
+ -Dpassword=$OSSRH_PASSWORD
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..70ddbe7
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,39 @@
+name: Build and Publish
+
+on:
+ push:
+ branches: [ main ]
+ tags:
+ - 'v*'
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ packages: write
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: 'maven'
+ - name: Build
+ run: mvn clean install -Dmaven.javadoc.skip=true
+ - name: Create Release
+ if: startsWith(github.ref, 'refs/tags/')
+ uses: softprops/action-gh-release@v1
+ with:
+ files: |
+ target/*.jar
+ target/*.pom
+ target/*.asc
+ target/*.md5
+ target/*.sha1
+ generate_release_notes: true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..88a5062
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,34 @@
+name: Release
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: 'maven'
+
+ - name: Build with Maven
+ run: |
+ mvn -B clean package -DskipTests
+ mvn -B javadoc:javadoc
+ mvn -B source:jar
+
+ - name: Create Release
+ uses: softprops/action-gh-release@v1
+ with:
+ name:
diff --git a/README.md b/README.md
index 3ed09ea..185bec5 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,149 @@
-# allegro-rest-api-client-java
-Klient Allegro REST API umożliwia szybką i łatwą integrację z aplikacjami wykorzystującymi język Java
+# Klient Allegro REST API dla aplikacji Java
+### Allegro REST API Java Client for Java
+***
+[](https://opensource.org/licenses/MIT)
+[](https://www.java.com)
+[]
+
+Lekka biblioteka kliencka w języku Java do integracji z Allegro REST API. Stworzona dla programistów Java, którzy potrzebują zintegrować swoje aplikacje z API platformy Allegro. 🚀
+
+Biblioteka Java do łatwej współpracy z [Allegro REST API](https://developer.allegro.pl/).
+Klient ułatwia uwierzytelnianie, wysyłanie zapytań i odbieranie odpowiedzi, dzięki czemu możesz szybko korzystać z funkcji Allegro w swojej aplikacji.
+
+## Najważniejsze możliwości, jakie daje klient Allegro REST API:
+
+- Wystawianie i edytowanie wielu ofert jednocześnie, w tym zmiana cen, ilości i opcji promowania
+- Masowe wyróżnianie wielu ofert, aby zwiększyć ich widoczność
+- Pobieranie i filtrowanie listy własnych ofert na Allegro
+- Uzyskiwanie aktualnych danych o sprzedaży i statusach zamówień
+- Zarządzanie przesyłkami w ramach usługi „Wysyłam z Allegro”
+- Pobieranie szczegółowych informacji o sprzedanych produktach oraz kupujących
+- Zarządzanie komunikacją z klientami, w tym obsługa dyskusji i wiadomości
+- Obsługa kampanii promocyjnych i programów marketingowych
+- Monitorowanie i automatyczna zmiana cen ofert
+- Automatyzacja procesów rozliczeniowych i płatniczych
+
+## ✨ Dlaczego warto wybrać tego klienta?
+
+- 💡 **Typowane interfejsy Java** – w pełni typowane interfejsy dla endpointów Allegro REST API
+- 🛡️ **Uwierzytelnianie sesyjne** – bezpieczny dostęp do API Allegro
+- 📚 **Przejrzysta dokumentacja** – przykłady integracji w Javie
+- 🚀 **Nowoczesne wsparcie Java** – kompatybilność z Java 17 i nowszymi wersjami
+
+## 📦 Informacje o wersji
+
+- **Aktualna wersja**: `1.0.0`
+- **Wymagana wersja Java**: Java 17+
+
+## 🔓 Licencja
+
+**Licencja MIT**
+
+Niniejszym udziela się zgody na bezpłatne korzystanie z tego oprogramowania i powiązanych plików dokumentacji ("Oprogramowanie"), do korzystania z Oprogramowania bez ograniczeń, w tym bez ograniczeń praw do używania, kopiowania, modyfikowania, łączenia, publikowania, dystrybuowania, sublicencjonowania i/lub sprzedaży kopii Oprogramowania.
+
+Jedynym wymogiem jest zachowanie oryginalnych informacji o autorze w kodzie źródłowym i dokumentacji.
+
+## 🚀 Szybki start
+
+### 1️⃣ Instalacja
+
+Możesz dodać bibliotekę do swojego projektu, dołączając zależność z Maven Central:
+
+```xml
+
+ pl.wtx.allegro
+ allegro-rest-api-client
+ 1.0.0
+
+```
+
+Alternatywnie, możesz sklonować i zbudować bibliotekę ze źródeł:
+
+```sh
+git clone https://github.com/wtx-labs/allegro-rest-api-client-java.git
+cd allegro-rest-api-client-java
+mvn clean install
+```
+
+Następnie dodaj zbudowany artefakt do swojego projektu:
+
+```xml
+
+ pl.wtx.allegro
+ allegro-rest-api-client
+ 1.0.0
+
+```
+
+### 2️⃣ Przykład integracji w Javie
+
+Oto jak używać klienta Allegro REST API:
+
+```java
+package pl.wtx.allegro;
+
+import pl.wtx.allegro.api.client.ContactsApi;
+import pl.wtx.allegro.api.client.invoker.ApiException;
+import pl.wtx.allegro.api.client.model.ContactResponse;
+import pl.wtx.allegro.api.client.model.EmailResponse;
+
+/**
+ * Allegro REST API Client - Usage Demo.
+ * Demonstrates basic usage of AllegroApiClient.
+ *
+ * @author WTX Labs
+ * @see https://github.com/wtx-labs/allegro-rest-api-client-java
+ * @license MIT
+ */
+public class AllegroApiClientUsageDemo {
+
+ private static final String API_BASE_PATH = "https://api.allegro.pl";
+
+ // TODO: Set your Allegro API credentials!
+ private static final String API_CLIENT_ID = "TODO_SET_YOUR_CLIENT_ID";
+ private static final String API_CLIENT_SECRET = "TODO_SET_YOUR_CLIENT_SECRET";
+
+ public static void main(String[] args) {
+
+ System.out.println(">>> Start running the AllegroApiClientUsageDemo...");
+
+ AllegroApiClient apiClient = new AllegroApiClient(API_BASE_PATH, API_CLIENT_ID, API_CLIENT_SECRET, false);
+
+ ContactsApi contactsApi = new ContactsApi(apiClient);
+
+ try {
+
+ // Example request for contact with identifier eg. 12345.
+ ContactResponse contact = contactsApi.getContactUsingGET("12345");
+
+ // Example contact's name and emails:
+ System.out.println("Name: " + contact.getName());
+ System.out.println("Emails:");
+
+ for (EmailResponse email : contact.getEmails()) {
+ System.out.println("- " + email.getAddress());
+ }
+
+ } catch (ApiException exception) {
+ System.err.println("Error occurred during API call: " + exception);
+ }
+
+ System.out.println("<<< The AllegroApiClientUsageDemo has been finished.");
+
+ }
+
+}
+
+```
+
+## 🤝 Współpraca
+
+- ✨ Sprawdź nasze [GitHub Issues](https://github.com/wtx-labs/allegro-rest-api-client-java/issues) po najnowsze aktualizacje
+
+- 💡 Masz sugestie? Otwórz zgłoszenie lub dołącz do projektu
+
+- 🌟 Oznacz to repozytorium gwiazdką, jeśli uważasz je za pomocne
+
+## 📝 Licencja
+
+Ten projekt jest udostępniany na licencji MIT - szczegóły znajdują się w pliku [LICENSE](LICENSE).
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..4015249
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,305 @@
+
+
+ 4.0.0
+
+ pl.wtx.allegro
+ allegro-rest-api-client
+ 1.0.0
+ jar
+
+ Allegro REST API Client for Java
+ Allegro REST API Client for Java – Simple access to the Allegro platform API
+ https://github.com/wtx-labs/allegro-rest-api-client-java
+
+
+ 17
+ 17
+ 17
+ UTF-8
+
+
+
+
+ ossrh
+ https://central.sonatype.com/api/v1/publisher/upload
+
+
+ ossrh
+ https://central.sonatype.com/api/v1/publisher/upload
+
+
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ 2.19.0
+
+
+
+ javax.annotation
+ javax.annotation-api
+ 1.3.2
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.12.0
+
+
+
+ com.squareup.okhttp3
+ logging-interceptor
+ 4.12.0
+
+
+
+ com.google.code.gson
+ gson
+ 2.13.1
+
+
+
+ com.squareup.okio
+ okio
+ 3.13.0
+
+
+
+ io.gsonfire
+ gson-fire
+ 1.9.0
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
+ org.apache.oltu.oauth2
+ org.apache.oltu.oauth2.client
+ 1.0.2
+
+
+
+ org.openapitools
+ jackson-databind-nullable
+ 0.2.6
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.11.0
+
+ ${maven.compiler.source}
+ ${maven.compiler.target}
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.3.0
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.6.3
+
+ none
+ false
+
+
+
+ attach-javadocs
+ package
+
+ jar
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+ 3.3.0
+
+
+ jar-with-dependencies
+
+ false
+
+
+
+ assemble-jar-with-dependencies
+ package
+
+ single
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.0.1
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+ ${gpg.keyname}
+ ${gpg.passphrase}
+
+ --batch
+ --yes
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.7.0
+ true
+
+ central
+ https://central.sonatype.com
+ Allegro REST API Client for Java - ${project.version}
+ required
+ false
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.1.1
+
+ ossrh::default::https://central.sonatype.com/api/v1/publisher/upload
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.6.3
+
+
+
+
+
+ scm:git:git://github.com/wtx-labs/allegro-rest-api-client-java.git
+ scm:git:ssh://github.com/wtx-labs/allegro-rest-api-client-java.git
+ https://github.com/wtx-labs/allegro-rest-api-client-java
+
+
+
+ GitHub
+ https://github.com/wtx-labs/allegro-rest-api-client-java/issues
+
+
+
+ GitHub Actions
+ https://github.com/wtx-labs/allegro-rest-api-client-java/actions
+
+
+
+
+ WTX Labs Team
+ WTX Labs
+ https://github.com/wtx-labs
+
+
+
+
+
+ release
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
+
+
+ MIT License
+ https://opensource.org/licenses/MIT
+ repo
+
+
+
+
diff --git a/src/main/java/pl/wtx/allegro/AllegroApiClient.java b/src/main/java/pl/wtx/allegro/AllegroApiClient.java
new file mode 100644
index 0000000..9b56234
--- /dev/null
+++ b/src/main/java/pl/wtx/allegro/AllegroApiClient.java
@@ -0,0 +1,51 @@
+package pl.wtx.allegro;
+
+import java.util.HashMap;
+
+import pl.wtx.allegro.api.client.config.GsonConfig;
+import pl.wtx.allegro.api.client.config.OkHttpClientConfig;
+import pl.wtx.allegro.api.client.invoker.ApiClient;
+import pl.wtx.allegro.api.client.invoker.JSON;
+
+/**
+ * AllegroApiClient is a specialized API client for interacting with the Allegro platform.
+ *
+ * This client extends the generic {@link ApiClient} and provides default configuration,
+ * including custom Gson serialization settings and optional HTTP logging.
+ *
+ *
+ * By default, it ignores unrecognized fields in API responses to improve robustness.
+ *
+ *
+ * @author WTX Labs
+ * @see https://github.com/wtx-labs/allegro-rest-api-client-java
+ * @license MIT
+ */
+public class AllegroApiClient extends ApiClient {
+
+ /**
+ * Constructs a new AllegroApiClient instance with the specified parameters.
+ *
+ * The client is initialized with a base API path, client credentials, and an option to enable HTTP message logging.
+ * It configures JSON serialization to ignore unknown fields and sets a custom User-Agent header.
+ *
+ *
+ * @param basePath the base URL path of the Allegro API
+ * @param clientId the OAuth2 client ID for authentication
+ * @param clientSecret the OAuth2 client secret for authentication
+ * @param enableLoggingApiMessages if {@code true}, enables HTTP client logging for API messages
+ */
+ public AllegroApiClient(String basePath, String clientId, String clientSecret, boolean enableLoggingApiMessages) {
+
+ super(basePath, clientId, clientSecret, new HashMap());
+
+ JSON.setGson(GsonConfig.createGson());
+ setUserAgent("AllegroApiClient (by wtx-labs)");
+
+ if (enableLoggingApiMessages) {
+ setHttpClient(OkHttpClientConfig.configureClient(getHttpClient()));
+ }
+
+ }
+
+}
diff --git a/src/main/java/pl/wtx/allegro/AllegroApiClientUsageDemo.java b/src/main/java/pl/wtx/allegro/AllegroApiClientUsageDemo.java
new file mode 100644
index 0000000..5e983c2
--- /dev/null
+++ b/src/main/java/pl/wtx/allegro/AllegroApiClientUsageDemo.java
@@ -0,0 +1,53 @@
+package pl.wtx.allegro;
+
+import pl.wtx.allegro.api.client.ContactsApi;
+import pl.wtx.allegro.api.client.invoker.ApiException;
+import pl.wtx.allegro.api.client.model.ContactResponse;
+import pl.wtx.allegro.api.client.model.EmailResponse;
+
+/**
+ * Allegro REST API Client - Usage Demo.
+ * Demonstrates basic usage of AllegroApiClient.
+ *
+ * @author WTX Labs
+ * @see https://github.com/wtx-labs/allegro-rest-api-client-java
+ * @license MIT
+ */
+public class AllegroApiClientUsageDemo {
+
+ private static final String API_BASE_PATH = "https://api.allegro.pl";
+
+ // TODO: Set your Allegro API credentials!
+ private static final String API_CLIENT_ID = "TODO_SET_YOUR_CLIENT_ID";
+ private static final String API_CLIENT_SECRET = "TODO_SET_YOUR_CLIENT_SECRET";
+
+ public static void main(String[] args) {
+
+ System.out.println(">>> Start running the AllegroApiClientUsageDemo...");
+
+ AllegroApiClient apiClient = new AllegroApiClient(API_BASE_PATH, API_CLIENT_ID, API_CLIENT_SECRET, false);
+
+ ContactsApi contactsApi = new ContactsApi(apiClient);
+
+ try {
+
+ // Example request for contact with identifier eg. 12345.
+ ContactResponse contact = contactsApi.getContactUsingGET("12345");
+
+ // Example contact's name and emails:
+ System.out.println("Name: " + contact.getName());
+ System.out.println("Emails:");
+
+ for (EmailResponse email : contact.getEmails()) {
+ System.out.println("- " + email.getAddress());
+ }
+
+ } catch (ApiException exception) {
+ System.err.println("Error occurred during API call: " + exception);
+ }
+
+ System.out.println("<<< The AllegroApiClientUsageDemo has been finished.");
+
+ }
+
+}
diff --git a/src/main/java/pl/wtx/allegro/api/client/AdditionalServicesApi.java b/src/main/java/pl/wtx/allegro/api/client/AdditionalServicesApi.java
new file mode 100644
index 0000000..580add4
--- /dev/null
+++ b/src/main/java/pl/wtx/allegro/api/client/AdditionalServicesApi.java
@@ -0,0 +1,759 @@
+/*
+ * Allegro REST API
+ * https://developer.allegro.pl/about Documentation is generated from [this OpenAPI 3.0 specification file](https://developer.allegro.pl/swagger.yaml). To start working with our API, you can also check our [official Allegro REST API public collection](https://www.postman.com/allegro-rest-api/allegro-rest-api/collection/4puh6ls/allegro-rest-api) in Postman.
+ *
+ * The version of the OpenAPI document: latest
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.allegro.api.client;
+
+import pl.wtx.allegro.api.client.invoker.ApiCallback;
+import pl.wtx.allegro.api.client.invoker.ApiClient;
+import pl.wtx.allegro.api.client.invoker.ApiException;
+import pl.wtx.allegro.api.client.invoker.ApiResponse;
+import pl.wtx.allegro.api.client.invoker.Configuration;
+import pl.wtx.allegro.api.client.invoker.Pair;
+import pl.wtx.allegro.api.client.invoker.ProgressRequestBody;
+import pl.wtx.allegro.api.client.invoker.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import pl.wtx.allegro.api.client.model.AdditionalServicesGroupRequest;
+import pl.wtx.allegro.api.client.model.AdditionalServicesGroupResponse;
+import pl.wtx.allegro.api.client.model.AdditionalServicesGroups;
+import pl.wtx.allegro.api.client.model.CategoriesResponse;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AdditionalServicesApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public AdditionalServicesApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AdditionalServicesApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for createAdditionalServicesGroupUsingPOST
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
OK
-
+
401
Unauthorized
-
+
422
Unprocessable Entity
-
+
+ */
+ public okhttp3.Call createAdditionalServicesGroupUsingPOSTCall(@javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = additionalServicesGroupRequest;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/groups";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createAdditionalServicesGroupUsingPOSTValidateBeforeCall(@javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'additionalServicesGroupRequest' is set
+ if (additionalServicesGroupRequest == null) {
+ throw new ApiException("Missing the required parameter 'additionalServicesGroupRequest' when calling createAdditionalServicesGroupUsingPOST(Async)");
+ }
+
+ return createAdditionalServicesGroupUsingPOSTCall(additionalServicesGroupRequest, _callback);
+
+ }
+
+ /**
+ * Create additional services group
+ * Use this resource to create a group of additional services. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-dodac-nowa-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-add-a-new-additional-service-group\" target=\"_blank\">EN</a>.
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @return AdditionalServicesGroupResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
OK
-
+
401
Unauthorized
-
+
422
Unprocessable Entity
-
+
+ */
+ public AdditionalServicesGroupResponse createAdditionalServicesGroupUsingPOST(@javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest) throws ApiException {
+ ApiResponse localVarResp = createAdditionalServicesGroupUsingPOSTWithHttpInfo(additionalServicesGroupRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create additional services group
+ * Use this resource to create a group of additional services. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-dodac-nowa-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-add-a-new-additional-service-group\" target=\"_blank\">EN</a>.
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @return ApiResponse<AdditionalServicesGroupResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
OK
-
+
401
Unauthorized
-
+
422
Unprocessable Entity
-
+
+ */
+ public ApiResponse createAdditionalServicesGroupUsingPOSTWithHttpInfo(@javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest) throws ApiException {
+ okhttp3.Call localVarCall = createAdditionalServicesGroupUsingPOSTValidateBeforeCall(additionalServicesGroupRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create additional services group (asynchronously)
+ * Use this resource to create a group of additional services. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-dodac-nowa-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-add-a-new-additional-service-group\" target=\"_blank\">EN</a>.
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
OK
-
+
401
Unauthorized
-
+
422
Unprocessable Entity
-
+
+ */
+ public okhttp3.Call createAdditionalServicesGroupUsingPOSTAsync(@javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createAdditionalServicesGroupUsingPOSTValidateBeforeCall(additionalServicesGroupRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAdditionalServicesGroupUsingGET
+ * @param groupId Additional Service Group ID. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdditionalServicesGroupUsingGETCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/groups/{groupId}"
+ .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAdditionalServicesGroupUsingGETValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'groupId' is set
+ if (groupId == null) {
+ throw new ApiException("Missing the required parameter 'groupId' when calling getAdditionalServicesGroupUsingGET(Async)");
+ }
+
+ return getAdditionalServicesGroupUsingGETCall(groupId, _callback);
+
+ }
+
+ /**
+ * Get the details of an additional services group
+ * Use this resource to get additional services group for a given ID. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-wybrana-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-group-of-additional-services-for-a-given-id\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @return AdditionalServicesGroupResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public AdditionalServicesGroupResponse getAdditionalServicesGroupUsingGET(@javax.annotation.Nonnull String groupId) throws ApiException {
+ ApiResponse localVarResp = getAdditionalServicesGroupUsingGETWithHttpInfo(groupId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get the details of an additional services group
+ * Use this resource to get additional services group for a given ID. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-wybrana-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-group-of-additional-services-for-a-given-id\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @return ApiResponse<AdditionalServicesGroupResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public ApiResponse getAdditionalServicesGroupUsingGETWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException {
+ okhttp3.Call localVarCall = getAdditionalServicesGroupUsingGETValidateBeforeCall(groupId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get the details of an additional services group (asynchronously)
+ * Use this resource to get additional services group for a given ID. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-wybrana-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-group-of-additional-services-for-a-given-id\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdditionalServicesGroupUsingGETAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAdditionalServicesGroupUsingGETValidateBeforeCall(groupId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getListOfAdditionalServicesDefinitionsCategoriesUsingGET
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public okhttp3.Call getListOfAdditionalServicesDefinitionsCategoriesUsingGETCall(final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/categories";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getListOfAdditionalServicesDefinitionsCategoriesUsingGETValidateBeforeCall(final ApiCallback _callback) throws ApiException {
+ return getListOfAdditionalServicesDefinitionsCategoriesUsingGETCall(_callback);
+
+ }
+
+ /**
+ * Get the additional services definitions by categories
+ * Use this resource to get additional services definitions, grouped by additional services categories, available on given marketplace. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-liste-dostepnych-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-list-of-available-additional-services\" target=\"_blank\">EN</a>.
+ * @return CategoriesResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public CategoriesResponse getListOfAdditionalServicesDefinitionsCategoriesUsingGET() throws ApiException {
+ ApiResponse localVarResp = getListOfAdditionalServicesDefinitionsCategoriesUsingGETWithHttpInfo();
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get the additional services definitions by categories
+ * Use this resource to get additional services definitions, grouped by additional services categories, available on given marketplace. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-liste-dostepnych-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-list-of-available-additional-services\" target=\"_blank\">EN</a>.
+ * @return ApiResponse<CategoriesResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public ApiResponse getListOfAdditionalServicesDefinitionsCategoriesUsingGETWithHttpInfo() throws ApiException {
+ okhttp3.Call localVarCall = getListOfAdditionalServicesDefinitionsCategoriesUsingGETValidateBeforeCall(null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get the additional services definitions by categories (asynchronously)
+ * Use this resource to get additional services definitions, grouped by additional services categories, available on given marketplace. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-liste-dostepnych-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-list-of-available-additional-services\" target=\"_blank\">EN</a>.
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public okhttp3.Call getListOfAdditionalServicesDefinitionsCategoriesUsingGETAsync(final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getListOfAdditionalServicesDefinitionsCategoriesUsingGETValidateBeforeCall(_callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getListOfAdditionalServicesGroupsUsingGET
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit The limit of elements in the response. (optional, default to 100)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public okhttp3.Call getListOfAdditionalServicesGroupsUsingGETCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/groups";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (offset != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset));
+ }
+
+ if (limit != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
+ }
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getListOfAdditionalServicesGroupsUsingGETValidateBeforeCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException {
+ return getListOfAdditionalServicesGroupsUsingGETCall(offset, limit, _callback);
+
+ }
+
+ /**
+ * Get the user's additional services groups
+ * Use this resource to retrieve a list of groups with additional services available to a given user which you may assign to offers. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-liste-grup-uslug-dodatkowych-na-koncie\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-list-of-additional-services-groups-for-the-account\" target=\"_blank\">EN</a>.
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit The limit of elements in the response. (optional, default to 100)
+ * @return AdditionalServicesGroups
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public AdditionalServicesGroups getListOfAdditionalServicesGroupsUsingGET(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException {
+ ApiResponse localVarResp = getListOfAdditionalServicesGroupsUsingGETWithHttpInfo(offset, limit);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get the user's additional services groups
+ * Use this resource to retrieve a list of groups with additional services available to a given user which you may assign to offers. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-liste-grup-uslug-dodatkowych-na-koncie\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-list-of-additional-services-groups-for-the-account\" target=\"_blank\">EN</a>.
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit The limit of elements in the response. (optional, default to 100)
+ * @return ApiResponse<AdditionalServicesGroups>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public ApiResponse getListOfAdditionalServicesGroupsUsingGETWithHttpInfo(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException {
+ okhttp3.Call localVarCall = getListOfAdditionalServicesGroupsUsingGETValidateBeforeCall(offset, limit, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get the user's additional services groups (asynchronously)
+ * Use this resource to retrieve a list of groups with additional services available to a given user which you may assign to offers. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-pobrac-liste-grup-uslug-dodatkowych-na-koncie\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-retrieve-a-list-of-additional-services-groups-for-the-account\" target=\"_blank\">EN</a>.
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit The limit of elements in the response. (optional, default to 100)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
+ */
+ public okhttp3.Call getListOfAdditionalServicesGroupsUsingGETAsync(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getListOfAdditionalServicesGroupsUsingGETValidateBeforeCall(offset, limit, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for modifyAdditionalServicesGroupUsingPUT
+ * @param groupId Additional service group ID. (required)
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call modifyAdditionalServicesGroupUsingPUTCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = additionalServicesGroupRequest;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/groups/{groupId}"
+ .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call modifyAdditionalServicesGroupUsingPUTValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'groupId' is set
+ if (groupId == null) {
+ throw new ApiException("Missing the required parameter 'groupId' when calling modifyAdditionalServicesGroupUsingPUT(Async)");
+ }
+
+ // verify the required parameter 'additionalServicesGroupRequest' is set
+ if (additionalServicesGroupRequest == null) {
+ throw new ApiException("Missing the required parameter 'additionalServicesGroupRequest' when calling modifyAdditionalServicesGroupUsingPUT(Async)");
+ }
+
+ return modifyAdditionalServicesGroupUsingPUTCall(groupId, additionalServicesGroupRequest, _callback);
+
+ }
+
+ /**
+ * Modify an additional services group
+ * Use this resource to modify existing additional service group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-zaktualizowac-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-update-additional-service-group\" target=\"_blank\">EN</a>.
+ * @param groupId Additional service group ID. (required)
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @return AdditionalServicesGroupResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public AdditionalServicesGroupResponse modifyAdditionalServicesGroupUsingPUT(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest) throws ApiException {
+ ApiResponse localVarResp = modifyAdditionalServicesGroupUsingPUTWithHttpInfo(groupId, additionalServicesGroupRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Modify an additional services group
+ * Use this resource to modify existing additional service group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-zaktualizowac-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-update-additional-service-group\" target=\"_blank\">EN</a>.
+ * @param groupId Additional service group ID. (required)
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @return ApiResponse<AdditionalServicesGroupResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public ApiResponse modifyAdditionalServicesGroupUsingPUTWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest) throws ApiException {
+ okhttp3.Call localVarCall = modifyAdditionalServicesGroupUsingPUTValidateBeforeCall(groupId, additionalServicesGroupRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Modify an additional services group (asynchronously)
+ * Use this resource to modify existing additional service group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#jak-zaktualizowac-grupe-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#how-to-update-additional-service-group\" target=\"_blank\">EN</a>.
+ * @param groupId Additional service group ID. (required)
+ * @param additionalServicesGroupRequest Additional service group body (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call modifyAdditionalServicesGroupUsingPUTAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull AdditionalServicesGroupRequest additionalServicesGroupRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = modifyAdditionalServicesGroupUsingPUTValidateBeforeCall(groupId, additionalServicesGroupRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+}
diff --git a/src/main/java/pl/wtx/allegro/api/client/AdditionalServicesTranslationsApi.java b/src/main/java/pl/wtx/allegro/api/client/AdditionalServicesTranslationsApi.java
new file mode 100644
index 0000000..b7deed4
--- /dev/null
+++ b/src/main/java/pl/wtx/allegro/api/client/AdditionalServicesTranslationsApi.java
@@ -0,0 +1,519 @@
+/*
+ * Allegro REST API
+ * https://developer.allegro.pl/about Documentation is generated from [this OpenAPI 3.0 specification file](https://developer.allegro.pl/swagger.yaml). To start working with our API, you can also check our [official Allegro REST API public collection](https://www.postman.com/allegro-rest-api/allegro-rest-api/collection/4puh6ls/allegro-rest-api) in Postman.
+ *
+ * The version of the OpenAPI document: latest
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.allegro.api.client;
+
+import pl.wtx.allegro.api.client.invoker.ApiCallback;
+import pl.wtx.allegro.api.client.invoker.ApiClient;
+import pl.wtx.allegro.api.client.invoker.ApiException;
+import pl.wtx.allegro.api.client.invoker.ApiResponse;
+import pl.wtx.allegro.api.client.invoker.Configuration;
+import pl.wtx.allegro.api.client.invoker.Pair;
+import pl.wtx.allegro.api.client.invoker.ProgressRequestBody;
+import pl.wtx.allegro.api.client.invoker.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import pl.wtx.allegro.api.client.model.AdditionalServiceGroupTranslationPatchResponse;
+import pl.wtx.allegro.api.client.model.AdditionalServiceGroupTranslationResponse;
+import pl.wtx.allegro.api.client.model.AdditionalServicesGroupTranslationRequest;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AdditionalServicesTranslationsApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public AdditionalServicesTranslationsApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AdditionalServicesTranslationsApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for deleteAdditionalServiceGroupTranslation
+ * @param groupId Additional service group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Translation deleted successfully
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Additional service group or translation not found
-
+
+ */
+ public okhttp3.Call deleteAdditionalServiceGroupTranslationCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/groups/{groupId}/translations/{language}"
+ .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString()))
+ .replace("{" + "language" + "}", localVarApiClient.escapeString(language.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteAdditionalServiceGroupTranslationValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'groupId' is set
+ if (groupId == null) {
+ throw new ApiException("Missing the required parameter 'groupId' when calling deleteAdditionalServiceGroupTranslation(Async)");
+ }
+
+ // verify the required parameter 'language' is set
+ if (language == null) {
+ throw new ApiException("Missing the required parameter 'language' when calling deleteAdditionalServiceGroupTranslation(Async)");
+ }
+
+ return deleteAdditionalServiceGroupTranslationCall(groupId, language, _callback);
+
+ }
+
+ /**
+ * Delete a translation for a specified group and language
+ * Use this resource to delete the translation for specified additional service group and language. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional service group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Translation deleted successfully
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Additional service group or translation not found
-
+
+ */
+ public void deleteAdditionalServiceGroupTranslation(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language) throws ApiException {
+ deleteAdditionalServiceGroupTranslationWithHttpInfo(groupId, language);
+ }
+
+ /**
+ * Delete a translation for a specified group and language
+ * Use this resource to delete the translation for specified additional service group and language. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional service group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Translation deleted successfully
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Additional service group or translation not found
-
+
+ */
+ public ApiResponse deleteAdditionalServiceGroupTranslationWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language) throws ApiException {
+ okhttp3.Call localVarCall = deleteAdditionalServiceGroupTranslationValidateBeforeCall(groupId, language, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete a translation for a specified group and language (asynchronously)
+ * Use this resource to delete the translation for specified additional service group and language. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional service group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Translation deleted successfully
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Additional service group or translation not found
-
+
+ */
+ public okhttp3.Call deleteAdditionalServiceGroupTranslationAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteAdditionalServiceGroupTranslationValidateBeforeCall(groupId, language, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAdditionalServiceGroupTranslations
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF language tag. When provided, the response will contain translations in only that language (if exists). (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdditionalServiceGroupTranslationsCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String language, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/groups/{groupId}/translations"
+ .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (language != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("language", language));
+ }
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAdditionalServiceGroupTranslationsValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String language, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'groupId' is set
+ if (groupId == null) {
+ throw new ApiException("Missing the required parameter 'groupId' when calling getAdditionalServiceGroupTranslations(Async)");
+ }
+
+ return getAdditionalServiceGroupTranslationsCall(groupId, language, _callback);
+
+ }
+
+ /**
+ * Get translations for specified group
+ * Use this resource to get translations for additional service group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF language tag. When provided, the response will contain translations in only that language (if exists). (optional)
+ * @return AdditionalServiceGroupTranslationResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public AdditionalServiceGroupTranslationResponse getAdditionalServiceGroupTranslations(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String language) throws ApiException {
+ ApiResponse localVarResp = getAdditionalServiceGroupTranslationsWithHttpInfo(groupId, language);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get translations for specified group
+ * Use this resource to get translations for additional service group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF language tag. When provided, the response will contain translations in only that language (if exists). (optional)
+ * @return ApiResponse<AdditionalServiceGroupTranslationResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public ApiResponse getAdditionalServiceGroupTranslationsWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String language) throws ApiException {
+ okhttp3.Call localVarCall = getAdditionalServiceGroupTranslationsValidateBeforeCall(groupId, language, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get translations for specified group (asynchronously)
+ * Use this resource to get translations for additional service group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF language tag. When provided, the response will contain translations in only that language (if exists). (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdditionalServiceGroupTranslationsAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String language, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAdditionalServiceGroupTranslationsValidateBeforeCall(groupId, language, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for updateAdditionalServiceGroupTranslation
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @param additionalServicesGroupTranslationRequest Additonal service group translation. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Translation created/updated for group and language.
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call updateAdditionalServiceGroupTranslationCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, @javax.annotation.Nonnull AdditionalServicesGroupTranslationRequest additionalServicesGroupTranslationRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = additionalServicesGroupTranslationRequest;
+
+ // create path and map variables
+ String localVarPath = "/sale/offer-additional-services/groups/{groupId}/translations/{language}"
+ .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString()))
+ .replace("{" + "language" + "}", localVarApiClient.escapeString(language.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call updateAdditionalServiceGroupTranslationValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, @javax.annotation.Nonnull AdditionalServicesGroupTranslationRequest additionalServicesGroupTranslationRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'groupId' is set
+ if (groupId == null) {
+ throw new ApiException("Missing the required parameter 'groupId' when calling updateAdditionalServiceGroupTranslation(Async)");
+ }
+
+ // verify the required parameter 'language' is set
+ if (language == null) {
+ throw new ApiException("Missing the required parameter 'language' when calling updateAdditionalServiceGroupTranslation(Async)");
+ }
+
+ // verify the required parameter 'additionalServicesGroupTranslationRequest' is set
+ if (additionalServicesGroupTranslationRequest == null) {
+ throw new ApiException("Missing the required parameter 'additionalServicesGroupTranslationRequest' when calling updateAdditionalServiceGroupTranslation(Async)");
+ }
+
+ return updateAdditionalServiceGroupTranslationCall(groupId, language, additionalServicesGroupTranslationRequest, _callback);
+
+ }
+
+ /**
+ * Create/Update translations for specified group and language
+ * Use this resource to create/update translation for additional service group and specified language. It is allowed to provide an incomplete list of services that belong to the group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @param additionalServicesGroupTranslationRequest Additonal service group translation. (required)
+ * @return AdditionalServiceGroupTranslationPatchResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Translation created/updated for group and language.
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public AdditionalServiceGroupTranslationPatchResponse updateAdditionalServiceGroupTranslation(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, @javax.annotation.Nonnull AdditionalServicesGroupTranslationRequest additionalServicesGroupTranslationRequest) throws ApiException {
+ ApiResponse localVarResp = updateAdditionalServiceGroupTranslationWithHttpInfo(groupId, language, additionalServicesGroupTranslationRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create/Update translations for specified group and language
+ * Use this resource to create/update translation for additional service group and specified language. It is allowed to provide an incomplete list of services that belong to the group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @param additionalServicesGroupTranslationRequest Additonal service group translation. (required)
+ * @return ApiResponse<AdditionalServiceGroupTranslationPatchResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Translation created/updated for group and language.
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public ApiResponse updateAdditionalServiceGroupTranslationWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, @javax.annotation.Nonnull AdditionalServicesGroupTranslationRequest additionalServicesGroupTranslationRequest) throws ApiException {
+ okhttp3.Call localVarCall = updateAdditionalServiceGroupTranslationValidateBeforeCall(groupId, language, additionalServicesGroupTranslationRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create/Update translations for specified group and language (asynchronously)
+ * Use this resource to create/update translation for additional service group and specified language. It is allowed to provide an incomplete list of services that belong to the group. Read more: <a href=\"../../tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#tlumaczenia-uslug-dodatkowych\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/how-to-process-list-of-offers-m09BKA5v8H3#additional-services-translations\" target=\"_blank\">EN</a>.
+ * @param groupId Additional Service Group ID. (required)
+ * @param language IETF Language tag. (required)
+ * @param additionalServicesGroupTranslationRequest Additonal service group translation. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Translation created/updated for group and language.
-
+
401
Unauthorized
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call updateAdditionalServiceGroupTranslationAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String language, @javax.annotation.Nonnull AdditionalServicesGroupTranslationRequest additionalServicesGroupTranslationRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = updateAdditionalServiceGroupTranslationValidateBeforeCall(groupId, language, additionalServicesGroupTranslationRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+}
diff --git a/src/main/java/pl/wtx/allegro/api/client/AdvanceShipNoticesApi.java b/src/main/java/pl/wtx/allegro/api/client/AdvanceShipNoticesApi.java
new file mode 100644
index 0000000..fabcdf1
--- /dev/null
+++ b/src/main/java/pl/wtx/allegro/api/client/AdvanceShipNoticesApi.java
@@ -0,0 +1,1722 @@
+/*
+ * Allegro REST API
+ * https://developer.allegro.pl/about Documentation is generated from [this OpenAPI 3.0 specification file](https://developer.allegro.pl/swagger.yaml). To start working with our API, you can also check our [official Allegro REST API public collection](https://www.postman.com/allegro-rest-api/allegro-rest-api/collection/4puh6ls/allegro-rest-api) in Postman.
+ *
+ * The version of the OpenAPI document: latest
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.allegro.api.client;
+
+import pl.wtx.allegro.api.client.invoker.ApiCallback;
+import pl.wtx.allegro.api.client.invoker.ApiClient;
+import pl.wtx.allegro.api.client.invoker.ApiException;
+import pl.wtx.allegro.api.client.invoker.ApiResponse;
+import pl.wtx.allegro.api.client.invoker.Configuration;
+import pl.wtx.allegro.api.client.invoker.Pair;
+import pl.wtx.allegro.api.client.invoker.ProgressRequestBody;
+import pl.wtx.allegro.api.client.invoker.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import pl.wtx.allegro.api.client.model.AdvanceShipNotice;
+import pl.wtx.allegro.api.client.model.AdvanceShipNoticeList;
+import pl.wtx.allegro.api.client.model.AdvanceShipNoticeResponse;
+import pl.wtx.allegro.api.client.model.AdvanceShipNoticeStatus;
+import pl.wtx.allegro.api.client.model.CreateAdvanceShipNoticeRequest;
+import pl.wtx.allegro.api.client.model.CreateAdvanceShipNoticeResponse;
+import pl.wtx.allegro.api.client.model.ErrorsHolder;
+import java.io.File;
+import pl.wtx.allegro.api.client.model.ReceivingState;
+import pl.wtx.allegro.api.client.model.SubmitCommand;
+import java.util.UUID;
+import pl.wtx.allegro.api.client.model.UpdateSubmittedAdvanceShipNoticeRequest;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AdvanceShipNoticesApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public AdvanceShipNoticesApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AdvanceShipNoticesApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for cancelAdvanceShipNotice
+ * @param id An identifier of the Advance Ship Notice to cancel. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Advance Ship Notice was cancelled.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be cancelled - it is not in IN_TRANSIT status.
-
+
+ */
+ public okhttp3.Call cancelAdvanceShipNoticeCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/advance-ship-notices/{id}/cancel"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call cancelAdvanceShipNoticeValidateBeforeCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling cancelAdvanceShipNotice(Async)");
+ }
+
+ return cancelAdvanceShipNoticeCall(id, _callback);
+
+ }
+
+ /**
+ * Cancel Advance Ship Notice
+ * Use this resource to cancel an Advance Ship Notice in IN_TRANSIT status. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#anuluj-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#cancel-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice to cancel. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Advance Ship Notice was cancelled.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be cancelled - it is not in IN_TRANSIT status.
-
+
+ */
+ public void cancelAdvanceShipNotice(@javax.annotation.Nonnull UUID id) throws ApiException {
+ cancelAdvanceShipNoticeWithHttpInfo(id);
+ }
+
+ /**
+ * Cancel Advance Ship Notice
+ * Use this resource to cancel an Advance Ship Notice in IN_TRANSIT status. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#anuluj-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#cancel-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice to cancel. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Advance Ship Notice was cancelled.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be cancelled - it is not in IN_TRANSIT status.
-
+
+ */
+ public ApiResponse cancelAdvanceShipNoticeWithHttpInfo(@javax.annotation.Nonnull UUID id) throws ApiException {
+ okhttp3.Call localVarCall = cancelAdvanceShipNoticeValidateBeforeCall(id, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Cancel Advance Ship Notice (asynchronously)
+ * Use this resource to cancel an Advance Ship Notice in IN_TRANSIT status. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#anuluj-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#cancel-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice to cancel. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Advance Ship Notice was cancelled.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be cancelled - it is not in IN_TRANSIT status.
-
+
+ */
+ public okhttp3.Call cancelAdvanceShipNoticeAsync(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = cancelAdvanceShipNoticeValidateBeforeCall(id, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for createAdvanceShipNotice
+ * @param createAdvanceShipNoticeRequest (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Advance Ship Notice created.
* location - A location to created command (URI). * etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
400
Invalid request body.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Advance Ship Notice cannot be created due to improper input data.
-
+
+ */
+ public okhttp3.Call createAdvanceShipNoticeCall(@javax.annotation.Nonnull CreateAdvanceShipNoticeRequest createAdvanceShipNoticeRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = createAdvanceShipNoticeRequest;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/advance-ship-notices";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json",
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createAdvanceShipNoticeValidateBeforeCall(@javax.annotation.Nonnull CreateAdvanceShipNoticeRequest createAdvanceShipNoticeRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'createAdvanceShipNoticeRequest' is set
+ if (createAdvanceShipNoticeRequest == null) {
+ throw new ApiException("Missing the required parameter 'createAdvanceShipNoticeRequest' when calling createAdvanceShipNotice(Async)");
+ }
+
+ return createAdvanceShipNoticeCall(createAdvanceShipNoticeRequest, _callback);
+
+ }
+
+ /**
+ * Create an Advance Ship Notice
+ * Use this resource to create an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#utworz-draft-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#create-a-draft-of-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param createAdvanceShipNoticeRequest (required)
+ * @return CreateAdvanceShipNoticeResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Advance Ship Notice created.
* location - A location to created command (URI). * etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
400
Invalid request body.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Advance Ship Notice cannot be created due to improper input data.
-
+
+ */
+ public CreateAdvanceShipNoticeResponse createAdvanceShipNotice(@javax.annotation.Nonnull CreateAdvanceShipNoticeRequest createAdvanceShipNoticeRequest) throws ApiException {
+ ApiResponse localVarResp = createAdvanceShipNoticeWithHttpInfo(createAdvanceShipNoticeRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create an Advance Ship Notice
+ * Use this resource to create an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#utworz-draft-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#create-a-draft-of-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param createAdvanceShipNoticeRequest (required)
+ * @return ApiResponse<CreateAdvanceShipNoticeResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Advance Ship Notice created.
* location - A location to created command (URI). * etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
400
Invalid request body.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Advance Ship Notice cannot be created due to improper input data.
-
+
+ */
+ public ApiResponse createAdvanceShipNoticeWithHttpInfo(@javax.annotation.Nonnull CreateAdvanceShipNoticeRequest createAdvanceShipNoticeRequest) throws ApiException {
+ okhttp3.Call localVarCall = createAdvanceShipNoticeValidateBeforeCall(createAdvanceShipNoticeRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create an Advance Ship Notice (asynchronously)
+ * Use this resource to create an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#utworz-draft-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#create-a-draft-of-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param createAdvanceShipNoticeRequest (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Advance Ship Notice created.
* location - A location to created command (URI). * etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
400
Invalid request body.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Advance Ship Notice cannot be created due to improper input data.
-
+
+ */
+ public okhttp3.Call createAdvanceShipNoticeAsync(@javax.annotation.Nonnull CreateAdvanceShipNoticeRequest createAdvanceShipNoticeRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createAdvanceShipNoticeValidateBeforeCall(createAdvanceShipNoticeRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteAdvanceShipNotice
+ * @param id An identifier of the Advance Ship Notice to delete. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Advance Ship Notice was deleted.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be deleted - it is not in DRAFT status.
-
+
+ */
+ public okhttp3.Call deleteAdvanceShipNoticeCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/advance-ship-notices/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteAdvanceShipNoticeValidateBeforeCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling deleteAdvanceShipNotice(Async)");
+ }
+
+ return deleteAdvanceShipNoticeCall(id, _callback);
+
+ }
+
+ /**
+ * Delete Advance Ship Notice
+ * Use this resource to delete an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-usunac-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-delete-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice to delete. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Advance Ship Notice was deleted.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be deleted - it is not in DRAFT status.
-
+
+ */
+ public void deleteAdvanceShipNotice(@javax.annotation.Nonnull UUID id) throws ApiException {
+ deleteAdvanceShipNoticeWithHttpInfo(id);
+ }
+
+ /**
+ * Delete Advance Ship Notice
+ * Use this resource to delete an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-usunac-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-delete-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice to delete. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Advance Ship Notice was deleted.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be deleted - it is not in DRAFT status.
-
+
+ */
+ public ApiResponse deleteAdvanceShipNoticeWithHttpInfo(@javax.annotation.Nonnull UUID id) throws ApiException {
+ okhttp3.Call localVarCall = deleteAdvanceShipNoticeValidateBeforeCall(id, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete Advance Ship Notice (asynchronously)
+ * Use this resource to delete an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-usunac-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-delete-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice to delete. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
204
Advance Ship Notice was deleted.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
422
ASN cannot be deleted - it is not in DRAFT status.
-
+
+ */
+ public okhttp3.Call deleteAdvanceShipNoticeAsync(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteAdvanceShipNoticeValidateBeforeCall(id, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAdvanceShipNotice
+ * @param id The identifier of returned Advance Ship Notice. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns single Advance Ship Notice.
* etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticeCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/advance-ship-notices/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAdvanceShipNoticeValidateBeforeCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling getAdvanceShipNotice(Async)");
+ }
+
+ return getAdvanceShipNoticeCall(id, _callback);
+
+ }
+
+ /**
+ * Get single Advance Ship Notice
+ * Use this resource to get an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-przegladac-utworzone-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-get-created-advance-ship-notices\" target=\"_blank\">EN</a>.
+ * @param id The identifier of returned Advance Ship Notice. (required)
+ * @return AdvanceShipNoticeResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns single Advance Ship Notice.
* etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public AdvanceShipNoticeResponse getAdvanceShipNotice(@javax.annotation.Nonnull UUID id) throws ApiException {
+ ApiResponse localVarResp = getAdvanceShipNoticeWithHttpInfo(id);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get single Advance Ship Notice
+ * Use this resource to get an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-przegladac-utworzone-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-get-created-advance-ship-notices\" target=\"_blank\">EN</a>.
+ * @param id The identifier of returned Advance Ship Notice. (required)
+ * @return ApiResponse<AdvanceShipNoticeResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns single Advance Ship Notice.
* etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public ApiResponse getAdvanceShipNoticeWithHttpInfo(@javax.annotation.Nonnull UUID id) throws ApiException {
+ okhttp3.Call localVarCall = getAdvanceShipNoticeValidateBeforeCall(id, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get single Advance Ship Notice (asynchronously)
+ * Use this resource to get an Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-przegladac-utworzone-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-get-created-advance-ship-notices\" target=\"_blank\">EN</a>.
+ * @param id The identifier of returned Advance Ship Notice. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns single Advance Ship Notice.
* etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticeAsync(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAdvanceShipNoticeValidateBeforeCall(id, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAdvanceShipNoticeLabels
+ * @param id An identifier of the Advance Ship Notice. (required)
+ * @param accept Content-type of generated labels. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns PDF or ZPL file with labels.
* content-disposition - The header contains filename directive with indicative file name.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticeLabelsCall(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull String accept, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/advance-ship-notices/{id}/labels"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/pdf",
+ "x-application/zpl"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ if (accept != null) {
+ localVarHeaderParams.put("accept", localVarApiClient.parameterToString(accept));
+ }
+
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAdvanceShipNoticeLabelsValidateBeforeCall(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull String accept, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling getAdvanceShipNoticeLabels(Async)");
+ }
+
+ // verify the required parameter 'accept' is set
+ if (accept == null) {
+ throw new ApiException("Missing the required parameter 'accept' when calling getAdvanceShipNoticeLabels(Async)");
+ }
+
+ return getAdvanceShipNoticeLabelsCall(id, accept, _callback);
+
+ }
+
+ /**
+ * Get labels for Advance Ship Notice
+ * Use this resource to get labels for Advance Ship Notice after being created with \"create labels command\". Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#wygeneruj-oznaczenia-na-kartony\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#create-labels-for-boxes\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice. (required)
+ * @param accept Content-type of generated labels. (required)
+ * @return File
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns PDF or ZPL file with labels.
* content-disposition - The header contains filename directive with indicative file name.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public File getAdvanceShipNoticeLabels(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull String accept) throws ApiException {
+ ApiResponse localVarResp = getAdvanceShipNoticeLabelsWithHttpInfo(id, accept);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get labels for Advance Ship Notice
+ * Use this resource to get labels for Advance Ship Notice after being created with \"create labels command\". Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#wygeneruj-oznaczenia-na-kartony\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#create-labels-for-boxes\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice. (required)
+ * @param accept Content-type of generated labels. (required)
+ * @return ApiResponse<File>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns PDF or ZPL file with labels.
* content-disposition - The header contains filename directive with indicative file name.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public ApiResponse getAdvanceShipNoticeLabelsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull String accept) throws ApiException {
+ okhttp3.Call localVarCall = getAdvanceShipNoticeLabelsValidateBeforeCall(id, accept, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get labels for Advance Ship Notice (asynchronously)
+ * Use this resource to get labels for Advance Ship Notice after being created with \"create labels command\". Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#wygeneruj-oznaczenia-na-kartony\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#create-labels-for-boxes\" target=\"_blank\">EN</a>.
+ * @param id An identifier of the Advance Ship Notice. (required)
+ * @param accept Content-type of generated labels. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns PDF or ZPL file with labels.
* content-disposition - The header contains filename directive with indicative file name.
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticeLabelsAsync(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull String accept, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAdvanceShipNoticeLabelsValidateBeforeCall(id, accept, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAdvanceShipNoticeReceivingState
+ * @param id An identifier of advance ship notice. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns the state of Advance Ship Notice receiving in Fulfillment Center
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found (ASN doesn't exist or is in state DRAFT or IN_TRANSIT)
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticeReceivingStateCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/advance-ship-notices/{id}/receiving-state"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAdvanceShipNoticeReceivingStateValidateBeforeCall(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling getAdvanceShipNoticeReceivingState(Async)");
+ }
+
+ return getAdvanceShipNoticeReceivingStateCall(id, _callback);
+
+ }
+
+ /**
+ * Check current state and details of Advance Ship Notice receiving
+ * Use this resource to check the state of Advance Ship Notice receiving in Fulfillment Center in real time. The response contains a receiving progress and information about particular items - their quantities and conditions. While the Advance Ship Notice is in UNPACKING state, report is updated dynamically, which might result in different responses even at short time intervals. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#sprawdz-postep-odbioru-awizo-przez-magazyn\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#check-current-state-and-details-of-advance-ship-notice-receiving\" target=\"_blank\">EN</a>.
+ * @param id An identifier of advance ship notice. (required)
+ * @return ReceivingState
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns the state of Advance Ship Notice receiving in Fulfillment Center
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found (ASN doesn't exist or is in state DRAFT or IN_TRANSIT)
-
+
+ */
+ public ReceivingState getAdvanceShipNoticeReceivingState(@javax.annotation.Nonnull UUID id) throws ApiException {
+ ApiResponse localVarResp = getAdvanceShipNoticeReceivingStateWithHttpInfo(id);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Check current state and details of Advance Ship Notice receiving
+ * Use this resource to check the state of Advance Ship Notice receiving in Fulfillment Center in real time. The response contains a receiving progress and information about particular items - their quantities and conditions. While the Advance Ship Notice is in UNPACKING state, report is updated dynamically, which might result in different responses even at short time intervals. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#sprawdz-postep-odbioru-awizo-przez-magazyn\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#check-current-state-and-details-of-advance-ship-notice-receiving\" target=\"_blank\">EN</a>.
+ * @param id An identifier of advance ship notice. (required)
+ * @return ApiResponse<ReceivingState>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns the state of Advance Ship Notice receiving in Fulfillment Center
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found (ASN doesn't exist or is in state DRAFT or IN_TRANSIT)
-
+
+ */
+ public ApiResponse getAdvanceShipNoticeReceivingStateWithHttpInfo(@javax.annotation.Nonnull UUID id) throws ApiException {
+ okhttp3.Call localVarCall = getAdvanceShipNoticeReceivingStateValidateBeforeCall(id, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Check current state and details of Advance Ship Notice receiving (asynchronously)
+ * Use this resource to check the state of Advance Ship Notice receiving in Fulfillment Center in real time. The response contains a receiving progress and information about particular items - their quantities and conditions. While the Advance Ship Notice is in UNPACKING state, report is updated dynamically, which might result in different responses even at short time intervals. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#sprawdz-postep-odbioru-awizo-przez-magazyn\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#check-current-state-and-details-of-advance-ship-notice-receiving\" target=\"_blank\">EN</a>.
+ * @param id An identifier of advance ship notice. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns the state of Advance Ship Notice receiving in Fulfillment Center
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
404
Not Found (ASN doesn't exist or is in state DRAFT or IN_TRANSIT)
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticeReceivingStateAsync(@javax.annotation.Nonnull UUID id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAdvanceShipNoticeReceivingStateValidateBeforeCall(id, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAdvanceShipNotices
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit Maximum number of elements in response. (optional, default to 50)
+ * @param status A status of the Advance Ship Notices in the response. (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns list of Advance Ship Notices that belong to a seller.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticesCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List status, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/advance-ship-notices";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (offset != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset));
+ }
+
+ if (limit != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
+ }
+
+ if (status != null) {
+ localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "status", status));
+ }
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json",
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAdvanceShipNoticesValidateBeforeCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List status, final ApiCallback _callback) throws ApiException {
+ return getAdvanceShipNoticesCall(offset, limit, status, _callback);
+
+ }
+
+ /**
+ * Get list of Advance Ship Notices
+ * Use this resource to get a list of Advance Ship Notices. The list is ordered by **createdAt** property. Default **offset** is 0, default **limit** is 50. A list can be filtered by statuses. Multiple status query parameters are allowed. In such cases, filters are joined with **OR** logical operator. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-przegladac-utworzone-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-get-created-advance-ship-notices\" target=\"_blank\">EN</a>.
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit Maximum number of elements in response. (optional, default to 50)
+ * @param status A status of the Advance Ship Notices in the response. (optional)
+ * @return AdvanceShipNoticeList
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns list of Advance Ship Notices that belong to a seller.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public AdvanceShipNoticeList getAdvanceShipNotices(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List status) throws ApiException {
+ ApiResponse localVarResp = getAdvanceShipNoticesWithHttpInfo(offset, limit, status);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get list of Advance Ship Notices
+ * Use this resource to get a list of Advance Ship Notices. The list is ordered by **createdAt** property. Default **offset** is 0, default **limit** is 50. A list can be filtered by statuses. Multiple status query parameters are allowed. In such cases, filters are joined with **OR** logical operator. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-przegladac-utworzone-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-get-created-advance-ship-notices\" target=\"_blank\">EN</a>.
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit Maximum number of elements in response. (optional, default to 50)
+ * @param status A status of the Advance Ship Notices in the response. (optional)
+ * @return ApiResponse<AdvanceShipNoticeList>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns list of Advance Ship Notices that belong to a seller.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public ApiResponse getAdvanceShipNoticesWithHttpInfo(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List status) throws ApiException {
+ okhttp3.Call localVarCall = getAdvanceShipNoticesValidateBeforeCall(offset, limit, status, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get list of Advance Ship Notices (asynchronously)
+ * Use this resource to get a list of Advance Ship Notices. The list is ordered by **createdAt** property. Default **offset** is 0, default **limit** is 50. A list can be filtered by statuses. Multiple status query parameters are allowed. In such cases, filters are joined with **OR** logical operator. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#jak-przegladac-utworzone-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#how-to-get-created-advance-ship-notices\" target=\"_blank\">EN</a>.
+ * @param offset The offset of elements in the response. (optional, default to 0)
+ * @param limit Maximum number of elements in response. (optional, default to 50)
+ * @param status A status of the Advance Ship Notices in the response. (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns list of Advance Ship Notices that belong to a seller.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public okhttp3.Call getAdvanceShipNoticesAsync(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List status, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAdvanceShipNoticesValidateBeforeCall(offset, limit, status, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getSubmitCommand
+ * @param commandId An identifier of the command. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns command output with status and possible errors.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public okhttp3.Call getSubmitCommandCall(@javax.annotation.Nonnull UUID commandId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/submit-commands/{command-id}"
+ .replace("{" + "command-id" + "}", localVarApiClient.escapeString(commandId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json",
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getSubmitCommandValidateBeforeCall(@javax.annotation.Nonnull UUID commandId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'commandId' is set
+ if (commandId == null) {
+ throw new ApiException("Missing the required parameter 'commandId' when calling getSubmitCommand(Async)");
+ }
+
+ return getSubmitCommandCall(commandId, _callback);
+
+ }
+
+ /**
+ * Get submit status
+ * Use this resource to get submit status of the Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#zakoncz-edycje-i-wyslij-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#finish-editing-and-submit-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param commandId An identifier of the command. (required)
+ * @return SubmitCommand
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns command output with status and possible errors.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public SubmitCommand getSubmitCommand(@javax.annotation.Nonnull UUID commandId) throws ApiException {
+ ApiResponse localVarResp = getSubmitCommandWithHttpInfo(commandId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get submit status
+ * Use this resource to get submit status of the Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#zakoncz-edycje-i-wyslij-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#finish-editing-and-submit-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param commandId An identifier of the command. (required)
+ * @return ApiResponse<SubmitCommand>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns command output with status and possible errors.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public ApiResponse getSubmitCommandWithHttpInfo(@javax.annotation.Nonnull UUID commandId) throws ApiException {
+ okhttp3.Call localVarCall = getSubmitCommandValidateBeforeCall(commandId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get submit status (asynchronously)
+ * Use this resource to get submit status of the Advance Ship Notice. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#zakoncz-edycje-i-wyslij-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#finish-editing-and-submit-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param commandId An identifier of the command. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Returns command output with status and possible errors.
-
+
401
Unauthorized
-
+
403
Forbidden
-
+
422
Invalid request parameters.
-
+
+ */
+ public okhttp3.Call getSubmitCommandAsync(@javax.annotation.Nonnull UUID commandId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getSubmitCommandValidateBeforeCall(commandId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for submitCommand
+ * @param commandId The identifier of the command. (required)
+ * @param submitCommand (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Returns command output with status and possible errors. The command could fail with following error codes: * ASN_NOT_FOUND - Cannot find ASN with id given in command input. * COMMAND_FORBIDDEN - Requester has no access to run commands on given ASN. * INVALID_ASN_STATE - Such command cannot be run on current ASN state e.g. ASN has no shipping information. * COMMAND_FAILED - Any other error.
* location - A location to created command (URI).
+
401
Unauthorized
-
+
422
Invalid request parameters.
-
+
+ */
+ public okhttp3.Call submitCommandCall(@javax.annotation.Nonnull UUID commandId, @javax.annotation.Nonnull SubmitCommand submitCommand, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = submitCommand;
+
+ // create path and map variables
+ String localVarPath = "/fulfillment/submit-commands/{command-id}"
+ .replace("{" + "command-id" + "}", localVarApiClient.escapeString(commandId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/vnd.allegro.public.v1+json",
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/vnd.allegro.public.v1+json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "bearer-token-for-user" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call submitCommandValidateBeforeCall(@javax.annotation.Nonnull UUID commandId, @javax.annotation.Nonnull SubmitCommand submitCommand, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'commandId' is set
+ if (commandId == null) {
+ throw new ApiException("Missing the required parameter 'commandId' when calling submitCommand(Async)");
+ }
+
+ // verify the required parameter 'submitCommand' is set
+ if (submitCommand == null) {
+ throw new ApiException("Missing the required parameter 'submitCommand' when calling submitCommand(Async)");
+ }
+
+ return submitCommandCall(commandId, submitCommand, _callback);
+
+ }
+
+ /**
+ * Submit the Advance Ship Notice
+ * Use this resource to submit the Advance Ship Notice. After this operation, updates of the Advance Ship Notice are limited to selected properties only. See <a href=\"../../documentation#operation/updateSubmittedAdvanceShipNotice\">PUT /fulfillment/advance-ship-notices/{id}/submitted</a>. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#zakoncz-edycje-i-wyslij-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#finish-editing-and-submit-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param commandId The identifier of the command. (required)
+ * @param submitCommand (required)
+ * @return SubmitCommand
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Returns command output with status and possible errors. The command could fail with following error codes: * ASN_NOT_FOUND - Cannot find ASN with id given in command input. * COMMAND_FORBIDDEN - Requester has no access to run commands on given ASN. * INVALID_ASN_STATE - Such command cannot be run on current ASN state e.g. ASN has no shipping information. * COMMAND_FAILED - Any other error.
* location - A location to created command (URI).
+
401
Unauthorized
-
+
422
Invalid request parameters.
-
+
+ */
+ public SubmitCommand submitCommand(@javax.annotation.Nonnull UUID commandId, @javax.annotation.Nonnull SubmitCommand submitCommand) throws ApiException {
+ ApiResponse localVarResp = submitCommandWithHttpInfo(commandId, submitCommand);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Submit the Advance Ship Notice
+ * Use this resource to submit the Advance Ship Notice. After this operation, updates of the Advance Ship Notice are limited to selected properties only. See <a href=\"../../documentation#operation/updateSubmittedAdvanceShipNotice\">PUT /fulfillment/advance-ship-notices/{id}/submitted</a>. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#zakoncz-edycje-i-wyslij-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#finish-editing-and-submit-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param commandId The identifier of the command. (required)
+ * @param submitCommand (required)
+ * @return ApiResponse<SubmitCommand>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Returns command output with status and possible errors. The command could fail with following error codes: * ASN_NOT_FOUND - Cannot find ASN with id given in command input. * COMMAND_FORBIDDEN - Requester has no access to run commands on given ASN. * INVALID_ASN_STATE - Such command cannot be run on current ASN state e.g. ASN has no shipping information. * COMMAND_FAILED - Any other error.
* location - A location to created command (URI).
+
401
Unauthorized
-
+
422
Invalid request parameters.
-
+
+ */
+ public ApiResponse submitCommandWithHttpInfo(@javax.annotation.Nonnull UUID commandId, @javax.annotation.Nonnull SubmitCommand submitCommand) throws ApiException {
+ okhttp3.Call localVarCall = submitCommandValidateBeforeCall(commandId, submitCommand, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Submit the Advance Ship Notice (asynchronously)
+ * Use this resource to submit the Advance Ship Notice. After this operation, updates of the Advance Ship Notice are limited to selected properties only. See <a href=\"../../documentation#operation/updateSubmittedAdvanceShipNotice\">PUT /fulfillment/advance-ship-notices/{id}/submitted</a>. Read more: <a href=\"../../tutorials/one-fulfillment-by-allegro-0ADwgOLqWSw#zakoncz-edycje-i-wyslij-awizo\" target=\"_blank\">PL</a> / <a href=\"../../tutorials/one-fulfillment-by-allegro-4R9dXyMPlc9#finish-editing-and-submit-the-advance-ship-notice\" target=\"_blank\">EN</a>.
+ * @param commandId The identifier of the command. (required)
+ * @param submitCommand (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
201
Returns command output with status and possible errors. The command could fail with following error codes: * ASN_NOT_FOUND - Cannot find ASN with id given in command input. * COMMAND_FORBIDDEN - Requester has no access to run commands on given ASN. * INVALID_ASN_STATE - Such command cannot be run on current ASN state e.g. ASN has no shipping information. * COMMAND_FAILED - Any other error.
* location - A location to created command (URI).
+
401
Unauthorized
-
+
422
Invalid request parameters.
-
+
+ */
+ public okhttp3.Call submitCommandAsync(@javax.annotation.Nonnull UUID commandId, @javax.annotation.Nonnull SubmitCommand submitCommand, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = submitCommandValidateBeforeCall(commandId, submitCommand, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for updateAdvanceShipNotice
+ * @param id An identifier of Advance Ship Notice. (required)
+ * @param ifMatch A current version of Advance Ship Notice (e.g. from etag header obtained via get). (required)
+ * @param advanceShipNotice (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
Advance Ship Notice updated
* etag - A current version of ASN. Use this value in combination with If-Match header to update ASN.