diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index e059c6ac4cf..544b161a604 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -7,3 +7,5 @@ d0129c1095216d5c830900c8a6223ef5d4274de1 bbe9f971763ca1b27687a6a51067a385a0d23b04 de95c481329aa8b821e6e71ac35c1b8bc67e3e86 78c44064f4ec15091bde7a2dc590aa2b3a99341d +03665b75a1e1c3a3cf28df1dec52e91b308e4368 +7e25c796da25ae080a952936de535a1228fed448 diff --git a/Makefile b/Makefile index 96f334b6c34..f565193cb97 100644 --- a/Makefile +++ b/Makefile @@ -2,22 +2,24 @@ SHELL := /bin/bash CHANGES_PENDING := `git status --porcelain -- ':(exclude)*gen.properties' | grep -c ^ || true` API_RAML ?= $(RAML_FILE) IMPORT_RAML ?= $(RAML_FILE) -ML_RAML ?= $(RAML_FILE) +CHECKOUT_RAML ?= $(RAML_FILE) HISTORY_RAML ?= $(RAML_FILE) CPUS := `./tools/numcpu.sh` -.PHONY: build build_api_sdk build_import_sdk build_import_sdk build_ml_sdk gen_api_sdk gen_import_sdk gen_ml_sdk gen_history_sdk +.PHONY: build build_api_sdk build_import_sdk build_import_sdk build_ml_sdk gen_api_sdk gen_import_sdk gen_ml_sdk gen_history_sdk gen_checkout_sdk -build: codegen_install gen_api_sdk gen_import_sdk gen_history_sdk prettify verify +build: codegen_install gen_api_sdk gen_import_sdk gen_history_sdk gen_checkout_sdk prettify verify build_api_sdk: codegen_install gen_api_sdk prettify verify build_import_sdk: codegen_install gen_import_sdk prettify verify build_ml_sdk: codegen_install gen_ml_sdk prettify verify build_history_sdk: codegen_install gen_history_sdk prettify verify +build_checkout_sdk: codegen_install gen_checkout_sdk prettify verify gen_api_sdk: generate_api gen_import_sdk: generate_import gen_ml_sdk: generate_ml gen_history_sdk: generate_history +gen_checkout_sdk: generate_checkout prettify: ./gradlew spotlessApply @@ -40,6 +42,9 @@ generate_ml: generate_history: $(MAKE) -C commercetools LIB_NAME="history" GEN_RAML_FILE=../$(HISTORY_RAML) generate_sdk +generate_checkout: + $(MAKE) -C commercetools LIB_NAME="checkout" GEN_RAML_FILE=../$(CHECKOUT_RAML) generate_sdk + check_pending: git status --porcelain -- ':(exclude)*gen.properties' @echo "CHANGES_PENDING=$(CHANGES_PENDING)" >> $GITHUB_ENV diff --git a/build.gradle b/build.gradle index f8dc4194fab..5ca510f4bb0 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ plugins { id 'java' id 'java-library' // needed to make sure that transitive deps have 'compile' scope - id "com.diffplug.spotless" version "7.0.4" + id "com.diffplug.spotless" version "7.2.1" id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' id 'com.github.jk1.dependency-license-report' version '2.0' diff --git a/commercetools/commercetools-sdk-java-checkout/build.gradle b/commercetools/commercetools-sdk-java-checkout/build.gradle new file mode 100644 index 00000000000..78891910716 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/build.gradle @@ -0,0 +1,15 @@ + +dependencies { + api project(':rmf:rmf-java-base') + api jackson_core.annotations + api jackson_core.databind + implementation google.findbugs + implementation javax.validation + api commons.lang3 + + integrationTestImplementation project(':commercetools:commercetools-http-client') + integrationTestImplementation project(':commercetools:commercetools-sdk-java-api') +} + +sourceSets.main.java.srcDirs += "src/main/java-generated" +sourceSets.test.java.srcDirs += "src/test/java-generated" diff --git a/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/client/ProjectApiRootTest.java b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/client/ProjectApiRootTest.java new file mode 100644 index 00000000000..07dd459a35e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/client/ProjectApiRootTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.checkout.client; + +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.List; +import java.util.stream.Collectors; + +import org.assertj.core.api.Assertions; +import org.assertj.core.util.Lists; +import org.junit.jupiter.api.Test; + +public class ProjectApiRootTest { + + private static final List ignoreMethods = Lists.newArrayList(); + + /** + * Retrieves all public methods of the {@link ProjectScopedApiRoot} and the public methods of the {@link ByProjectKeyRequestBuilder} and + * checks if project request builder methods are present in ProjectApiRoot methods + */ + @Test + public void allSubResourcesSupported() { + + final List projectApiRootMethods = Lists.newArrayList(ProjectScopedApiRoot.class.getDeclaredMethods()) + .stream() + .filter(method -> Modifier.isPublic(method.getModifiers())) + .map(Method::getName) + .distinct() + .collect(Collectors.toList()); + + final List resourceMethods = Lists.newArrayList(ByProjectKeyRequestBuilder.class.getDeclaredMethods()) + .stream() + .filter(method -> Modifier.isPublic(method.getModifiers())) + .map(Method::getName) + .filter(methodName -> !ignoreMethods.contains(methodName)) + .filter(methodName -> !projectApiRootMethods.contains(methodName)) + .collect(Collectors.toList()); + + Assertions.assertThat(resourceMethods) + .withFailMessage("missing endpoints in ProjectApiRoot: %s", resourceMethods) + .isEmpty(); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/defaultconfig/CheckoutApiTestUtils.java b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/defaultconfig/CheckoutApiTestUtils.java new file mode 100644 index 00000000000..1d028ce6c1d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/defaultconfig/CheckoutApiTestUtils.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.defaultconfig; + +import java.time.Duration; +import java.util.UUID; +import java.util.function.Consumer; + +import com.commercetools.checkout.client.ProjectApiRoot; + +import io.vrap.rmf.base.client.oauth2.ClientCredentials; + +import org.apache.commons.lang3.StringUtils; +import org.assertj.core.api.SoftAssertions; + +public class CheckoutApiTestUtils { + + private static final ProjectApiRoot projectRoot; + + static { + String logLevel = System.getenv("CTP_JVM_SDK_LOG_LEVEL"); + if ("OFF".equals(logLevel)) { + projectRoot = CheckoutApiRootBuilder.of() + .defaultClient( + ClientCredentials.of().withClientId(getClientId()).withClientSecret(getClientSecret()).build(), + ServiceRegion.GCP_EUROPE_WEST1) + .build(getProjectKey()); + } + else { + projectRoot = CheckoutApiRootBuilder.of() + .defaultClient( + ClientCredentials.of().withClientId(getClientId()).withClientSecret(getClientSecret()).build(), + ServiceRegion.GCP_EUROPE_WEST1) + .build(getProjectKey()); + } + } + + public static String randomString() { + return "random-string-" + UUID.randomUUID().toString(); + } + + public static String randomId() { + return "random-id-" + UUID.randomUUID().toString(); + } + + public static String randomKey() { + return "random-key-" + UUID.randomUUID().toString(); + } + + public static String getProjectKey() { + return System.getenv("CTP_PROJECT_KEY"); + } + + public static String getClientId() { + return System.getenv("CTP_CLIENT_ID"); + } + + public static String getClientSecret() { + return System.getenv("CTP_CLIENT_SECRET"); + } + + public static ProjectApiRoot getProjectRoot() { + return projectRoot; + } + + public static void assertEventually(final Duration maxWaitTime, final Duration waitBeforeRetry, + final Runnable block) { + final long timeOutAt = System.currentTimeMillis() + maxWaitTime.toMillis(); + while (true) { + try { + block.run(); + + // the block executed without throwing an exception, return + return; + } + catch (AssertionError e) { + if (System.currentTimeMillis() > timeOutAt) { + throw e; + } + } + + try { + Thread.sleep(waitBeforeRetry.toMillis()); + } + catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + } + + public static void assertEventually(final Consumer assertionsConsumer) { + final Runnable block = () -> { + final SoftAssertions softly = new SoftAssertions(); + assertionsConsumer.accept(softly); + softly.assertAll(); + }; + assertEventually(block); + } + + public static void assertEventually(final Runnable block) { + final Boolean useLongTimeout = "true".equals(System.getenv("TRAVIS")) + || StringUtils.isNotEmpty(System.getenv("TEAMCITY_VERSION")) + || StringUtils.isNoneEmpty(System.getenv("GITHUB_WORKSPACE")); + final Duration maxWaitTime = Duration.ofSeconds(useLongTimeout ? 60 : 30); + final Duration waitBeforeRetry = Duration.ofMillis(100); + assertEventually(maxWaitTime, waitBeforeRetry, block); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/defaultconfig/CheckoutIntegrationTests.java b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/defaultconfig/CheckoutIntegrationTests.java new file mode 100644 index 00000000000..e71ba44d5dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/java/com/commercetools/checkout/defaultconfig/CheckoutIntegrationTests.java @@ -0,0 +1,69 @@ + +package com.commercetools.checkout.defaultconfig; + +import com.commercetools.api.client.ProjectApiRoot; +import com.commercetools.api.defaultconfig.ApiRootBuilder; +import com.commercetools.api.models.cart.CartDraft; +import com.commercetools.checkout.models.transaction.TransactionDraft; + +import io.vrap.rmf.base.client.oauth2.ClientCredentials; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class CheckoutIntegrationTests { + + private static final ProjectApiRoot projectApiRoot; + private static final com.commercetools.checkout.client.ProjectApiRoot checkoutApiRoot; + + static { + projectApiRoot = createApiClient(); + checkoutApiRoot = createCheckoutClient(); + } + public static ProjectApiRoot createApiClient() { + return ApiRootBuilder.ofEnvironmentVariables().buildProjectRoot(); + } + + public static com.commercetools.checkout.client.ProjectApiRoot createCheckoutClient() { + return CheckoutApiRootBuilder.of() + .defaultClient(ClientCredentials.of() + .withClientId(System.getenv("CTP_CLIENT_ID")) + .withClientSecret(System.getenv("CTP_CLIENT_SECRET")) + .build(), + ServiceRegion.GCP_EUROPE_WEST1) + .build(System.getenv("CTP_PROJECT_KEY")); + } + + // create client, then cart, then transaction + @Test + public void createAndGetTransactionTest() { + var newCart = CartDraft.builder().currency("EUR").build(); + + var cart = projectApiRoot.carts().post(newCart).executeBlocking().getBody(); + Assertions.assertNotNull(cart); + + var transactionKey = "transaction-" + CheckoutApiTestUtils.randomKey(); + var transaction = checkoutApiRoot.with() + .transactions() + .post(TransactionDraft.builder() + .key(transactionKey) + .application(a -> a.key("demo-commercetools-checkout")) + .cart(c -> c.id(cart.getId())) + .plusTransactionItems(t -> t.amount(a -> a.centAmount(100).currencyCode("EUR")) + .paymentIntegration(p -> p.key("ci-payment-integration"))) + .build() + + ) + .executeBlocking() + .getBody(); + + // Create transaction + Assertions.assertNotNull(transaction); + + Assertions.assertNotNull( + checkoutApiRoot.with().transactions().withId(transaction.getId()).get().executeBlocking().getBody()); + Assertions.assertEquals(transactionKey, transaction.getKey()); + Assertions.assertNotNull( + checkoutApiRoot.with().transactions().withKey(transaction.getKey()).get().executeBlocking().getBody()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/integrationTest/resources/logback-test.xml b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/resources/logback-test.xml new file mode 100644 index 00000000000..963882c38cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/integrationTest/resources/logback-test.xml @@ -0,0 +1,17 @@ + + + true + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + + + + + + + diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ApiRoot.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ApiRoot.java new file mode 100644 index 00000000000..aef9e1a3e50 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ApiRoot.java @@ -0,0 +1,46 @@ + +package com.commercetools.checkout.client; + +import java.io.Closeable; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.SerializerOnlyApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Entrypoint for building requests against the API + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApiRoot implements Closeable { + + private final ApiHttpClient apiHttpClient; + + private ApiRoot(final ApiHttpClient apiHttpClient) { + this.apiHttpClient = apiHttpClient; + } + + public static ApiRoot of() { + return new ApiRoot(SerializerOnlyApiHttpClient.of()); + } + + public static ApiRoot fromClient(final ApiHttpClient apiHttpClient) { + return new ApiRoot(apiHttpClient); + } + + public ByProjectKeyRequestBuilder withProjectKey(String projectKey) { + return new ByProjectKeyRequestBuilder(this.apiHttpClient, projectKey); + } + + @Override + public void close() { + if (apiHttpClient == null) { + return; + } + try { + apiHttpClient.close(); + } + catch (final Throwable ignored) { + } + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdPost.java new file mode 100644 index 00000000000..18c7ff9754f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdPost.java @@ -0,0 +1,146 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Specific Error Codes:

+ * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .paymentIntents()
+ *            .withPaymentId("{paymentId}")
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntentsByPaymentIdPost extends + TypeBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_paymentsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String paymentId; + + private com.commercetools.checkout.models.payment_intents.PaymentIntent paymentIntent; + + public ByProjectKeyPaymentIntentsByPaymentIdPost(final ApiHttpClient apiHttpClient, String projectKey, + String paymentId, com.commercetools.checkout.models.payment_intents.PaymentIntent paymentIntent) { + super(apiHttpClient); + this.projectKey = projectKey; + this.paymentId = paymentId; + this.paymentIntent = paymentIntent; + } + + public ByProjectKeyPaymentIntentsByPaymentIdPost(ByProjectKeyPaymentIntentsByPaymentIdPost t) { + super(t); + this.projectKey = t.projectKey; + this.paymentId = t.paymentId; + this.paymentIntent = t.paymentIntent; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-intents/%s", encodePathParam(this.projectKey), + encodePathParam(this.paymentId)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(paymentIntent))); + + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, java.lang.Object.class); + } + + @Override + public CompletableFuture> execute(final ApiHttpClient client) { + return execute(client, java.lang.Object.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getPaymentId() { + return this.paymentId; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setPaymentId(final String paymentId) { + this.paymentId = paymentId; + } + + public com.commercetools.checkout.models.payment_intents.PaymentIntent getBody() { + return paymentIntent; + } + + public ByProjectKeyPaymentIntentsByPaymentIdPost withBody( + com.commercetools.checkout.models.payment_intents.PaymentIntent paymentIntent) { + ByProjectKeyPaymentIntentsByPaymentIdPost t = copy(); + t.paymentIntent = paymentIntent; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntentsByPaymentIdPost that = (ByProjectKeyPaymentIntentsByPaymentIdPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(paymentId, that.paymentId) + .append(paymentIntent, that.paymentIntent) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(paymentId).append(paymentIntent).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntentsByPaymentIdPost copy() { + return new ByProjectKeyPaymentIntentsByPaymentIdPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdPostString.java new file mode 100644 index 00000000000..5998458e1c6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdPostString.java @@ -0,0 +1,143 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Specific Error Codes:

+ * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .paymentIntents()
+ *            .withPaymentId("{paymentId}")
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntentsByPaymentIdPostString + extends StringBodyApiMethod implements + com.commercetools.checkout.client.Secured_by_manage_paymentsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String paymentId; + + private String paymentIntent; + + public ByProjectKeyPaymentIntentsByPaymentIdPostString(final ApiHttpClient apiHttpClient, String projectKey, + String paymentId, String paymentIntent) { + super(apiHttpClient); + this.projectKey = projectKey; + this.paymentId = paymentId; + this.paymentIntent = paymentIntent; + } + + public ByProjectKeyPaymentIntentsByPaymentIdPostString(ByProjectKeyPaymentIntentsByPaymentIdPostString t) { + super(t); + this.projectKey = t.projectKey; + this.paymentId = t.paymentId; + this.paymentIntent = t.paymentIntent; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-intents/%s", this.projectKey, this.paymentId); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + paymentIntent.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, java.lang.Object.class); + } + + @Override + public CompletableFuture> execute(final ApiHttpClient client) { + return execute(client, java.lang.Object.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getPaymentId() { + return this.paymentId; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setPaymentId(final String paymentId) { + this.paymentId = paymentId; + } + + public String getBody() { + return paymentIntent; + } + + public ByProjectKeyPaymentIntentsByPaymentIdPostString withBody(String paymentIntent) { + ByProjectKeyPaymentIntentsByPaymentIdPostString t = copy(); + t.paymentIntent = paymentIntent; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntentsByPaymentIdPostString that = (ByProjectKeyPaymentIntentsByPaymentIdPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(paymentId, that.paymentId) + .append(paymentIntent, that.paymentIntent) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(paymentId).append(paymentIntent).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntentsByPaymentIdPostString copy() { + return new ByProjectKeyPaymentIntentsByPaymentIdPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder.java new file mode 100644 index 00000000000..4333741f793 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder.java @@ -0,0 +1,37 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String paymentId; + + public ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String paymentId) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.paymentId = paymentId; + } + + public ByProjectKeyPaymentIntentsByPaymentIdPost post( + com.commercetools.checkout.models.payment_intents.PaymentIntent paymentIntent) { + return new ByProjectKeyPaymentIntentsByPaymentIdPost(apiHttpClient, projectKey, paymentId, paymentIntent); + } + + public ByProjectKeyPaymentIntentsByPaymentIdPostString post(final String paymentIntent) { + return new ByProjectKeyPaymentIntentsByPaymentIdPostString(apiHttpClient, projectKey, paymentId, paymentIntent); + } + + public ByProjectKeyPaymentIntentsByPaymentIdPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.checkout.models.payment_intents.PaymentIntentBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsRequestBuilder.java new file mode 100644 index 00000000000..84cb37b50c3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntentsRequestBuilder.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntentsRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyPaymentIntentsRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder withPaymentId(String paymentId) { + return new ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder(apiHttpClient, projectKey, paymentId); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyRequestBuilder.java new file mode 100644 index 00000000000..d3859d014f8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyRequestBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyPaymentIntentsRequestBuilder paymentIntents() { + return new ByProjectKeyPaymentIntentsRequestBuilder(apiHttpClient, projectKey); + } + + public ByProjectKeyTransactionsRequestBuilder transactions() { + return new ByProjectKeyTransactionsRequestBuilder(apiHttpClient, projectKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsByIdGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsByIdGet.java new file mode 100644 index 00000000000..2fcc3e6b3a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsByIdGet.java @@ -0,0 +1,125 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Returns a Transaction with a given id. Specific Error Codes:

+ * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .transactions()
+ *            .withId("{id}")
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsByIdGet extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_view_transactionsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + public ByProjectKeyTransactionsByIdGet(final ApiHttpClient apiHttpClient, String projectKey, String id) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyTransactionsByIdGet(ByProjectKeyTransactionsByIdGet t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/transactions/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.transaction.Transaction.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.transaction.Transaction.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyTransactionsByIdGet that = (ByProjectKeyTransactionsByIdGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode(); + } + + @Override + protected ByProjectKeyTransactionsByIdGet copy() { + return new ByProjectKeyTransactionsByIdGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsByIdRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsByIdRequestBuilder.java new file mode 100644 index 00000000000..e130ab6b908 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsByIdRequestBuilder.java @@ -0,0 +1,25 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsByIdRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String id; + + public ByProjectKeyTransactionsByIdRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String id) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyTransactionsByIdGet get() { + return new ByProjectKeyTransactionsByIdGet(apiHttpClient, projectKey, id); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsKeyByKeyGet.java new file mode 100644 index 00000000000..f912b0941ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsKeyByKeyGet.java @@ -0,0 +1,125 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Returns a Transaction with a given key. Specific Error Codes:

+ * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .transactions()
+ *            .withKey("{key}")
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsKeyByKeyGet extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_view_transactionsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyTransactionsKeyByKeyGet(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyTransactionsKeyByKeyGet(ByProjectKeyTransactionsKeyByKeyGet t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/transactions/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.transaction.Transaction.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.transaction.Transaction.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyTransactionsKeyByKeyGet that = (ByProjectKeyTransactionsKeyByKeyGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyTransactionsKeyByKeyGet copy() { + return new ByProjectKeyTransactionsKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..f6fc2c04e2c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsKeyByKeyRequestBuilder.java @@ -0,0 +1,25 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String key; + + public ByProjectKeyTransactionsKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyTransactionsKeyByKeyGet get() { + return new ByProjectKeyTransactionsKeyByKeyGet(apiHttpClient, projectKey, key); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsPost.java new file mode 100644 index 00000000000..f7acbe39d05 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsPost.java @@ -0,0 +1,135 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Creates a Transaction on Checkout. Specific Error Codes:

+ * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .transactions()
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsPost extends + TypeBodyApiMethod + implements com.commercetools.checkout.client.Secured_by_manage_transactionsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.checkout.models.transaction.TransactionDraft transactionDraft; + + public ByProjectKeyTransactionsPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.checkout.models.transaction.TransactionDraft transactionDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.transactionDraft = transactionDraft; + } + + public ByProjectKeyTransactionsPost(ByProjectKeyTransactionsPost t) { + super(t); + this.projectKey = t.projectKey; + this.transactionDraft = t.transactionDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/transactions", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(transactionDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.transaction.Transaction.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.transaction.Transaction.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public com.commercetools.checkout.models.transaction.TransactionDraft getBody() { + return transactionDraft; + } + + public ByProjectKeyTransactionsPost withBody( + com.commercetools.checkout.models.transaction.TransactionDraft transactionDraft) { + ByProjectKeyTransactionsPost t = copy(); + t.transactionDraft = transactionDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyTransactionsPost that = (ByProjectKeyTransactionsPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(transactionDraft, that.transactionDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(transactionDraft).toHashCode(); + } + + @Override + protected ByProjectKeyTransactionsPost copy() { + return new ByProjectKeyTransactionsPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsPostString.java new file mode 100644 index 00000000000..689fca2263b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsPostString.java @@ -0,0 +1,135 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Creates a Transaction on Checkout. Specific Error Codes:

+ * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .transactions()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsPostString extends + StringBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_transactionsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String transactionDraft; + + public ByProjectKeyTransactionsPostString(final ApiHttpClient apiHttpClient, String projectKey, + String transactionDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.transactionDraft = transactionDraft; + } + + public ByProjectKeyTransactionsPostString(ByProjectKeyTransactionsPostString t) { + super(t); + this.projectKey = t.projectKey; + this.transactionDraft = t.transactionDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/transactions", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + transactionDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.transaction.Transaction.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.transaction.Transaction.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public String getBody() { + return transactionDraft; + } + + public ByProjectKeyTransactionsPostString withBody(String transactionDraft) { + ByProjectKeyTransactionsPostString t = copy(); + t.transactionDraft = transactionDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyTransactionsPostString that = (ByProjectKeyTransactionsPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(transactionDraft, that.transactionDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(transactionDraft).toHashCode(); + } + + @Override + protected ByProjectKeyTransactionsPostString copy() { + return new ByProjectKeyTransactionsPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsRequestBuilder.java new file mode 100644 index 00000000000..1c18c5c259a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyTransactionsRequestBuilder.java @@ -0,0 +1,42 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyTransactionsRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyTransactionsPost post( + com.commercetools.checkout.models.transaction.TransactionDraft transactionDraft) { + return new ByProjectKeyTransactionsPost(apiHttpClient, projectKey, transactionDraft); + } + + public ByProjectKeyTransactionsPostString post(final String transactionDraft) { + return new ByProjectKeyTransactionsPostString(apiHttpClient, projectKey, transactionDraft); + } + + public ByProjectKeyTransactionsPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.checkout.models.transaction.TransactionDraftBuilder.of()).build()); + } + + public ByProjectKeyTransactionsByIdRequestBuilder withId(String id) { + return new ByProjectKeyTransactionsByIdRequestBuilder(apiHttpClient, projectKey, id); + } + + public ByProjectKeyTransactionsKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyTransactionsKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_paymentsTrait.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_paymentsTrait.java new file mode 100644 index 00000000000..40ca33aa243 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_paymentsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_manage_paymentsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_manage_paymentsTrait> { + + default Secured_by_manage_paymentsTrait asSecured_by_manage_paymentsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_manage_paymentsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_transactionsTrait.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_transactionsTrait.java new file mode 100644 index 00000000000..2c57b1eff25 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_transactionsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_manage_transactionsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_manage_transactionsTrait> { + + default Secured_by_manage_transactionsTrait asSecured_by_manage_transactionsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_manage_transactionsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_transactionsTrait.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_transactionsTrait.java new file mode 100644 index 00000000000..fcd23d3b593 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_transactionsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_view_transactionsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_view_transactionsTrait> { + + default Secured_by_view_transactionsTrait asSecured_by_view_transactionsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_view_transactionsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReference.java new file mode 100644 index 00000000000..504c83d88b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReference.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Reference to an Application.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApplicationReference applicationReference = ApplicationReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("application") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationReferenceImpl.class) +public interface ApplicationReference extends Reference { + + /** + * discriminator value for ApplicationReference + */ + String APPLICATION = "application"; + + /** + *

Unique identifier of the referenced Application.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Unique identifier of the referenced Application.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of ApplicationReference + */ + public static ApplicationReference of() { + return new ApplicationReferenceImpl(); + } + + /** + * factory method to create a shallow copy ApplicationReference + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationReference of(final ApplicationReference template) { + ApplicationReferenceImpl instance = new ApplicationReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public ApplicationReference copyDeep(); + + /** + * factory method to create a deep copy of ApplicationReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationReference deepCopy(@Nullable final ApplicationReference template) { + if (template == null) { + return null; + } + ApplicationReferenceImpl instance = new ApplicationReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for ApplicationReference + * @return builder + */ + public static ApplicationReferenceBuilder builder() { + return ApplicationReferenceBuilder.of(); + } + + /** + * create builder for ApplicationReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationReferenceBuilder builder(final ApplicationReference template) { + return ApplicationReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceBuilder.java new file mode 100644 index 00000000000..dc6ccb5fb72 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApplicationReference applicationReference = ApplicationReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationReferenceBuilder implements Builder { + + private String id; + + /** + *

Unique identifier of the referenced Application.

+ * @param id value to be set + * @return Builder + */ + + public ApplicationReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

Unique identifier of the referenced Application.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds ApplicationReference with checking for non-null required values + * @return ApplicationReference + */ + public ApplicationReference build() { + Objects.requireNonNull(id, ApplicationReference.class + ": id is missing"); + return new ApplicationReferenceImpl(id); + } + + /** + * builds ApplicationReference without checking for non-null required values + * @return ApplicationReference + */ + public ApplicationReference buildUnchecked() { + return new ApplicationReferenceImpl(id); + } + + /** + * factory method for an instance of ApplicationReferenceBuilder + * @return builder + */ + public static ApplicationReferenceBuilder of() { + return new ApplicationReferenceBuilder(); + } + + /** + * create builder for ApplicationReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationReferenceBuilder of(final ApplicationReference template) { + ApplicationReferenceBuilder builder = new ApplicationReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceImpl.java new file mode 100644 index 00000000000..52c58ec920c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Reference to an Application.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationReferenceImpl implements ApplicationReference, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("application"); + } + + /** + * create empty instance + */ + public ApplicationReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("application"); + } + + /** + *

Type of referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Application.

+ */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationReferenceImpl that = (ApplicationReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public ApplicationReference copyDeep() { + return ApplicationReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifier.java new file mode 100644 index 00000000000..81509d85373 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifier.java @@ -0,0 +1,145 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Resource identifier to an Application. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApplicationResourceIdentifier applicationResourceIdentifier = ApplicationResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("application") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationResourceIdentifierImpl.class) +public interface ApplicationResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for ApplicationResourceIdentifier + */ + String APPLICATION = "application"; + + /** + *

Unique identifier of the referenced Application. Required if key is absent.

+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the referenced Application. Required if id is absent.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Unique identifier of the referenced Application. Required if key is absent.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *

User-defined unique identifier of the referenced Application. Required if id is absent.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of ApplicationResourceIdentifier + */ + public static ApplicationResourceIdentifier of() { + return new ApplicationResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy ApplicationResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationResourceIdentifier of(final ApplicationResourceIdentifier template) { + ApplicationResourceIdentifierImpl instance = new ApplicationResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public ApplicationResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of ApplicationResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationResourceIdentifier deepCopy(@Nullable final ApplicationResourceIdentifier template) { + if (template == null) { + return null; + } + ApplicationResourceIdentifierImpl instance = new ApplicationResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for ApplicationResourceIdentifier + * @return builder + */ + public static ApplicationResourceIdentifierBuilder builder() { + return ApplicationResourceIdentifierBuilder.of(); + } + + /** + * create builder for ApplicationResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationResourceIdentifierBuilder builder(final ApplicationResourceIdentifier template) { + return ApplicationResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierBuilder.java new file mode 100644 index 00000000000..21c93a73730 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationResourceIdentifierBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApplicationResourceIdentifier applicationResourceIdentifier = ApplicationResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

Unique identifier of the referenced Application. Required if key is absent.

+ * @param id value to be set + * @return Builder + */ + + public ApplicationResourceIdentifierBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *

User-defined unique identifier of the referenced Application. Required if id is absent.

+ * @param key value to be set + * @return Builder + */ + + public ApplicationResourceIdentifierBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

Unique identifier of the referenced Application. Required if key is absent.

+ * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Application. Required if id is absent.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds ApplicationResourceIdentifier with checking for non-null required values + * @return ApplicationResourceIdentifier + */ + public ApplicationResourceIdentifier build() { + return new ApplicationResourceIdentifierImpl(id, key); + } + + /** + * builds ApplicationResourceIdentifier without checking for non-null required values + * @return ApplicationResourceIdentifier + */ + public ApplicationResourceIdentifier buildUnchecked() { + return new ApplicationResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of ApplicationResourceIdentifierBuilder + * @return builder + */ + public static ApplicationResourceIdentifierBuilder of() { + return new ApplicationResourceIdentifierBuilder(); + } + + /** + * create builder for ApplicationResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationResourceIdentifierBuilder of(final ApplicationResourceIdentifier template) { + ApplicationResourceIdentifierBuilder builder = new ApplicationResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierImpl.java new file mode 100644 index 00000000000..68d840ee4c4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Resource identifier to an Application. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationResourceIdentifierImpl implements ApplicationResourceIdentifier, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("application"); + } + + /** + * create empty instance + */ + public ApplicationResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("application"); + } + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Application. Required if key is absent.

+ */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Application. Required if id is absent.

+ */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationResourceIdentifierImpl that = (ApplicationResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public ApplicationResourceIdentifier copyDeep() { + return ApplicationResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReference.java new file mode 100644 index 00000000000..5936a48afd8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReference.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.cart; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Reference to a Cart.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartReference cartReference = CartReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("cart") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartReferenceImpl.class) +public interface CartReference extends Reference { + + /** + * discriminator value for CartReference + */ + String CART = "cart"; + + /** + *

Unique identifier of the referenced Cart.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Unique identifier of the referenced Cart.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of CartReference + */ + public static CartReference of() { + return new CartReferenceImpl(); + } + + /** + * factory method to create a shallow copy CartReference + * @param template instance to be copied + * @return copy instance + */ + public static CartReference of(final CartReference template) { + CartReferenceImpl instance = new CartReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public CartReference copyDeep(); + + /** + * factory method to create a deep copy of CartReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartReference deepCopy(@Nullable final CartReference template) { + if (template == null) { + return null; + } + CartReferenceImpl instance = new CartReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for CartReference + * @return builder + */ + public static CartReferenceBuilder builder() { + return CartReferenceBuilder.of(); + } + + /** + * create builder for CartReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartReferenceBuilder builder(final CartReference template) { + return CartReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReferenceBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReferenceBuilder.java new file mode 100644 index 00000000000..23d05276389 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.cart; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartReference cartReference = CartReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartReferenceBuilder implements Builder { + + private String id; + + /** + *

Unique identifier of the referenced Cart.

+ * @param id value to be set + * @return Builder + */ + + public CartReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

Unique identifier of the referenced Cart.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds CartReference with checking for non-null required values + * @return CartReference + */ + public CartReference build() { + Objects.requireNonNull(id, CartReference.class + ": id is missing"); + return new CartReferenceImpl(id); + } + + /** + * builds CartReference without checking for non-null required values + * @return CartReference + */ + public CartReference buildUnchecked() { + return new CartReferenceImpl(id); + } + + /** + * factory method for an instance of CartReferenceBuilder + * @return builder + */ + public static CartReferenceBuilder of() { + return new CartReferenceBuilder(); + } + + /** + * create builder for CartReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartReferenceBuilder of(final CartReference template) { + CartReferenceBuilder builder = new CartReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReferenceImpl.java new file mode 100644 index 00000000000..d08c062b14c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartReferenceImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.cart; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Reference to a Cart.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartReferenceImpl implements CartReference, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + CartReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("cart"); + } + + /** + * create empty instance + */ + public CartReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("cart"); + } + + /** + *

Type of referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Cart.

+ */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartReferenceImpl that = (CartReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public CartReference copyDeep() { + return CartReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifier.java new file mode 100644 index 00000000000..89404266233 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifier.java @@ -0,0 +1,145 @@ + +package com.commercetools.checkout.models.cart; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Resource identifier to a Cart. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartResourceIdentifier cartResourceIdentifier = CartResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("cart") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartResourceIdentifierImpl.class) +public interface CartResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for CartResourceIdentifier + */ + String CART = "cart"; + + /** + *

Unique identifier of the referenced Cart. Required if key is absent.

+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the referenced Cart. Required if id is absent.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Unique identifier of the referenced Cart. Required if key is absent.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *

User-defined unique identifier of the referenced Cart. Required if id is absent.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of CartResourceIdentifier + */ + public static CartResourceIdentifier of() { + return new CartResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy CartResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static CartResourceIdentifier of(final CartResourceIdentifier template) { + CartResourceIdentifierImpl instance = new CartResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public CartResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of CartResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartResourceIdentifier deepCopy(@Nullable final CartResourceIdentifier template) { + if (template == null) { + return null; + } + CartResourceIdentifierImpl instance = new CartResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for CartResourceIdentifier + * @return builder + */ + public static CartResourceIdentifierBuilder builder() { + return CartResourceIdentifierBuilder.of(); + } + + /** + * create builder for CartResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartResourceIdentifierBuilder builder(final CartResourceIdentifier template) { + return CartResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierBuilder.java new file mode 100644 index 00000000000..593d280d06a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.cart; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartResourceIdentifierBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartResourceIdentifier cartResourceIdentifier = CartResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

Unique identifier of the referenced Cart. Required if key is absent.

+ * @param id value to be set + * @return Builder + */ + + public CartResourceIdentifierBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *

User-defined unique identifier of the referenced Cart. Required if id is absent.

+ * @param key value to be set + * @return Builder + */ + + public CartResourceIdentifierBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

Unique identifier of the referenced Cart. Required if key is absent.

+ * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Cart. Required if id is absent.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds CartResourceIdentifier with checking for non-null required values + * @return CartResourceIdentifier + */ + public CartResourceIdentifier build() { + return new CartResourceIdentifierImpl(id, key); + } + + /** + * builds CartResourceIdentifier without checking for non-null required values + * @return CartResourceIdentifier + */ + public CartResourceIdentifier buildUnchecked() { + return new CartResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of CartResourceIdentifierBuilder + * @return builder + */ + public static CartResourceIdentifierBuilder of() { + return new CartResourceIdentifierBuilder(); + } + + /** + * create builder for CartResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartResourceIdentifierBuilder of(final CartResourceIdentifier template) { + CartResourceIdentifierBuilder builder = new CartResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierImpl.java new file mode 100644 index 00000000000..35570d4dadb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.cart; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Resource identifier to a Cart. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartResourceIdentifierImpl implements CartResourceIdentifier, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + CartResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("cart"); + } + + /** + * create empty instance + */ + public CartResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("cart"); + } + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Cart. Required if key is absent.

+ */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Cart. Required if id is absent.

+ */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartResourceIdentifierImpl that = (CartResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public CartResourceIdentifier copyDeep() { + return CartResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReference.java new file mode 100644 index 00000000000..4b921221b88 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReference.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.cart; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Reference to an Order.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderReference orderReference = OrderReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("order") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderReferenceImpl.class) +public interface OrderReference extends Reference { + + /** + * discriminator value for OrderReference + */ + String ORDER = "order"; + + /** + *

Unique identifier of the referenced Order.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Unique identifier of the referenced Order.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of OrderReference + */ + public static OrderReference of() { + return new OrderReferenceImpl(); + } + + /** + * factory method to create a shallow copy OrderReference + * @param template instance to be copied + * @return copy instance + */ + public static OrderReference of(final OrderReference template) { + OrderReferenceImpl instance = new OrderReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public OrderReference copyDeep(); + + /** + * factory method to create a deep copy of OrderReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderReference deepCopy(@Nullable final OrderReference template) { + if (template == null) { + return null; + } + OrderReferenceImpl instance = new OrderReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for OrderReference + * @return builder + */ + public static OrderReferenceBuilder builder() { + return OrderReferenceBuilder.of(); + } + + /** + * create builder for OrderReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderReferenceBuilder builder(final OrderReference template) { + return OrderReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReferenceBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReferenceBuilder.java new file mode 100644 index 00000000000..8dfbc655f78 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.cart; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderReference orderReference = OrderReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderReferenceBuilder implements Builder { + + private String id; + + /** + *

Unique identifier of the referenced Order.

+ * @param id value to be set + * @return Builder + */ + + public OrderReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

Unique identifier of the referenced Order.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds OrderReference with checking for non-null required values + * @return OrderReference + */ + public OrderReference build() { + Objects.requireNonNull(id, OrderReference.class + ": id is missing"); + return new OrderReferenceImpl(id); + } + + /** + * builds OrderReference without checking for non-null required values + * @return OrderReference + */ + public OrderReference buildUnchecked() { + return new OrderReferenceImpl(id); + } + + /** + * factory method for an instance of OrderReferenceBuilder + * @return builder + */ + public static OrderReferenceBuilder of() { + return new OrderReferenceBuilder(); + } + + /** + * create builder for OrderReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderReferenceBuilder of(final OrderReference template) { + OrderReferenceBuilder builder = new OrderReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReferenceImpl.java new file mode 100644 index 00000000000..7724a04202e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/OrderReferenceImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.cart; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Reference to an Order.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderReferenceImpl implements OrderReference, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + OrderReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("order"); + } + + /** + * create empty instance + */ + public OrderReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("order"); + } + + /** + *

Type of referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Order.

+ */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderReferenceImpl that = (OrderReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public OrderReference copyDeep() { + return OrderReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Amount.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Amount.java new file mode 100644 index 00000000000..b4c15ca8e1e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Amount.java @@ -0,0 +1,150 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Money in cent amounts for a specific currency.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     Amount amount = Amount.builder()
+ *             .centAmount(1)
+ *             .currencyCode("{currencyCode}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AmountImpl.class) +public interface Amount { + + /** + *

Amount in the smallest indivisible unit of a currency, such as:

+ *
    + *
  • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
  • + *
  • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
  • + *
+ * @return centAmount + */ + @NotNull + @JsonProperty("centAmount") + public Integer getCentAmount(); + + /** + *

Currency code compliant to ISO 4217.

+ * @return currencyCode + */ + @NotNull + @JsonProperty("currencyCode") + public String getCurrencyCode(); + + /** + *

Amount in the smallest indivisible unit of a currency, such as:

+ *
    + *
  • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
  • + *
  • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
  • + *
+ * @param centAmount value to be set + */ + + public void setCentAmount(final Integer centAmount); + + /** + *

Currency code compliant to ISO 4217.

+ * @param currencyCode value to be set + */ + + public void setCurrencyCode(final String currencyCode); + + /** + * factory method + * @return instance of Amount + */ + public static Amount of() { + return new AmountImpl(); + } + + /** + * factory method to create a shallow copy Amount + * @param template instance to be copied + * @return copy instance + */ + public static Amount of(final Amount template) { + AmountImpl instance = new AmountImpl(); + instance.setCentAmount(template.getCentAmount()); + instance.setCurrencyCode(template.getCurrencyCode()); + return instance; + } + + public Amount copyDeep(); + + /** + * factory method to create a deep copy of Amount + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Amount deepCopy(@Nullable final Amount template) { + if (template == null) { + return null; + } + AmountImpl instance = new AmountImpl(); + instance.setCentAmount(template.getCentAmount()); + instance.setCurrencyCode(template.getCurrencyCode()); + return instance; + } + + /** + * builder factory method for Amount + * @return builder + */ + public static AmountBuilder builder() { + return AmountBuilder.of(); + } + + /** + * create builder for Amount instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AmountBuilder builder(final Amount template) { + return AmountBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAmount(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/AmountBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/AmountBuilder.java new file mode 100644 index 00000000000..6a97408d062 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/AmountBuilder.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AmountBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     Amount amount = Amount.builder()
+ *             .centAmount(1)
+ *             .currencyCode("{currencyCode}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AmountBuilder implements Builder { + + private Integer centAmount; + + private String currencyCode; + + /** + *

Amount in the smallest indivisible unit of a currency, such as:

+ *
    + *
  • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
  • + *
  • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
  • + *
+ * @param centAmount value to be set + * @return Builder + */ + + public AmountBuilder centAmount(final Integer centAmount) { + this.centAmount = centAmount; + return this; + } + + /** + *

Currency code compliant to ISO 4217.

+ * @param currencyCode value to be set + * @return Builder + */ + + public AmountBuilder currencyCode(final String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + *

Amount in the smallest indivisible unit of a currency, such as:

+ *
    + *
  • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
  • + *
  • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
  • + *
+ * @return centAmount + */ + + public Integer getCentAmount() { + return this.centAmount; + } + + /** + *

Currency code compliant to ISO 4217.

+ * @return currencyCode + */ + + public String getCurrencyCode() { + return this.currencyCode; + } + + /** + * builds Amount with checking for non-null required values + * @return Amount + */ + public Amount build() { + Objects.requireNonNull(centAmount, Amount.class + ": centAmount is missing"); + Objects.requireNonNull(currencyCode, Amount.class + ": currencyCode is missing"); + return new AmountImpl(centAmount, currencyCode); + } + + /** + * builds Amount without checking for non-null required values + * @return Amount + */ + public Amount buildUnchecked() { + return new AmountImpl(centAmount, currencyCode); + } + + /** + * factory method for an instance of AmountBuilder + * @return builder + */ + public static AmountBuilder of() { + return new AmountBuilder(); + } + + /** + * create builder for Amount instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AmountBuilder of(final Amount template) { + AmountBuilder builder = new AmountBuilder(); + builder.centAmount = template.getCentAmount(); + builder.currencyCode = template.getCurrencyCode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/AmountImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/AmountImpl.java new file mode 100644 index 00000000000..63532cdc143 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/AmountImpl.java @@ -0,0 +1,106 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Money in cent amounts for a specific currency.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AmountImpl implements Amount, ModelBase { + + private Integer centAmount; + + private String currencyCode; + + /** + * create instance with all properties + */ + @JsonCreator + AmountImpl(@JsonProperty("centAmount") final Integer centAmount, + @JsonProperty("currencyCode") final String currencyCode) { + this.centAmount = centAmount; + this.currencyCode = currencyCode; + } + + /** + * create empty instance + */ + public AmountImpl() { + } + + /** + *

Amount in the smallest indivisible unit of a currency, such as:

+ *
    + *
  • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
  • + *
  • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
  • + *
+ */ + + public Integer getCentAmount() { + return this.centAmount; + } + + /** + *

Currency code compliant to ISO 4217.

+ */ + + public String getCurrencyCode() { + return this.currencyCode; + } + + public void setCentAmount(final Integer centAmount) { + this.centAmount = centAmount; + } + + public void setCurrencyCode(final String currencyCode) { + this.currencyCode = currencyCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AmountImpl that = (AmountImpl) o; + + return new EqualsBuilder().append(centAmount, that.centAmount) + .append(currencyCode, that.currencyCode) + .append(centAmount, that.centAmount) + .append(currencyCode, that.currencyCode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(centAmount).append(currencyCode).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("centAmount", centAmount) + .append("currencyCode", currencyCode) + .build(); + } + + @Override + public Amount copyDeep() { + return Amount.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Reference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Reference.java new file mode 100644 index 00000000000..2e9506a5203 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Reference.java @@ -0,0 +1,141 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     Reference reference = Reference.applicationBuilder()
+ *             id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "typeId", defaultImpl = ReferenceImpl.class, visible = true) +@JsonDeserialize(as = ReferenceImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Reference { + + /** + *

Type of referenced resource.

+ * @return typeId + */ + @NotNull + @JsonProperty("typeId") + public ReferenceTypeId getTypeId(); + + /** + *

Unique ID of the referenced resource.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Unique ID of the referenced resource.

+ * @param id value to be set + */ + + public void setId(final String id); + + public Reference copyDeep(); + + /** + * factory method to create a deep copy of Reference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Reference deepCopy(@Nullable final Reference template) { + if (template == null) { + return null; + } + + if (!(template instanceof ReferenceImpl)) { + return template.copyDeep(); + } + ReferenceImpl instance = new ReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder for application subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.ApplicationReferenceBuilder applicationBuilder() { + return com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of(); + } + + /** + * builder for cart subtype + * @return builder + */ + public static com.commercetools.checkout.models.cart.CartReferenceBuilder cartBuilder() { + return com.commercetools.checkout.models.cart.CartReferenceBuilder.of(); + } + + /** + * builder for order subtype + * @return builder + */ + public static com.commercetools.checkout.models.cart.OrderReferenceBuilder orderBuilder() { + return com.commercetools.checkout.models.cart.OrderReferenceBuilder.of(); + } + + /** + * builder for paymentIntegration subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceBuilder paymentIntegrationBuilder() { + return com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceBuilder.of(); + } + + /** + * builder for payment subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment.PaymentReferenceBuilder paymentBuilder() { + return com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceBuilder.java new file mode 100644 index 00000000000..42067314e9c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceBuilder.java @@ -0,0 +1,42 @@ + +package com.commercetools.checkout.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ReferenceBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ReferenceBuilder { + + public com.commercetools.checkout.models.application.ApplicationReferenceBuilder applicationBuilder() { + return com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of(); + } + + public com.commercetools.checkout.models.cart.CartReferenceBuilder cartBuilder() { + return com.commercetools.checkout.models.cart.CartReferenceBuilder.of(); + } + + public com.commercetools.checkout.models.cart.OrderReferenceBuilder orderBuilder() { + return com.commercetools.checkout.models.cart.OrderReferenceBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceBuilder paymentIntegrationBuilder() { + return com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceBuilder.of(); + } + + public com.commercetools.checkout.models.payment.PaymentReferenceBuilder paymentBuilder() { + return com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of(); + } + + /** + * factory method for an instance of ReferenceBuilder + * @return builder + */ + public static ReferenceBuilder of() { + return new ReferenceBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceImpl.java new file mode 100644 index 00000000000..baf4c5e1994 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ReferenceImpl implements Reference, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ReferenceImpl(@JsonProperty("typeId") final com.commercetools.checkout.models.common.ReferenceTypeId typeId, + @JsonProperty("id") final String id) { + this.typeId = typeId; + this.id = id; + } + + /** + * create empty instance + */ + public ReferenceImpl() { + } + + /** + *

Type of referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique ID of the referenced resource.

+ */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ReferenceImpl that = (ReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public Reference copyDeep() { + return Reference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceTypeId.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceTypeId.java new file mode 100644 index 00000000000..1d8cc1e9979 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceTypeId.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.common; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Type of resource the value should reference. Supported resource type identifiers are:

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ReferenceTypeId extends JsonEnum { + + /** +

References a Cart.

*/ + ReferenceTypeId CART = ReferenceTypeIdEnum.CART; + /** +

References an Order.

*/ + ReferenceTypeId ORDER = ReferenceTypeIdEnum.ORDER; + /** +

References a Payment.

*/ + ReferenceTypeId PAYMENT = ReferenceTypeIdEnum.PAYMENT; + /** +

References an Application.

*/ + ReferenceTypeId APPLICATION = ReferenceTypeIdEnum.APPLICATION; + /** +

References a Payment Integration.

*/ + ReferenceTypeId PAYMENT_INTEGRATION = ReferenceTypeIdEnum.PAYMENT_INTEGRATION; + + /** + * possible values of ReferenceTypeId + */ + enum ReferenceTypeIdEnum implements ReferenceTypeId { + /** + * cart + */ + CART("cart"), + + /** + * order + */ + ORDER("order"), + + /** + * payment + */ + PAYMENT("payment"), + + /** + * application + */ + APPLICATION("application"), + + /** + * payment-integration + */ + PAYMENT_INTEGRATION("payment-integration"); + private final String jsonName; + + private ReferenceTypeIdEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of ReferenceTypeId + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static ReferenceTypeId findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ReferenceTypeId() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static ReferenceTypeId[] values() { + return ReferenceTypeIdEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Region.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Region.java new file mode 100644 index 00000000000..06dd05b29d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Region.java @@ -0,0 +1,123 @@ + +package com.commercetools.checkout.models.common; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

The Region in which the Checkout application is hosted.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Region extends JsonEnum { + + /** +

for Europe (Google Cloud, Belgium)

*/ + Region EUROPE_WEST1_GCP = RegionEnum.EUROPE_WEST1_GCP; + /** +

for North America (Google Cloud, Iowa)

*/ + Region US_CENTRAL1_GCP = RegionEnum.US_CENTRAL1_GCP; + /** +

for Australia (Google Cloud, Sydney)

*/ + Region AUSTRALIA_SOUTHEAST1_GCP = RegionEnum.AUSTRALIA_SOUTHEAST1_GCP; + + /** + * possible values of Region + */ + enum RegionEnum implements Region { + /** + * europe-west1.gcp + */ + EUROPE_WEST1_GCP("europe-west1.gcp"), + + /** + * us-central1.gcp + */ + US_CENTRAL1_GCP("us-central1.gcp"), + + /** + * australia-southeast1.gcp + */ + AUSTRALIA_SOUTHEAST1_GCP("australia-southeast1.gcp"); + private final String jsonName; + + private RegionEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of Region + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static Region findEnum(String value) { + return findEnumViaJsonName(value).orElse(new Region() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static Region[] values() { + return RegionEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifier.java new file mode 100644 index 00000000000..63ba91da6e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifier.java @@ -0,0 +1,155 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Draft type to create a Reference or a KeyReference to a resource. Provide either the id or (wherever supported) the key of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field parent of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.

+ *

Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     ResourceIdentifier resourceIdentifier = ResourceIdentifier.applicationBuilder()
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "typeId", defaultImpl = ResourceIdentifierImpl.class, visible = true) +@JsonDeserialize(as = ResourceIdentifierImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ResourceIdentifier { + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ * @return typeId + */ + + @JsonProperty("typeId") + public ReferenceTypeId getTypeId(); + + /** + *

Unique identifier of the referenced resource. Required if key is absent.

+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the referenced resource. Required if id is absent.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Unique identifier of the referenced resource. Required if key is absent.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *

User-defined unique identifier of the referenced resource. Required if id is absent.

+ * @param key value to be set + */ + + public void setKey(final String key); + + public ResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of ResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ResourceIdentifier deepCopy(@Nullable final ResourceIdentifier template) { + if (template == null) { + return null; + } + + if (!(template instanceof ResourceIdentifierImpl)) { + return template.copyDeep(); + } + ResourceIdentifierImpl instance = new ResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder for application subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder applicationBuilder() { + return com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of(); + } + + /** + * builder for cart subtype + * @return builder + */ + public static com.commercetools.checkout.models.cart.CartResourceIdentifierBuilder cartBuilder() { + return com.commercetools.checkout.models.cart.CartResourceIdentifierBuilder.of(); + } + + /** + * builder for order subtype + * @return builder + */ + public static com.commercetools.checkout.models.order.OrderResourceIdentifierBuilder orderBuilder() { + return com.commercetools.checkout.models.order.OrderResourceIdentifierBuilder.of(); + } + + /** + * builder for paymentIntegration subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierBuilder paymentIntegrationBuilder() { + return com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierBuilder.of(); + } + + /** + * builder for payment subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment.PaymentResourceIdentifierBuilder paymentBuilder() { + return com.commercetools.checkout.models.payment.PaymentResourceIdentifierBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierBuilder.java new file mode 100644 index 00000000000..c9791141d3a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierBuilder.java @@ -0,0 +1,42 @@ + +package com.commercetools.checkout.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ResourceIdentifierBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ResourceIdentifierBuilder { + + public com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder applicationBuilder() { + return com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of(); + } + + public com.commercetools.checkout.models.cart.CartResourceIdentifierBuilder cartBuilder() { + return com.commercetools.checkout.models.cart.CartResourceIdentifierBuilder.of(); + } + + public com.commercetools.checkout.models.order.OrderResourceIdentifierBuilder orderBuilder() { + return com.commercetools.checkout.models.order.OrderResourceIdentifierBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierBuilder paymentIntegrationBuilder() { + return com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierBuilder.of(); + } + + public com.commercetools.checkout.models.payment.PaymentResourceIdentifierBuilder paymentBuilder() { + return com.commercetools.checkout.models.payment.PaymentResourceIdentifierBuilder.of(); + } + + /** + * factory method for an instance of ResourceIdentifierBuilder + * @return builder + */ + public static ResourceIdentifierBuilder of() { + return new ResourceIdentifierBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierImpl.java new file mode 100644 index 00000000000..460410923a9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Draft type to create a Reference or a KeyReference to a resource. Provide either the id or (wherever supported) the key of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field parent of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.

+ *

Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ResourceIdentifierImpl implements ResourceIdentifier, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + ResourceIdentifierImpl( + @JsonProperty("typeId") final com.commercetools.checkout.models.common.ReferenceTypeId typeId, + @JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.typeId = typeId; + this.id = id; + this.key = key; + } + + /** + * create empty instance + */ + public ResourceIdentifierImpl() { + } + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced resource. Required if key is absent.

+ */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced resource. Required if id is absent.

+ */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ResourceIdentifierImpl that = (ResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public ResourceIdentifier copyDeep() { + return ResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedError.java new file mode 100644 index 00000000000..00fe7b0be50 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when the payment Connector cannot be reached.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ConnectorFailedError connectorFailedError = ConnectorFailedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("ConnectorFailed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ConnectorFailedErrorImpl.class) +public interface ConnectorFailedError extends ErrorObject { + + /** + * discriminator value for ConnectorFailedError + */ + String CONNECTOR_FAILED = "ConnectorFailed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"The connector could not be reached."

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

"The connector could not be reached."

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of ConnectorFailedError + */ + public static ConnectorFailedError of() { + return new ConnectorFailedErrorImpl(); + } + + /** + * factory method to create a shallow copy ConnectorFailedError + * @param template instance to be copied + * @return copy instance + */ + public static ConnectorFailedError of(final ConnectorFailedError template) { + ConnectorFailedErrorImpl instance = new ConnectorFailedErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public ConnectorFailedError copyDeep(); + + /** + * factory method to create a deep copy of ConnectorFailedError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ConnectorFailedError deepCopy(@Nullable final ConnectorFailedError template) { + if (template == null) { + return null; + } + ConnectorFailedErrorImpl instance = new ConnectorFailedErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for ConnectorFailedError + * @return builder + */ + public static ConnectorFailedErrorBuilder builder() { + return ConnectorFailedErrorBuilder.of(); + } + + /** + * create builder for ConnectorFailedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConnectorFailedErrorBuilder builder(final ConnectorFailedError template) { + return ConnectorFailedErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withConnectorFailedError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorBuilder.java new file mode 100644 index 00000000000..e2a21ecdf01 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ConnectorFailedErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ConnectorFailedError connectorFailedError = ConnectorFailedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConnectorFailedErrorBuilder implements Builder { + + private String message; + + /** + *

"The connector could not be reached."

+ * @param message value to be set + * @return Builder + */ + + public ConnectorFailedErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

"The connector could not be reached."

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds ConnectorFailedError with checking for non-null required values + * @return ConnectorFailedError + */ + public ConnectorFailedError build() { + Objects.requireNonNull(message, ConnectorFailedError.class + ": message is missing"); + return new ConnectorFailedErrorImpl(message); + } + + /** + * builds ConnectorFailedError without checking for non-null required values + * @return ConnectorFailedError + */ + public ConnectorFailedError buildUnchecked() { + return new ConnectorFailedErrorImpl(message); + } + + /** + * factory method for an instance of ConnectorFailedErrorBuilder + * @return builder + */ + public static ConnectorFailedErrorBuilder of() { + return new ConnectorFailedErrorBuilder(); + } + + /** + * create builder for ConnectorFailedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConnectorFailedErrorBuilder of(final ConnectorFailedError template) { + ConnectorFailedErrorBuilder builder = new ConnectorFailedErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorImpl.java new file mode 100644 index 00000000000..4c182d1dac2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when the payment Connector cannot be reached.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConnectorFailedErrorImpl implements ConnectorFailedError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + ConnectorFailedErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = CONNECTOR_FAILED; + } + + /** + * create empty instance + */ + public ConnectorFailedErrorImpl() { + this.code = CONNECTOR_FAILED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"The connector could not be reached."

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ConnectorFailedErrorImpl that = (ConnectorFailedErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public ConnectorFailedError copyDeep() { + return ConnectorFailedError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObject.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObject.java new file mode 100644 index 00000000000..c7bde8ae59f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObject.java @@ -0,0 +1,165 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

This is the representation of a single error.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     ErrorObject errorObject = ErrorObject.connectorFailedBuilder()
+ *             message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "code", defaultImpl = ErrorObjectImpl.class, visible = true) +@JsonDeserialize(as = ErrorObjectImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ErrorObject { + + /** + *

Error identifier.

+ * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Plain text description of the cause of the error.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Plain text description of the cause of the error.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + public ErrorObject copyDeep(); + + /** + * factory method to create a deep copy of ErrorObject + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ErrorObject deepCopy(@Nullable final ErrorObject template) { + if (template == null) { + return null; + } + + if (!(template instanceof ErrorObjectImpl)) { + return template.copyDeep(); + } + ErrorObjectImpl instance = new ErrorObjectImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder for connectorFailed subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.ConnectorFailedErrorBuilder connectorFailedBuilder() { + return com.commercetools.checkout.models.error.ConnectorFailedErrorBuilder.of(); + } + + /** + * builder for general subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.GeneralErrorBuilder generalBuilder() { + return com.commercetools.checkout.models.error.GeneralErrorBuilder.of(); + } + + /** + * builder for invalidInput subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.InvalidInputErrorBuilder invalidInputBuilder() { + return com.commercetools.checkout.models.error.InvalidInputErrorBuilder.of(); + } + + /** + * builder for invalidJsonInput subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.InvalidJsonInputErrorBuilder invalidJsonInputBuilder() { + return com.commercetools.checkout.models.error.InvalidJsonInputErrorBuilder.of(); + } + + /** + * builder for multipleActionsNotAllowed subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.MultipleActionsNotAllowedErrorBuilder multipleActionsNotAllowedBuilder() { + return com.commercetools.checkout.models.error.MultipleActionsNotAllowedErrorBuilder.of(); + } + + /** + * builder for paymentFailure subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.PaymentFailureErrorBuilder paymentFailureBuilder() { + return com.commercetools.checkout.models.error.PaymentFailureErrorBuilder.of(); + } + + /** + * builder for requiredField subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.RequiredFieldErrorBuilder requiredFieldBuilder() { + return com.commercetools.checkout.models.error.RequiredFieldErrorBuilder.of(); + } + + /** + * builder for resourceNotFound subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.ResourceNotFoundErrorBuilder resourceNotFoundBuilder() { + return com.commercetools.checkout.models.error.ResourceNotFoundErrorBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withErrorObject(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectBuilder.java new file mode 100644 index 00000000000..9e8e13e6562 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectBuilder.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ErrorObjectBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ErrorObjectBuilder { + + public com.commercetools.checkout.models.error.ConnectorFailedErrorBuilder connectorFailedBuilder() { + return com.commercetools.checkout.models.error.ConnectorFailedErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.GeneralErrorBuilder generalBuilder() { + return com.commercetools.checkout.models.error.GeneralErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.InvalidInputErrorBuilder invalidInputBuilder() { + return com.commercetools.checkout.models.error.InvalidInputErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.InvalidJsonInputErrorBuilder invalidJsonInputBuilder() { + return com.commercetools.checkout.models.error.InvalidJsonInputErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.MultipleActionsNotAllowedErrorBuilder multipleActionsNotAllowedBuilder() { + return com.commercetools.checkout.models.error.MultipleActionsNotAllowedErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.PaymentFailureErrorBuilder paymentFailureBuilder() { + return com.commercetools.checkout.models.error.PaymentFailureErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.RequiredFieldErrorBuilder requiredFieldBuilder() { + return com.commercetools.checkout.models.error.RequiredFieldErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.ResourceNotFoundErrorBuilder resourceNotFoundBuilder() { + return com.commercetools.checkout.models.error.ResourceNotFoundErrorBuilder.of(); + } + + /** + * factory method for an instance of ErrorObjectBuilder + * @return builder + */ + public static ErrorObjectBuilder of() { + return new ErrorObjectBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectImpl.java new file mode 100644 index 00000000000..8b248201771 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectImpl.java @@ -0,0 +1,97 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

This is the representation of a single error.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ErrorObjectImpl implements ErrorObject, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + ErrorObjectImpl(@JsonProperty("code") final String code, @JsonProperty("message") final String message) { + this.code = code; + this.message = message; + } + + /** + * create empty instance + */ + public ErrorObjectImpl() { + } + + /** + *

Error identifier.

+ */ + + public String getCode() { + return this.code; + } + + /** + *

Plain text description of the cause of the error.

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ErrorObjectImpl that = (ErrorObjectImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public ErrorObject copyDeep() { + return ErrorObject.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralError.java new file mode 100644 index 00000000000..efadfccd4b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralError.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when a server-side problem occurs. In some cases, the requested action may successfully complete after the error is returned. Therefore, it is recommended to verify the status of the requested resource after receiving a 500 error.

+ *

If you encounter this error, report it to the Checkout support team.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GeneralError generalError = GeneralError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("General") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GeneralErrorImpl.class) +public interface GeneralError extends ErrorObject { + + /** + * discriminator value for GeneralError + */ + String GENERAL = "General"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of GeneralError + */ + public static GeneralError of() { + return new GeneralErrorImpl(); + } + + /** + * factory method to create a shallow copy GeneralError + * @param template instance to be copied + * @return copy instance + */ + public static GeneralError of(final GeneralError template) { + GeneralErrorImpl instance = new GeneralErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public GeneralError copyDeep(); + + /** + * factory method to create a deep copy of GeneralError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GeneralError deepCopy(@Nullable final GeneralError template) { + if (template == null) { + return null; + } + GeneralErrorImpl instance = new GeneralErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for GeneralError + * @return builder + */ + public static GeneralErrorBuilder builder() { + return GeneralErrorBuilder.of(); + } + + /** + * create builder for GeneralError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GeneralErrorBuilder builder(final GeneralError template) { + return GeneralErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGeneralError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralErrorBuilder.java new file mode 100644 index 00000000000..2d81b19d361 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GeneralErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GeneralError generalError = GeneralError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GeneralErrorBuilder implements Builder { + + private String message; + + /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ * @param message value to be set + * @return Builder + */ + + public GeneralErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds GeneralError with checking for non-null required values + * @return GeneralError + */ + public GeneralError build() { + Objects.requireNonNull(message, GeneralError.class + ": message is missing"); + return new GeneralErrorImpl(message); + } + + /** + * builds GeneralError without checking for non-null required values + * @return GeneralError + */ + public GeneralError buildUnchecked() { + return new GeneralErrorImpl(message); + } + + /** + * factory method for an instance of GeneralErrorBuilder + * @return builder + */ + public static GeneralErrorBuilder of() { + return new GeneralErrorBuilder(); + } + + /** + * create builder for GeneralError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GeneralErrorBuilder of(final GeneralError template) { + GeneralErrorBuilder builder = new GeneralErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralErrorImpl.java new file mode 100644 index 00000000000..6ecbf47834b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/GeneralErrorImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when a server-side problem occurs. In some cases, the requested action may successfully complete after the error is returned. Therefore, it is recommended to verify the status of the requested resource after receiving a 500 error.

+ *

If you encounter this error, report it to the Checkout support team.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GeneralErrorImpl implements GeneralError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + GeneralErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = GENERAL; + } + + /** + * create empty instance + */ + public GeneralErrorImpl() { + this.code = GENERAL; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GeneralErrorImpl that = (GeneralErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public GeneralError copyDeep() { + return GeneralError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputError.java new file mode 100644 index 00000000000..886fec4d9b9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when input is not valid.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidInputError invalidInputError = InvalidInputError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("InvalidInput") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InvalidInputErrorImpl.class) +public interface InvalidInputError extends ErrorObject { + + /** + * discriminator value for InvalidInputError + */ + String INVALID_INPUT = "InvalidInput"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Description of the invalid input error.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Description of the invalid input error.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of InvalidInputError + */ + public static InvalidInputError of() { + return new InvalidInputErrorImpl(); + } + + /** + * factory method to create a shallow copy InvalidInputError + * @param template instance to be copied + * @return copy instance + */ + public static InvalidInputError of(final InvalidInputError template) { + InvalidInputErrorImpl instance = new InvalidInputErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public InvalidInputError copyDeep(); + + /** + * factory method to create a deep copy of InvalidInputError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InvalidInputError deepCopy(@Nullable final InvalidInputError template) { + if (template == null) { + return null; + } + InvalidInputErrorImpl instance = new InvalidInputErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for InvalidInputError + * @return builder + */ + public static InvalidInputErrorBuilder builder() { + return InvalidInputErrorBuilder.of(); + } + + /** + * create builder for InvalidInputError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidInputErrorBuilder builder(final InvalidInputError template) { + return InvalidInputErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInvalidInputError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorBuilder.java new file mode 100644 index 00000000000..4177faa9f59 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InvalidInputErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidInputError invalidInputError = InvalidInputError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidInputErrorBuilder implements Builder { + + private String message; + + /** + *

Description of the invalid input error.

+ * @param message value to be set + * @return Builder + */ + + public InvalidInputErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Description of the invalid input error.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds InvalidInputError with checking for non-null required values + * @return InvalidInputError + */ + public InvalidInputError build() { + Objects.requireNonNull(message, InvalidInputError.class + ": message is missing"); + return new InvalidInputErrorImpl(message); + } + + /** + * builds InvalidInputError without checking for non-null required values + * @return InvalidInputError + */ + public InvalidInputError buildUnchecked() { + return new InvalidInputErrorImpl(message); + } + + /** + * factory method for an instance of InvalidInputErrorBuilder + * @return builder + */ + public static InvalidInputErrorBuilder of() { + return new InvalidInputErrorBuilder(); + } + + /** + * create builder for InvalidInputError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidInputErrorBuilder of(final InvalidInputError template) { + InvalidInputErrorBuilder builder = new InvalidInputErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorImpl.java new file mode 100644 index 00000000000..3ade5968d9a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when input is not valid.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidInputErrorImpl implements InvalidInputError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + InvalidInputErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = INVALID_INPUT; + } + + /** + * create empty instance + */ + public InvalidInputErrorImpl() { + this.code = INVALID_INPUT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Description of the invalid input error.

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InvalidInputErrorImpl that = (InvalidInputErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public InvalidInputError copyDeep() { + return InvalidInputError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputError.java new file mode 100644 index 00000000000..ccf0e6f7a56 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputError.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when an invalid JSON input has been sent. Either the JSON is syntactically incorrect or does not conform to the expected shape, for example, it is missing a required field.

+ *

The client application should validate the input according to the constraints described in the error message before sending the request.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidJsonInputError invalidJsonInputError = InvalidJsonInputError.builder()
+ *             .message("{message}")
+ *             .detailedErrorMessage("{detailedErrorMessage}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("InvalidJsonInput") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InvalidJsonInputErrorImpl.class) +public interface InvalidJsonInputError extends ErrorObject { + + /** + * discriminator value for InvalidJsonInputError + */ + String INVALID_JSON_INPUT = "InvalidJsonInput"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"Request body does not contain valid JSON."

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Further explanation about why the JSON is invalid.

+ * @return detailedErrorMessage + */ + @NotNull + @JsonProperty("detailedErrorMessage") + public String getDetailedErrorMessage(); + + /** + *

"Request body does not contain valid JSON."

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Further explanation about why the JSON is invalid.

+ * @param detailedErrorMessage value to be set + */ + + public void setDetailedErrorMessage(final String detailedErrorMessage); + + /** + * factory method + * @return instance of InvalidJsonInputError + */ + public static InvalidJsonInputError of() { + return new InvalidJsonInputErrorImpl(); + } + + /** + * factory method to create a shallow copy InvalidJsonInputError + * @param template instance to be copied + * @return copy instance + */ + public static InvalidJsonInputError of(final InvalidJsonInputError template) { + InvalidJsonInputErrorImpl instance = new InvalidJsonInputErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setDetailedErrorMessage(template.getDetailedErrorMessage()); + return instance; + } + + public InvalidJsonInputError copyDeep(); + + /** + * factory method to create a deep copy of InvalidJsonInputError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InvalidJsonInputError deepCopy(@Nullable final InvalidJsonInputError template) { + if (template == null) { + return null; + } + InvalidJsonInputErrorImpl instance = new InvalidJsonInputErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setDetailedErrorMessage(template.getDetailedErrorMessage()); + return instance; + } + + /** + * builder factory method for InvalidJsonInputError + * @return builder + */ + public static InvalidJsonInputErrorBuilder builder() { + return InvalidJsonInputErrorBuilder.of(); + } + + /** + * create builder for InvalidJsonInputError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidJsonInputErrorBuilder builder(final InvalidJsonInputError template) { + return InvalidJsonInputErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInvalidJsonInputError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorBuilder.java new file mode 100644 index 00000000000..42452cfd00a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InvalidJsonInputErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidJsonInputError invalidJsonInputError = InvalidJsonInputError.builder()
+ *             .message("{message}")
+ *             .detailedErrorMessage("{detailedErrorMessage}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidJsonInputErrorBuilder implements Builder { + + private String message; + + private String detailedErrorMessage; + + /** + *

"Request body does not contain valid JSON."

+ * @param message value to be set + * @return Builder + */ + + public InvalidJsonInputErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Further explanation about why the JSON is invalid.

+ * @param detailedErrorMessage value to be set + * @return Builder + */ + + public InvalidJsonInputErrorBuilder detailedErrorMessage(final String detailedErrorMessage) { + this.detailedErrorMessage = detailedErrorMessage; + return this; + } + + /** + *

"Request body does not contain valid JSON."

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Further explanation about why the JSON is invalid.

+ * @return detailedErrorMessage + */ + + public String getDetailedErrorMessage() { + return this.detailedErrorMessage; + } + + /** + * builds InvalidJsonInputError with checking for non-null required values + * @return InvalidJsonInputError + */ + public InvalidJsonInputError build() { + Objects.requireNonNull(message, InvalidJsonInputError.class + ": message is missing"); + Objects.requireNonNull(detailedErrorMessage, InvalidJsonInputError.class + ": detailedErrorMessage is missing"); + return new InvalidJsonInputErrorImpl(message, detailedErrorMessage); + } + + /** + * builds InvalidJsonInputError without checking for non-null required values + * @return InvalidJsonInputError + */ + public InvalidJsonInputError buildUnchecked() { + return new InvalidJsonInputErrorImpl(message, detailedErrorMessage); + } + + /** + * factory method for an instance of InvalidJsonInputErrorBuilder + * @return builder + */ + public static InvalidJsonInputErrorBuilder of() { + return new InvalidJsonInputErrorBuilder(); + } + + /** + * create builder for InvalidJsonInputError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidJsonInputErrorBuilder of(final InvalidJsonInputError template) { + InvalidJsonInputErrorBuilder builder = new InvalidJsonInputErrorBuilder(); + builder.message = template.getMessage(); + builder.detailedErrorMessage = template.getDetailedErrorMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorImpl.java new file mode 100644 index 00000000000..7f1efffa8e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when an invalid JSON input has been sent. Either the JSON is syntactically incorrect or does not conform to the expected shape, for example, it is missing a required field.

+ *

The client application should validate the input according to the constraints described in the error message before sending the request.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidJsonInputErrorImpl implements InvalidJsonInputError, ModelBase { + + private String code; + + private String message; + + private String detailedErrorMessage; + + /** + * create instance with all properties + */ + @JsonCreator + InvalidJsonInputErrorImpl(@JsonProperty("message") final String message, + @JsonProperty("detailedErrorMessage") final String detailedErrorMessage) { + this.message = message; + this.detailedErrorMessage = detailedErrorMessage; + this.code = INVALID_JSON_INPUT; + } + + /** + * create empty instance + */ + public InvalidJsonInputErrorImpl() { + this.code = INVALID_JSON_INPUT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"Request body does not contain valid JSON."

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Further explanation about why the JSON is invalid.

+ */ + + public String getDetailedErrorMessage() { + return this.detailedErrorMessage; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setDetailedErrorMessage(final String detailedErrorMessage) { + this.detailedErrorMessage = detailedErrorMessage; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InvalidJsonInputErrorImpl that = (InvalidJsonInputErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(detailedErrorMessage, that.detailedErrorMessage) + .append(code, that.code) + .append(message, that.message) + .append(detailedErrorMessage, that.detailedErrorMessage) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).append(detailedErrorMessage).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("detailedErrorMessage", detailedErrorMessage) + .build(); + } + + @Override + public InvalidJsonInputError copyDeep() { + return InvalidJsonInputError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedError.java new file mode 100644 index 00000000000..f64034d4c94 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when actions in the request body contains more than one object.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     MultipleActionsNotAllowedError multipleActionsNotAllowedError = MultipleActionsNotAllowedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("MultipleActionsNotAllowed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MultipleActionsNotAllowedErrorImpl.class) +public interface MultipleActionsNotAllowedError extends ErrorObject { + + /** + * discriminator value for MultipleActionsNotAllowedError + */ + String MULTIPLE_ACTIONS_NOT_ALLOWED = "MultipleActionsNotAllowed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"Actions accepts only one action at time. Array size must be 1."

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

"Actions accepts only one action at time. Array size must be 1."

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of MultipleActionsNotAllowedError + */ + public static MultipleActionsNotAllowedError of() { + return new MultipleActionsNotAllowedErrorImpl(); + } + + /** + * factory method to create a shallow copy MultipleActionsNotAllowedError + * @param template instance to be copied + * @return copy instance + */ + public static MultipleActionsNotAllowedError of(final MultipleActionsNotAllowedError template) { + MultipleActionsNotAllowedErrorImpl instance = new MultipleActionsNotAllowedErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public MultipleActionsNotAllowedError copyDeep(); + + /** + * factory method to create a deep copy of MultipleActionsNotAllowedError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MultipleActionsNotAllowedError deepCopy(@Nullable final MultipleActionsNotAllowedError template) { + if (template == null) { + return null; + } + MultipleActionsNotAllowedErrorImpl instance = new MultipleActionsNotAllowedErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for MultipleActionsNotAllowedError + * @return builder + */ + public static MultipleActionsNotAllowedErrorBuilder builder() { + return MultipleActionsNotAllowedErrorBuilder.of(); + } + + /** + * create builder for MultipleActionsNotAllowedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MultipleActionsNotAllowedErrorBuilder builder(final MultipleActionsNotAllowedError template) { + return MultipleActionsNotAllowedErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMultipleActionsNotAllowedError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorBuilder.java new file mode 100644 index 00000000000..ea9d30e58e7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MultipleActionsNotAllowedErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     MultipleActionsNotAllowedError multipleActionsNotAllowedError = MultipleActionsNotAllowedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MultipleActionsNotAllowedErrorBuilder implements Builder { + + private String message; + + /** + *

"Actions accepts only one action at time. Array size must be 1."

+ * @param message value to be set + * @return Builder + */ + + public MultipleActionsNotAllowedErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

"Actions accepts only one action at time. Array size must be 1."

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds MultipleActionsNotAllowedError with checking for non-null required values + * @return MultipleActionsNotAllowedError + */ + public MultipleActionsNotAllowedError build() { + Objects.requireNonNull(message, MultipleActionsNotAllowedError.class + ": message is missing"); + return new MultipleActionsNotAllowedErrorImpl(message); + } + + /** + * builds MultipleActionsNotAllowedError without checking for non-null required values + * @return MultipleActionsNotAllowedError + */ + public MultipleActionsNotAllowedError buildUnchecked() { + return new MultipleActionsNotAllowedErrorImpl(message); + } + + /** + * factory method for an instance of MultipleActionsNotAllowedErrorBuilder + * @return builder + */ + public static MultipleActionsNotAllowedErrorBuilder of() { + return new MultipleActionsNotAllowedErrorBuilder(); + } + + /** + * create builder for MultipleActionsNotAllowedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MultipleActionsNotAllowedErrorBuilder of(final MultipleActionsNotAllowedError template) { + MultipleActionsNotAllowedErrorBuilder builder = new MultipleActionsNotAllowedErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorImpl.java new file mode 100644 index 00000000000..f149bf0e846 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when actions in the request body contains more than one object.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MultipleActionsNotAllowedErrorImpl implements MultipleActionsNotAllowedError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + MultipleActionsNotAllowedErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = MULTIPLE_ACTIONS_NOT_ALLOWED; + } + + /** + * create empty instance + */ + public MultipleActionsNotAllowedErrorImpl() { + this.code = MULTIPLE_ACTIONS_NOT_ALLOWED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"Actions accepts only one action at time. Array size must be 1."

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MultipleActionsNotAllowedErrorImpl that = (MultipleActionsNotAllowedErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public MultipleActionsNotAllowedError copyDeep() { + return MultipleActionsNotAllowedError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureError.java new file mode 100644 index 00000000000..fd4c6378959 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when the payment cannot be completed successfully.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentFailureError paymentFailureError = PaymentFailureError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("PaymentFailure") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentFailureErrorImpl.class) +public interface PaymentFailureError extends ErrorObject { + + /** + * discriminator value for PaymentFailureError + */ + String PAYMENT_FAILURE = "PaymentFailure"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"Payment could not be completed successfully."

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

"Payment could not be completed successfully."

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of PaymentFailureError + */ + public static PaymentFailureError of() { + return new PaymentFailureErrorImpl(); + } + + /** + * factory method to create a shallow copy PaymentFailureError + * @param template instance to be copied + * @return copy instance + */ + public static PaymentFailureError of(final PaymentFailureError template) { + PaymentFailureErrorImpl instance = new PaymentFailureErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public PaymentFailureError copyDeep(); + + /** + * factory method to create a deep copy of PaymentFailureError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentFailureError deepCopy(@Nullable final PaymentFailureError template) { + if (template == null) { + return null; + } + PaymentFailureErrorImpl instance = new PaymentFailureErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for PaymentFailureError + * @return builder + */ + public static PaymentFailureErrorBuilder builder() { + return PaymentFailureErrorBuilder.of(); + } + + /** + * create builder for PaymentFailureError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentFailureErrorBuilder builder(final PaymentFailureError template) { + return PaymentFailureErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentFailureError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorBuilder.java new file mode 100644 index 00000000000..d3b554dc27a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentFailureErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentFailureError paymentFailureError = PaymentFailureError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentFailureErrorBuilder implements Builder { + + private String message; + + /** + *

"Payment could not be completed successfully."

+ * @param message value to be set + * @return Builder + */ + + public PaymentFailureErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

"Payment could not be completed successfully."

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds PaymentFailureError with checking for non-null required values + * @return PaymentFailureError + */ + public PaymentFailureError build() { + Objects.requireNonNull(message, PaymentFailureError.class + ": message is missing"); + return new PaymentFailureErrorImpl(message); + } + + /** + * builds PaymentFailureError without checking for non-null required values + * @return PaymentFailureError + */ + public PaymentFailureError buildUnchecked() { + return new PaymentFailureErrorImpl(message); + } + + /** + * factory method for an instance of PaymentFailureErrorBuilder + * @return builder + */ + public static PaymentFailureErrorBuilder of() { + return new PaymentFailureErrorBuilder(); + } + + /** + * create builder for PaymentFailureError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentFailureErrorBuilder of(final PaymentFailureError template) { + PaymentFailureErrorBuilder builder = new PaymentFailureErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorImpl.java new file mode 100644 index 00000000000..fd7c778262a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when the payment cannot be completed successfully.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentFailureErrorImpl implements PaymentFailureError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentFailureErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = PAYMENT_FAILURE; + } + + /** + * create empty instance + */ + public PaymentFailureErrorImpl() { + this.code = PAYMENT_FAILURE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"Payment could not be completed successfully."

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentFailureErrorImpl that = (PaymentFailureErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public PaymentFailureError copyDeep() { + return PaymentFailureError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldError.java new file mode 100644 index 00000000000..86c1703cce0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldError.java @@ -0,0 +1,156 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when a value is not defined for a required field.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RequiredFieldError requiredFieldError = RequiredFieldError.builder()
+ *             .message("{message}")
+ *             .field("{field}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("RequiredField") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RequiredFieldErrorImpl.class) +public interface RequiredFieldError extends ErrorObject { + + /** + * discriminator value for RequiredFieldError + */ + String REQUIRED_FIELD = "RequiredField"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"A value is required for field $field."

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Name of the field missing the value.

+ * @return field + */ + @NotNull + @JsonProperty("field") + public String getField(); + + /** + *

"A value is required for field $field."

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Name of the field missing the value.

+ * @param field value to be set + */ + + public void setField(final String field); + + /** + * factory method + * @return instance of RequiredFieldError + */ + public static RequiredFieldError of() { + return new RequiredFieldErrorImpl(); + } + + /** + * factory method to create a shallow copy RequiredFieldError + * @param template instance to be copied + * @return copy instance + */ + public static RequiredFieldError of(final RequiredFieldError template) { + RequiredFieldErrorImpl instance = new RequiredFieldErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setField(template.getField()); + return instance; + } + + public RequiredFieldError copyDeep(); + + /** + * factory method to create a deep copy of RequiredFieldError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RequiredFieldError deepCopy(@Nullable final RequiredFieldError template) { + if (template == null) { + return null; + } + RequiredFieldErrorImpl instance = new RequiredFieldErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setField(template.getField()); + return instance; + } + + /** + * builder factory method for RequiredFieldError + * @return builder + */ + public static RequiredFieldErrorBuilder builder() { + return RequiredFieldErrorBuilder.of(); + } + + /** + * create builder for RequiredFieldError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RequiredFieldErrorBuilder builder(final RequiredFieldError template) { + return RequiredFieldErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRequiredFieldError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorBuilder.java new file mode 100644 index 00000000000..35228836b0b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RequiredFieldErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RequiredFieldError requiredFieldError = RequiredFieldError.builder()
+ *             .message("{message}")
+ *             .field("{field}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RequiredFieldErrorBuilder implements Builder { + + private String message; + + private String field; + + /** + *

"A value is required for field $field."

+ * @param message value to be set + * @return Builder + */ + + public RequiredFieldErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Name of the field missing the value.

+ * @param field value to be set + * @return Builder + */ + + public RequiredFieldErrorBuilder field(final String field) { + this.field = field; + return this; + } + + /** + *

"A value is required for field $field."

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Name of the field missing the value.

+ * @return field + */ + + public String getField() { + return this.field; + } + + /** + * builds RequiredFieldError with checking for non-null required values + * @return RequiredFieldError + */ + public RequiredFieldError build() { + Objects.requireNonNull(message, RequiredFieldError.class + ": message is missing"); + Objects.requireNonNull(field, RequiredFieldError.class + ": field is missing"); + return new RequiredFieldErrorImpl(message, field); + } + + /** + * builds RequiredFieldError without checking for non-null required values + * @return RequiredFieldError + */ + public RequiredFieldError buildUnchecked() { + return new RequiredFieldErrorImpl(message, field); + } + + /** + * factory method for an instance of RequiredFieldErrorBuilder + * @return builder + */ + public static RequiredFieldErrorBuilder of() { + return new RequiredFieldErrorBuilder(); + } + + /** + * create builder for RequiredFieldError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RequiredFieldErrorBuilder of(final RequiredFieldError template) { + RequiredFieldErrorBuilder builder = new RequiredFieldErrorBuilder(); + builder.message = template.getMessage(); + builder.field = template.getField(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorImpl.java new file mode 100644 index 00000000000..2f88ff91528 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorImpl.java @@ -0,0 +1,116 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when a value is not defined for a required field.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RequiredFieldErrorImpl implements RequiredFieldError, ModelBase { + + private String code; + + private String message; + + private String field; + + /** + * create instance with all properties + */ + @JsonCreator + RequiredFieldErrorImpl(@JsonProperty("message") final String message, @JsonProperty("field") final String field) { + this.message = message; + this.field = field; + this.code = REQUIRED_FIELD; + } + + /** + * create empty instance + */ + public RequiredFieldErrorImpl() { + this.code = REQUIRED_FIELD; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"A value is required for field $field."

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Name of the field missing the value.

+ */ + + public String getField() { + return this.field; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setField(final String field) { + this.field = field; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RequiredFieldErrorImpl that = (RequiredFieldErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(field, that.field) + .append(code, that.code) + .append(message, that.message) + .append(field, that.field) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).append(field).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("field", field) + .build(); + } + + @Override + public RequiredFieldError copyDeep() { + return RequiredFieldError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundError.java new file mode 100644 index 00000000000..cf24f46485a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when the resource addressed by the request URL does not exist.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ResourceNotFoundError resourceNotFoundError = ResourceNotFoundError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("ResourceNotFound") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ResourceNotFoundErrorImpl.class) +public interface ResourceNotFoundError extends ErrorObject { + + /** + * discriminator value for ResourceNotFoundError + */ + String RESOURCE_NOT_FOUND = "ResourceNotFound"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"The Resource with ID $resourceId was not found."

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

"The Resource with ID $resourceId was not found."

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of ResourceNotFoundError + */ + public static ResourceNotFoundError of() { + return new ResourceNotFoundErrorImpl(); + } + + /** + * factory method to create a shallow copy ResourceNotFoundError + * @param template instance to be copied + * @return copy instance + */ + public static ResourceNotFoundError of(final ResourceNotFoundError template) { + ResourceNotFoundErrorImpl instance = new ResourceNotFoundErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public ResourceNotFoundError copyDeep(); + + /** + * factory method to create a deep copy of ResourceNotFoundError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ResourceNotFoundError deepCopy(@Nullable final ResourceNotFoundError template) { + if (template == null) { + return null; + } + ResourceNotFoundErrorImpl instance = new ResourceNotFoundErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for ResourceNotFoundError + * @return builder + */ + public static ResourceNotFoundErrorBuilder builder() { + return ResourceNotFoundErrorBuilder.of(); + } + + /** + * create builder for ResourceNotFoundError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ResourceNotFoundErrorBuilder builder(final ResourceNotFoundError template) { + return ResourceNotFoundErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withResourceNotFoundError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorBuilder.java new file mode 100644 index 00000000000..296509cd933 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ResourceNotFoundErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ResourceNotFoundError resourceNotFoundError = ResourceNotFoundError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ResourceNotFoundErrorBuilder implements Builder { + + private String message; + + /** + *

"The Resource with ID $resourceId was not found."

+ * @param message value to be set + * @return Builder + */ + + public ResourceNotFoundErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

"The Resource with ID $resourceId was not found."

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds ResourceNotFoundError with checking for non-null required values + * @return ResourceNotFoundError + */ + public ResourceNotFoundError build() { + Objects.requireNonNull(message, ResourceNotFoundError.class + ": message is missing"); + return new ResourceNotFoundErrorImpl(message); + } + + /** + * builds ResourceNotFoundError without checking for non-null required values + * @return ResourceNotFoundError + */ + public ResourceNotFoundError buildUnchecked() { + return new ResourceNotFoundErrorImpl(message); + } + + /** + * factory method for an instance of ResourceNotFoundErrorBuilder + * @return builder + */ + public static ResourceNotFoundErrorBuilder of() { + return new ResourceNotFoundErrorBuilder(); + } + + /** + * create builder for ResourceNotFoundError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ResourceNotFoundErrorBuilder of(final ResourceNotFoundError template) { + ResourceNotFoundErrorBuilder builder = new ResourceNotFoundErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorImpl.java new file mode 100644 index 00000000000..c58ed347a48 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when the resource addressed by the request URL does not exist.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ResourceNotFoundErrorImpl implements ResourceNotFoundError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + ResourceNotFoundErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = RESOURCE_NOT_FOUND; + } + + /** + * create empty instance + */ + public ResourceNotFoundErrorImpl() { + this.code = RESOURCE_NOT_FOUND; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"The Resource with ID $resourceId was not found."

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ResourceNotFoundErrorImpl that = (ResourceNotFoundErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public ResourceNotFoundError copyDeep() { + return ResourceNotFoundError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifier.java new file mode 100644 index 00000000000..0505d0d8c0c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifier.java @@ -0,0 +1,145 @@ + +package com.commercetools.checkout.models.order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Resource identifier to an Order. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderResourceIdentifier orderResourceIdentifier = OrderResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("order") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderResourceIdentifierImpl.class) +public interface OrderResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for OrderResourceIdentifier + */ + String ORDER = "order"; + + /** + *

Unique identifier of the referenced Order. Required if key is absent.

+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the referenced Order. Required if id is absent.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Unique identifier of the referenced Order. Required if key is absent.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *

User-defined unique identifier of the referenced Order. Required if id is absent.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of OrderResourceIdentifier + */ + public static OrderResourceIdentifier of() { + return new OrderResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy OrderResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static OrderResourceIdentifier of(final OrderResourceIdentifier template) { + OrderResourceIdentifierImpl instance = new OrderResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public OrderResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of OrderResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderResourceIdentifier deepCopy(@Nullable final OrderResourceIdentifier template) { + if (template == null) { + return null; + } + OrderResourceIdentifierImpl instance = new OrderResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for OrderResourceIdentifier + * @return builder + */ + public static OrderResourceIdentifierBuilder builder() { + return OrderResourceIdentifierBuilder.of(); + } + + /** + * create builder for OrderResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderResourceIdentifierBuilder builder(final OrderResourceIdentifier template) { + return OrderResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierBuilder.java new file mode 100644 index 00000000000..c98c7c594ec --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.order; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderResourceIdentifierBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderResourceIdentifier orderResourceIdentifier = OrderResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

Unique identifier of the referenced Order. Required if key is absent.

+ * @param id value to be set + * @return Builder + */ + + public OrderResourceIdentifierBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *

User-defined unique identifier of the referenced Order. Required if id is absent.

+ * @param key value to be set + * @return Builder + */ + + public OrderResourceIdentifierBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

Unique identifier of the referenced Order. Required if key is absent.

+ * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Order. Required if id is absent.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds OrderResourceIdentifier with checking for non-null required values + * @return OrderResourceIdentifier + */ + public OrderResourceIdentifier build() { + return new OrderResourceIdentifierImpl(id, key); + } + + /** + * builds OrderResourceIdentifier without checking for non-null required values + * @return OrderResourceIdentifier + */ + public OrderResourceIdentifier buildUnchecked() { + return new OrderResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of OrderResourceIdentifierBuilder + * @return builder + */ + public static OrderResourceIdentifierBuilder of() { + return new OrderResourceIdentifierBuilder(); + } + + /** + * create builder for OrderResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderResourceIdentifierBuilder of(final OrderResourceIdentifier template) { + OrderResourceIdentifierBuilder builder = new OrderResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierImpl.java new file mode 100644 index 00000000000..ed2abbb5ac0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.order; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Resource identifier to an Order. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderResourceIdentifierImpl implements OrderResourceIdentifier, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + OrderResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("order"); + } + + /** + * create empty instance + */ + public OrderResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("order"); + } + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Order. Required if key is absent.

+ */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Order. Required if id is absent.

+ */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderResourceIdentifierImpl that = (OrderResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public OrderResourceIdentifier copyDeep() { + return OrderResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReference.java new file mode 100644 index 00000000000..6da6720a9aa --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReference.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.payment; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Reference to a Payment.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentReference paymentReference = PaymentReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentReferenceImpl.class) +public interface PaymentReference extends Reference { + + /** + * discriminator value for PaymentReference + */ + String PAYMENT = "payment"; + + /** + *

Unique identifier of the referenced Payment.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Unique identifier of the referenced Payment.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of PaymentReference + */ + public static PaymentReference of() { + return new PaymentReferenceImpl(); + } + + /** + * factory method to create a shallow copy PaymentReference + * @param template instance to be copied + * @return copy instance + */ + public static PaymentReference of(final PaymentReference template) { + PaymentReferenceImpl instance = new PaymentReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public PaymentReference copyDeep(); + + /** + * factory method to create a deep copy of PaymentReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentReference deepCopy(@Nullable final PaymentReference template) { + if (template == null) { + return null; + } + PaymentReferenceImpl instance = new PaymentReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for PaymentReference + * @return builder + */ + public static PaymentReferenceBuilder builder() { + return PaymentReferenceBuilder.of(); + } + + /** + * create builder for PaymentReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentReferenceBuilder builder(final PaymentReference template) { + return PaymentReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceBuilder.java new file mode 100644 index 00000000000..37e72ffff12 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.payment; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentReference paymentReference = PaymentReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentReferenceBuilder implements Builder { + + private String id; + + /** + *

Unique identifier of the referenced Payment.

+ * @param id value to be set + * @return Builder + */ + + public PaymentReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

Unique identifier of the referenced Payment.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds PaymentReference with checking for non-null required values + * @return PaymentReference + */ + public PaymentReference build() { + Objects.requireNonNull(id, PaymentReference.class + ": id is missing"); + return new PaymentReferenceImpl(id); + } + + /** + * builds PaymentReference without checking for non-null required values + * @return PaymentReference + */ + public PaymentReference buildUnchecked() { + return new PaymentReferenceImpl(id); + } + + /** + * factory method for an instance of PaymentReferenceBuilder + * @return builder + */ + public static PaymentReferenceBuilder of() { + return new PaymentReferenceBuilder(); + } + + /** + * create builder for PaymentReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentReferenceBuilder of(final PaymentReference template) { + PaymentReferenceBuilder builder = new PaymentReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceImpl.java new file mode 100644 index 00000000000..2706aea9b6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Reference to a Payment.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentReferenceImpl implements PaymentReference, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("payment"); + } + + /** + * create empty instance + */ + public PaymentReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("payment"); + } + + /** + *

Type of referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Payment.

+ */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentReferenceImpl that = (PaymentReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public PaymentReference copyDeep() { + return PaymentReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifier.java new file mode 100644 index 00000000000..54bc46b28db --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifier.java @@ -0,0 +1,145 @@ + +package com.commercetools.checkout.models.payment; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Resource identifier to a Payment. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentResourceIdentifier paymentResourceIdentifier = PaymentResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentResourceIdentifierImpl.class) +public interface PaymentResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for PaymentResourceIdentifier + */ + String PAYMENT = "payment"; + + /** + *

Unique identifier of the referenced Payment. Required if key is absent.

+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the referenced Payment. Required if id is absent.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Unique identifier of the referenced Payment. Required if key is absent.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *

User-defined unique identifier of the referenced Payment. Required if id is absent.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of PaymentResourceIdentifier + */ + public static PaymentResourceIdentifier of() { + return new PaymentResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy PaymentResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static PaymentResourceIdentifier of(final PaymentResourceIdentifier template) { + PaymentResourceIdentifierImpl instance = new PaymentResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public PaymentResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of PaymentResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentResourceIdentifier deepCopy(@Nullable final PaymentResourceIdentifier template) { + if (template == null) { + return null; + } + PaymentResourceIdentifierImpl instance = new PaymentResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for PaymentResourceIdentifier + * @return builder + */ + public static PaymentResourceIdentifierBuilder builder() { + return PaymentResourceIdentifierBuilder.of(); + } + + /** + * create builder for PaymentResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentResourceIdentifierBuilder builder(final PaymentResourceIdentifier template) { + return PaymentResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierBuilder.java new file mode 100644 index 00000000000..a95df7041b7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.payment; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentResourceIdentifierBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentResourceIdentifier paymentResourceIdentifier = PaymentResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

Unique identifier of the referenced Payment. Required if key is absent.

+ * @param id value to be set + * @return Builder + */ + + public PaymentResourceIdentifierBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *

User-defined unique identifier of the referenced Payment. Required if id is absent.

+ * @param key value to be set + * @return Builder + */ + + public PaymentResourceIdentifierBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

Unique identifier of the referenced Payment. Required if key is absent.

+ * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Payment. Required if id is absent.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds PaymentResourceIdentifier with checking for non-null required values + * @return PaymentResourceIdentifier + */ + public PaymentResourceIdentifier build() { + return new PaymentResourceIdentifierImpl(id, key); + } + + /** + * builds PaymentResourceIdentifier without checking for non-null required values + * @return PaymentResourceIdentifier + */ + public PaymentResourceIdentifier buildUnchecked() { + return new PaymentResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of PaymentResourceIdentifierBuilder + * @return builder + */ + public static PaymentResourceIdentifierBuilder of() { + return new PaymentResourceIdentifierBuilder(); + } + + /** + * create builder for PaymentResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentResourceIdentifierBuilder of(final PaymentResourceIdentifier template) { + PaymentResourceIdentifierBuilder builder = new PaymentResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierImpl.java new file mode 100644 index 00000000000..51115fd07fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.payment; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Resource identifier to a Payment. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentResourceIdentifierImpl implements PaymentResourceIdentifier, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("payment"); + } + + /** + * create empty instance + */ + public PaymentResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("payment"); + } + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Payment. Required if key is absent.

+ */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Payment. Required if id is absent.

+ */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentResourceIdentifierImpl that = (PaymentResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public PaymentResourceIdentifier copyDeep() { + return PaymentResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReference.java new file mode 100644 index 00000000000..e0fd7d0f306 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReference.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Reference to a Payment Integration.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationReference paymentIntegrationReference = PaymentIntegrationReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment-integration") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationReferenceImpl.class) +public interface PaymentIntegrationReference extends Reference { + + /** + * discriminator value for PaymentIntegrationReference + */ + String PAYMENT_INTEGRATION = "payment-integration"; + + /** + *

Unique identifier of the referenced Payment Integration.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Unique identifier of the referenced Payment Integration.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of PaymentIntegrationReference + */ + public static PaymentIntegrationReference of() { + return new PaymentIntegrationReferenceImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationReference + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationReference of(final PaymentIntegrationReference template) { + PaymentIntegrationReferenceImpl instance = new PaymentIntegrationReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public PaymentIntegrationReference copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationReference deepCopy(@Nullable final PaymentIntegrationReference template) { + if (template == null) { + return null; + } + PaymentIntegrationReferenceImpl instance = new PaymentIntegrationReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationReference + * @return builder + */ + public static PaymentIntegrationReferenceBuilder builder() { + return PaymentIntegrationReferenceBuilder.of(); + } + + /** + * create builder for PaymentIntegrationReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationReferenceBuilder builder(final PaymentIntegrationReference template) { + return PaymentIntegrationReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceBuilder.java new file mode 100644 index 00000000000..a46e981dea6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationReference paymentIntegrationReference = PaymentIntegrationReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationReferenceBuilder implements Builder { + + private String id; + + /** + *

Unique identifier of the referenced Payment Integration.

+ * @param id value to be set + * @return Builder + */ + + public PaymentIntegrationReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

Unique identifier of the referenced Payment Integration.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds PaymentIntegrationReference with checking for non-null required values + * @return PaymentIntegrationReference + */ + public PaymentIntegrationReference build() { + Objects.requireNonNull(id, PaymentIntegrationReference.class + ": id is missing"); + return new PaymentIntegrationReferenceImpl(id); + } + + /** + * builds PaymentIntegrationReference without checking for non-null required values + * @return PaymentIntegrationReference + */ + public PaymentIntegrationReference buildUnchecked() { + return new PaymentIntegrationReferenceImpl(id); + } + + /** + * factory method for an instance of PaymentIntegrationReferenceBuilder + * @return builder + */ + public static PaymentIntegrationReferenceBuilder of() { + return new PaymentIntegrationReferenceBuilder(); + } + + /** + * create builder for PaymentIntegrationReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationReferenceBuilder of(final PaymentIntegrationReference template) { + PaymentIntegrationReferenceBuilder builder = new PaymentIntegrationReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceImpl.java new file mode 100644 index 00000000000..cd36d54eee7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Reference to a Payment Integration.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationReferenceImpl implements PaymentIntegrationReference, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("payment-integration"); + } + + /** + * create empty instance + */ + public PaymentIntegrationReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("payment-integration"); + } + + /** + *

Type of referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Payment Integration.

+ */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationReferenceImpl that = (PaymentIntegrationReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public PaymentIntegrationReference copyDeep() { + return PaymentIntegrationReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifier.java new file mode 100644 index 00000000000..0f114eed547 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifier.java @@ -0,0 +1,147 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Resource identifier to a Payment Integration. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationResourceIdentifier paymentIntegrationResourceIdentifier = PaymentIntegrationResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment-integration") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationResourceIdentifierImpl.class) +public interface PaymentIntegrationResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for PaymentIntegrationResourceIdentifier + */ + String PAYMENT_INTEGRATION = "payment-integration"; + + /** + *

Unique identifier of the referenced Payment Integration. Required if key is absent.

+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the referenced Payment Integration. Required if id is absent.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Unique identifier of the referenced Payment Integration. Required if key is absent.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *

User-defined unique identifier of the referenced Payment Integration. Required if id is absent.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of PaymentIntegrationResourceIdentifier + */ + public static PaymentIntegrationResourceIdentifier of() { + return new PaymentIntegrationResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationResourceIdentifier of(final PaymentIntegrationResourceIdentifier template) { + PaymentIntegrationResourceIdentifierImpl instance = new PaymentIntegrationResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public PaymentIntegrationResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationResourceIdentifier deepCopy( + @Nullable final PaymentIntegrationResourceIdentifier template) { + if (template == null) { + return null; + } + PaymentIntegrationResourceIdentifierImpl instance = new PaymentIntegrationResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationResourceIdentifier + * @return builder + */ + public static PaymentIntegrationResourceIdentifierBuilder builder() { + return PaymentIntegrationResourceIdentifierBuilder.of(); + } + + /** + * create builder for PaymentIntegrationResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationResourceIdentifierBuilder builder( + final PaymentIntegrationResourceIdentifier template) { + return PaymentIntegrationResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierBuilder.java new file mode 100644 index 00000000000..3ec92959d85 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationResourceIdentifierBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationResourceIdentifier paymentIntegrationResourceIdentifier = PaymentIntegrationResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

Unique identifier of the referenced Payment Integration. Required if key is absent.

+ * @param id value to be set + * @return Builder + */ + + public PaymentIntegrationResourceIdentifierBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *

User-defined unique identifier of the referenced Payment Integration. Required if id is absent.

+ * @param key value to be set + * @return Builder + */ + + public PaymentIntegrationResourceIdentifierBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

Unique identifier of the referenced Payment Integration. Required if key is absent.

+ * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Payment Integration. Required if id is absent.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds PaymentIntegrationResourceIdentifier with checking for non-null required values + * @return PaymentIntegrationResourceIdentifier + */ + public PaymentIntegrationResourceIdentifier build() { + return new PaymentIntegrationResourceIdentifierImpl(id, key); + } + + /** + * builds PaymentIntegrationResourceIdentifier without checking for non-null required values + * @return PaymentIntegrationResourceIdentifier + */ + public PaymentIntegrationResourceIdentifier buildUnchecked() { + return new PaymentIntegrationResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of PaymentIntegrationResourceIdentifierBuilder + * @return builder + */ + public static PaymentIntegrationResourceIdentifierBuilder of() { + return new PaymentIntegrationResourceIdentifierBuilder(); + } + + /** + * create builder for PaymentIntegrationResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationResourceIdentifierBuilder of(final PaymentIntegrationResourceIdentifier template) { + PaymentIntegrationResourceIdentifierBuilder builder = new PaymentIntegrationResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierImpl.java new file mode 100644 index 00000000000..7fba8230b58 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.commercetools.checkout.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Resource identifier to a Payment Integration. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationResourceIdentifierImpl implements PaymentIntegrationResourceIdentifier, ModelBase { + + private com.commercetools.checkout.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationResourceIdentifierImpl(@JsonProperty("id") final String id, + @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("payment-integration"); + } + + /** + * create empty instance + */ + public PaymentIntegrationResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("payment-integration"); + } + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ */ + + public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced Payment Integration. Required if key is absent.

+ */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the referenced Payment Integration. Required if id is absent.

+ */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationResourceIdentifierImpl that = (PaymentIntegrationResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public PaymentIntegrationResourceIdentifier copyDeep() { + return PaymentIntegrationResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntent.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntent.java new file mode 100644 index 00000000000..772e6da957c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntent.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * PaymentIntent + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntent paymentIntent = PaymentIntent.builder()
+ *             .plusActions(actionsBuilder -> actionsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntentImpl.class) +public interface PaymentIntent { + + /** + *

Action to execute for the given Payment.

+ * @return actions + */ + @NotNull + @Valid + @JsonProperty("actions") + public List getActions(); + + /** + *

Action to execute for the given Payment.

+ * @param actions values to be set + */ + + @JsonIgnore + public void setActions(final PaymentIntentAction... actions); + + /** + *

Action to execute for the given Payment.

+ * @param actions values to be set + */ + + public void setActions(final List actions); + + /** + * factory method + * @return instance of PaymentIntent + */ + public static PaymentIntent of() { + return new PaymentIntentImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntent + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntent of(final PaymentIntent template) { + PaymentIntentImpl instance = new PaymentIntentImpl(); + instance.setActions(template.getActions()); + return instance; + } + + public PaymentIntent copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntent + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntent deepCopy(@Nullable final PaymentIntent template) { + if (template == null) { + return null; + } + PaymentIntentImpl instance = new PaymentIntentImpl(); + instance.setActions(Optional.ofNullable(template.getActions()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.payment_intents.PaymentIntentAction::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for PaymentIntent + * @return builder + */ + public static PaymentIntentBuilder builder() { + return PaymentIntentBuilder.of(); + } + + /** + * create builder for PaymentIntent instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentBuilder builder(final PaymentIntent template) { + return PaymentIntentBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntent(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentAction.java new file mode 100644 index 00000000000..789b38bb9b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentAction.java @@ -0,0 +1,116 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Depending on the action specified, Checkout requests the payment service provider (PSP) or gift card management system to capture, refund, or cancel the authorization for the given Payment.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     PaymentIntentAction paymentIntentAction = PaymentIntentAction.cancelPaymentBuilder()
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = PaymentIntentActionImpl.class, visible = true) +@JsonDeserialize(as = PaymentIntentActionImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PaymentIntentAction { + + /** + *

Action to execute for the given Payment.

+ * @return action + */ + @NotNull + @JsonProperty("action") + public PaymentIntentOperation getAction(); + + public PaymentIntentAction copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntentAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntentAction deepCopy(@Nullable final PaymentIntentAction template) { + if (template == null) { + return null; + } + + if (!(template instanceof PaymentIntentActionImpl)) { + return template.copyDeep(); + } + PaymentIntentActionImpl instance = new PaymentIntentActionImpl(); + return instance; + } + + /** + * builder for cancelPayment subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_intents.PaymentIntentCancelActionBuilder cancelPaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentCancelActionBuilder.of(); + } + + /** + * builder for capturePayment subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_intents.PaymentIntentCaptureActionBuilder capturePaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentCaptureActionBuilder.of(); + } + + /** + * builder for refundPayment subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_intents.PaymentIntentRefundActionBuilder refundPaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentRefundActionBuilder.of(); + } + + /** + * builder for reversePayment subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_intents.PaymentIntentReverseActionBuilder reversePaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentReverseActionBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntentAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentActionBuilder.java new file mode 100644 index 00000000000..9b5cea35e2d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentActionBuilder.java @@ -0,0 +1,38 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntentActionBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentActionBuilder { + + public com.commercetools.checkout.models.payment_intents.PaymentIntentCancelActionBuilder cancelPaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentCancelActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_intents.PaymentIntentCaptureActionBuilder capturePaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentCaptureActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_intents.PaymentIntentRefundActionBuilder refundPaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentRefundActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_intents.PaymentIntentReverseActionBuilder reversePaymentBuilder() { + return com.commercetools.checkout.models.payment_intents.PaymentIntentReverseActionBuilder.of(); + } + + /** + * factory method for an instance of PaymentIntentActionBuilder + * @return builder + */ + public static PaymentIntentActionBuilder of() { + return new PaymentIntentActionBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentActionImpl.java new file mode 100644 index 00000000000..dd2948d038f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentActionImpl.java @@ -0,0 +1,77 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Depending on the action specified, Checkout requests the payment service provider (PSP) or gift card management system to capture, refund, or cancel the authorization for the given Payment.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentActionImpl implements PaymentIntentAction, ModelBase { + + private com.commercetools.checkout.models.payment_intents.PaymentIntentOperation action; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntentActionImpl( + @JsonProperty("action") final com.commercetools.checkout.models.payment_intents.PaymentIntentOperation action) { + this.action = action; + } + + /** + * create empty instance + */ + public PaymentIntentActionImpl() { + } + + /** + *

Action to execute for the given Payment.

+ */ + + public com.commercetools.checkout.models.payment_intents.PaymentIntentOperation getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntentActionImpl that = (PaymentIntentActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + + @Override + public PaymentIntentAction copyDeep() { + return PaymentIntentAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentBuilder.java new file mode 100644 index 00000000000..068b82989b3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentBuilder.java @@ -0,0 +1,141 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntentBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntent paymentIntent = PaymentIntent.builder()
+ *             .plusActions(actionsBuilder -> actionsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentBuilder implements Builder { + + private java.util.List actions; + + /** + *

Action to execute for the given Payment.

+ * @param actions value to be set + * @return Builder + */ + + public PaymentIntentBuilder actions( + final com.commercetools.checkout.models.payment_intents.PaymentIntentAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + return this; + } + + /** + *

Action to execute for the given Payment.

+ * @param actions value to be set + * @return Builder + */ + + public PaymentIntentBuilder actions( + final java.util.List actions) { + this.actions = actions; + return this; + } + + /** + *

Action to execute for the given Payment.

+ * @param actions value to be set + * @return Builder + */ + + public PaymentIntentBuilder plusActions( + final com.commercetools.checkout.models.payment_intents.PaymentIntentAction... actions) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.addAll(Arrays.asList(actions)); + return this; + } + + /** + *

Action to execute for the given Payment.

+ * @param builder function to build the actions value + * @return Builder + */ + + public PaymentIntentBuilder plusActions( + Function> builder) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.add( + builder.apply(com.commercetools.checkout.models.payment_intents.PaymentIntentActionBuilder.of()).build()); + return this; + } + + /** + *

Action to execute for the given Payment.

+ * @param builder function to build the actions value + * @return Builder + */ + + public PaymentIntentBuilder withActions( + Function> builder) { + this.actions = new ArrayList<>(); + this.actions.add( + builder.apply(com.commercetools.checkout.models.payment_intents.PaymentIntentActionBuilder.of()).build()); + return this; + } + + /** + *

Action to execute for the given Payment.

+ * @return actions + */ + + public java.util.List getActions() { + return this.actions; + } + + /** + * builds PaymentIntent with checking for non-null required values + * @return PaymentIntent + */ + public PaymentIntent build() { + Objects.requireNonNull(actions, PaymentIntent.class + ": actions is missing"); + return new PaymentIntentImpl(actions); + } + + /** + * builds PaymentIntent without checking for non-null required values + * @return PaymentIntent + */ + public PaymentIntent buildUnchecked() { + return new PaymentIntentImpl(actions); + } + + /** + * factory method for an instance of PaymentIntentBuilder + * @return builder + */ + public static PaymentIntentBuilder of() { + return new PaymentIntentBuilder(); + } + + /** + * create builder for PaymentIntent instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentBuilder of(final PaymentIntent template) { + PaymentIntentBuilder builder = new PaymentIntentBuilder(); + builder.actions = template.getActions(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelAction.java new file mode 100644 index 00000000000..dd113be3090 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelAction.java @@ -0,0 +1,128 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Requests to cancel the authorization for a Payment. Checkout will cancel the Payment and will request the PSP or gift card management system to proceed with the financial process to cancel the authorization.

+ *

You cannot request to cancel the authorization for a Payment that has already been captured.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentCancelAction paymentIntentCancelAction = PaymentIntentCancelAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("cancelPayment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntentCancelActionImpl.class) +public interface PaymentIntentCancelAction extends PaymentIntentAction { + + /** + * discriminator value for PaymentIntentCancelAction + */ + String CANCEL_PAYMENT = "cancelPayment"; + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @JsonProperty("merchantReference") + public String getMerchantReference(); + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + */ + + public void setMerchantReference(final String merchantReference); + + /** + * factory method + * @return instance of PaymentIntentCancelAction + */ + public static PaymentIntentCancelAction of() { + return new PaymentIntentCancelActionImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntentCancelAction + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntentCancelAction of(final PaymentIntentCancelAction template) { + PaymentIntentCancelActionImpl instance = new PaymentIntentCancelActionImpl(); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + public PaymentIntentCancelAction copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntentCancelAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntentCancelAction deepCopy(@Nullable final PaymentIntentCancelAction template) { + if (template == null) { + return null; + } + PaymentIntentCancelActionImpl instance = new PaymentIntentCancelActionImpl(); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + /** + * builder factory method for PaymentIntentCancelAction + * @return builder + */ + public static PaymentIntentCancelActionBuilder builder() { + return PaymentIntentCancelActionBuilder.of(); + } + + /** + * create builder for PaymentIntentCancelAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentCancelActionBuilder builder(final PaymentIntentCancelAction template) { + return PaymentIntentCancelActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntentCancelAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionBuilder.java new file mode 100644 index 00000000000..d1608aea449 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntentCancelActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentCancelAction paymentIntentCancelAction = PaymentIntentCancelAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentCancelActionBuilder implements Builder { + + @Nullable + private String merchantReference; + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + * @return Builder + */ + + public PaymentIntentCancelActionBuilder merchantReference(@Nullable final String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @Nullable + public String getMerchantReference() { + return this.merchantReference; + } + + /** + * builds PaymentIntentCancelAction with checking for non-null required values + * @return PaymentIntentCancelAction + */ + public PaymentIntentCancelAction build() { + return new PaymentIntentCancelActionImpl(merchantReference); + } + + /** + * builds PaymentIntentCancelAction without checking for non-null required values + * @return PaymentIntentCancelAction + */ + public PaymentIntentCancelAction buildUnchecked() { + return new PaymentIntentCancelActionImpl(merchantReference); + } + + /** + * factory method for an instance of PaymentIntentCancelActionBuilder + * @return builder + */ + public static PaymentIntentCancelActionBuilder of() { + return new PaymentIntentCancelActionBuilder(); + } + + /** + * create builder for PaymentIntentCancelAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentCancelActionBuilder of(final PaymentIntentCancelAction template) { + PaymentIntentCancelActionBuilder builder = new PaymentIntentCancelActionBuilder(); + builder.merchantReference = template.getMerchantReference(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionImpl.java new file mode 100644 index 00000000000..3cae986a699 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Requests to cancel the authorization for a Payment. Checkout will cancel the Payment and will request the PSP or gift card management system to proceed with the financial process to cancel the authorization.

+ *

You cannot request to cancel the authorization for a Payment that has already been captured.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentCancelActionImpl implements PaymentIntentCancelAction, ModelBase { + + private com.commercetools.checkout.models.payment_intents.PaymentIntentOperation action; + + private String merchantReference; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntentCancelActionImpl(@JsonProperty("merchantReference") final String merchantReference) { + this.merchantReference = merchantReference; + this.action = PaymentIntentOperation.findEnum("cancelPayment"); + } + + /** + * create empty instance + */ + public PaymentIntentCancelActionImpl() { + this.action = PaymentIntentOperation.findEnum("cancelPayment"); + } + + /** + *

Action to execute for the given Payment.

+ */ + + public com.commercetools.checkout.models.payment_intents.PaymentIntentOperation getAction() { + return this.action; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ */ + + public String getMerchantReference() { + return this.merchantReference; + } + + public void setMerchantReference(final String merchantReference) { + this.merchantReference = merchantReference; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntentCancelActionImpl that = (PaymentIntentCancelActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(merchantReference, that.merchantReference) + .append(action, that.action) + .append(merchantReference, that.merchantReference) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(merchantReference).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("merchantReference", merchantReference) + .build(); + } + + @Override + public PaymentIntentCancelAction copyDeep() { + return PaymentIntentCancelAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureAction.java new file mode 100644 index 00000000000..91486ad8667 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureAction.java @@ -0,0 +1,150 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Amount; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Requests to capture the given amount from the customer. Checkout will request the PSP or gift card management system to proceed with the financial process to capture the amount.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentCaptureAction paymentIntentCaptureAction = PaymentIntentCaptureAction.builder()
+ *             .amount(amountBuilder -> amountBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("capturePayment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntentCaptureActionImpl.class) +public interface PaymentIntentCaptureAction extends PaymentIntentAction { + + /** + * discriminator value for PaymentIntentCaptureAction + */ + String CAPTURE_PAYMENT = "capturePayment"; + + /** + *

Amount to be captured. It must be less than or equal to the authorized amount.

+ * @return amount + */ + @NotNull + @Valid + @JsonProperty("amount") + public Amount getAmount(); + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @JsonProperty("merchantReference") + public String getMerchantReference(); + + /** + *

Amount to be captured. It must be less than or equal to the authorized amount.

+ * @param amount value to be set + */ + + public void setAmount(final Amount amount); + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + */ + + public void setMerchantReference(final String merchantReference); + + /** + * factory method + * @return instance of PaymentIntentCaptureAction + */ + public static PaymentIntentCaptureAction of() { + return new PaymentIntentCaptureActionImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntentCaptureAction + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntentCaptureAction of(final PaymentIntentCaptureAction template) { + PaymentIntentCaptureActionImpl instance = new PaymentIntentCaptureActionImpl(); + instance.setAmount(template.getAmount()); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + public PaymentIntentCaptureAction copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntentCaptureAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntentCaptureAction deepCopy(@Nullable final PaymentIntentCaptureAction template) { + if (template == null) { + return null; + } + PaymentIntentCaptureActionImpl instance = new PaymentIntentCaptureActionImpl(); + instance.setAmount(com.commercetools.checkout.models.common.Amount.deepCopy(template.getAmount())); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + /** + * builder factory method for PaymentIntentCaptureAction + * @return builder + */ + public static PaymentIntentCaptureActionBuilder builder() { + return PaymentIntentCaptureActionBuilder.of(); + } + + /** + * create builder for PaymentIntentCaptureAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentCaptureActionBuilder builder(final PaymentIntentCaptureAction template) { + return PaymentIntentCaptureActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntentCaptureAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionBuilder.java new file mode 100644 index 00000000000..370b69a21ef --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntentCaptureActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentCaptureAction paymentIntentCaptureAction = PaymentIntentCaptureAction.builder()
+ *             .amount(amountBuilder -> amountBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentCaptureActionBuilder implements Builder { + + private com.commercetools.checkout.models.common.Amount amount; + + @Nullable + private String merchantReference; + + /** + *

Amount to be captured. It must be less than or equal to the authorized amount.

+ * @param builder function to build the amount value + * @return Builder + */ + + public PaymentIntentCaptureActionBuilder amount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()).build(); + return this; + } + + /** + *

Amount to be captured. It must be less than or equal to the authorized amount.

+ * @param builder function to build the amount value + * @return Builder + */ + + public PaymentIntentCaptureActionBuilder withAmount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()); + return this; + } + + /** + *

Amount to be captured. It must be less than or equal to the authorized amount.

+ * @param amount value to be set + * @return Builder + */ + + public PaymentIntentCaptureActionBuilder amount(final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + return this; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + * @return Builder + */ + + public PaymentIntentCaptureActionBuilder merchantReference(@Nullable final String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + *

Amount to be captured. It must be less than or equal to the authorized amount.

+ * @return amount + */ + + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @Nullable + public String getMerchantReference() { + return this.merchantReference; + } + + /** + * builds PaymentIntentCaptureAction with checking for non-null required values + * @return PaymentIntentCaptureAction + */ + public PaymentIntentCaptureAction build() { + Objects.requireNonNull(amount, PaymentIntentCaptureAction.class + ": amount is missing"); + return new PaymentIntentCaptureActionImpl(amount, merchantReference); + } + + /** + * builds PaymentIntentCaptureAction without checking for non-null required values + * @return PaymentIntentCaptureAction + */ + public PaymentIntentCaptureAction buildUnchecked() { + return new PaymentIntentCaptureActionImpl(amount, merchantReference); + } + + /** + * factory method for an instance of PaymentIntentCaptureActionBuilder + * @return builder + */ + public static PaymentIntentCaptureActionBuilder of() { + return new PaymentIntentCaptureActionBuilder(); + } + + /** + * create builder for PaymentIntentCaptureAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentCaptureActionBuilder of(final PaymentIntentCaptureAction template) { + PaymentIntentCaptureActionBuilder builder = new PaymentIntentCaptureActionBuilder(); + builder.amount = template.getAmount(); + builder.merchantReference = template.getMerchantReference(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionImpl.java new file mode 100644 index 00000000000..b3ee51fc57a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Requests to capture the given amount from the customer. Checkout will request the PSP or gift card management system to proceed with the financial process to capture the amount.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentCaptureActionImpl implements PaymentIntentCaptureAction, ModelBase { + + private com.commercetools.checkout.models.payment_intents.PaymentIntentOperation action; + + private com.commercetools.checkout.models.common.Amount amount; + + private String merchantReference; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntentCaptureActionImpl(@JsonProperty("amount") final com.commercetools.checkout.models.common.Amount amount, + @JsonProperty("merchantReference") final String merchantReference) { + this.amount = amount; + this.merchantReference = merchantReference; + this.action = PaymentIntentOperation.findEnum("capturePayment"); + } + + /** + * create empty instance + */ + public PaymentIntentCaptureActionImpl() { + this.action = PaymentIntentOperation.findEnum("capturePayment"); + } + + /** + *

Action to execute for the given Payment.

+ */ + + public com.commercetools.checkout.models.payment_intents.PaymentIntentOperation getAction() { + return this.action; + } + + /** + *

Amount to be captured. It must be less than or equal to the authorized amount.

+ */ + + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ */ + + public String getMerchantReference() { + return this.merchantReference; + } + + public void setAmount(final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + } + + public void setMerchantReference(final String merchantReference) { + this.merchantReference = merchantReference; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntentCaptureActionImpl that = (PaymentIntentCaptureActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(amount, that.amount) + .append(merchantReference, that.merchantReference) + .append(action, that.action) + .append(amount, that.amount) + .append(merchantReference, that.merchantReference) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(amount).append(merchantReference).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("amount", amount) + .append("merchantReference", merchantReference) + .build(); + } + + @Override + public PaymentIntentCaptureAction copyDeep() { + return PaymentIntentCaptureAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentImpl.java new file mode 100644 index 00000000000..c74cc9f7db2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentImpl.java @@ -0,0 +1,86 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * PaymentIntent + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentImpl implements PaymentIntent, ModelBase { + + private java.util.List actions; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntentImpl( + @JsonProperty("actions") final java.util.List actions) { + this.actions = actions; + } + + /** + * create empty instance + */ + public PaymentIntentImpl() { + } + + /** + *

Action to execute for the given Payment.

+ */ + + public java.util.List getActions() { + return this.actions; + } + + public void setActions(final com.commercetools.checkout.models.payment_intents.PaymentIntentAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + } + + public void setActions( + final java.util.List actions) { + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntentImpl that = (PaymentIntentImpl) o; + + return new EqualsBuilder().append(actions, that.actions).append(actions, that.actions).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(actions).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("actions", actions).build(); + } + + @Override + public PaymentIntent copyDeep() { + return PaymentIntent.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentOperation.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentOperation.java new file mode 100644 index 00000000000..f825cbd1868 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentOperation.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

The possible values for a Payment Intent Action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PaymentIntentOperation extends JsonEnum { + + /** +

Captures the given Payment amount.

*/ + PaymentIntentOperation CAPTURE_PAYMENT = PaymentIntentOperationEnum.CAPTURE_PAYMENT; + /** +

Refunds the given Payment amount.

*/ + PaymentIntentOperation REFUND_PAYMENT = PaymentIntentOperationEnum.REFUND_PAYMENT; + /** +

Cancels an authorized Payment.

*/ + PaymentIntentOperation CANCEL_PAYMENT = PaymentIntentOperationEnum.CANCEL_PAYMENT; + /** +

Reverses a Payment.

*/ + PaymentIntentOperation REVERSE_PAYMENT = PaymentIntentOperationEnum.REVERSE_PAYMENT; + + /** + * possible values of PaymentIntentOperation + */ + enum PaymentIntentOperationEnum implements PaymentIntentOperation { + /** + * capturePayment + */ + CAPTURE_PAYMENT("capturePayment"), + + /** + * refundPayment + */ + REFUND_PAYMENT("refundPayment"), + + /** + * cancelPayment + */ + CANCEL_PAYMENT("cancelPayment"), + + /** + * reversePayment + */ + REVERSE_PAYMENT("reversePayment"); + private final String jsonName; + + private PaymentIntentOperationEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of PaymentIntentOperation + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static PaymentIntentOperation findEnum(String value) { + return findEnumViaJsonName(value).orElse(new PaymentIntentOperation() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static PaymentIntentOperation[] values() { + return PaymentIntentOperationEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundAction.java new file mode 100644 index 00000000000..edf33f09f97 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundAction.java @@ -0,0 +1,167 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Amount; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Requests to refund the given amount to the customer. Checkout will request the PSP or gift card management system to proceed with the financial process to refund the amount.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentRefundAction paymentIntentRefundAction = PaymentIntentRefundAction.builder()
+ *             .amount(amountBuilder -> amountBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("refundPayment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntentRefundActionImpl.class) +public interface PaymentIntentRefundAction extends PaymentIntentAction { + + /** + * discriminator value for PaymentIntentRefundAction + */ + String REFUND_PAYMENT = "refundPayment"; + + /** + *

Amount to be refunded. It must be less than or equal to the captured amount.

+ * @return amount + */ + @NotNull + @Valid + @JsonProperty("amount") + public Amount getAmount(); + + /** + *

The identifier of the capture transaction that is associated with the refund action.

+ * @return transactionId + */ + + @JsonProperty("transactionId") + public String getTransactionId(); + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @JsonProperty("merchantReference") + public String getMerchantReference(); + + /** + *

Amount to be refunded. It must be less than or equal to the captured amount.

+ * @param amount value to be set + */ + + public void setAmount(final Amount amount); + + /** + *

The identifier of the capture transaction that is associated with the refund action.

+ * @param transactionId value to be set + */ + + public void setTransactionId(final String transactionId); + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + */ + + public void setMerchantReference(final String merchantReference); + + /** + * factory method + * @return instance of PaymentIntentRefundAction + */ + public static PaymentIntentRefundAction of() { + return new PaymentIntentRefundActionImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntentRefundAction + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntentRefundAction of(final PaymentIntentRefundAction template) { + PaymentIntentRefundActionImpl instance = new PaymentIntentRefundActionImpl(); + instance.setAmount(template.getAmount()); + instance.setTransactionId(template.getTransactionId()); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + public PaymentIntentRefundAction copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntentRefundAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntentRefundAction deepCopy(@Nullable final PaymentIntentRefundAction template) { + if (template == null) { + return null; + } + PaymentIntentRefundActionImpl instance = new PaymentIntentRefundActionImpl(); + instance.setAmount(com.commercetools.checkout.models.common.Amount.deepCopy(template.getAmount())); + instance.setTransactionId(template.getTransactionId()); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + /** + * builder factory method for PaymentIntentRefundAction + * @return builder + */ + public static PaymentIntentRefundActionBuilder builder() { + return PaymentIntentRefundActionBuilder.of(); + } + + /** + * create builder for PaymentIntentRefundAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentRefundActionBuilder builder(final PaymentIntentRefundAction template) { + return PaymentIntentRefundActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntentRefundAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionBuilder.java new file mode 100644 index 00000000000..d81f704b2bd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionBuilder.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntentRefundActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentRefundAction paymentIntentRefundAction = PaymentIntentRefundAction.builder()
+ *             .amount(amountBuilder -> amountBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentRefundActionBuilder implements Builder { + + private com.commercetools.checkout.models.common.Amount amount; + + @Nullable + private String transactionId; + + @Nullable + private String merchantReference; + + /** + *

Amount to be refunded. It must be less than or equal to the captured amount.

+ * @param builder function to build the amount value + * @return Builder + */ + + public PaymentIntentRefundActionBuilder amount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()).build(); + return this; + } + + /** + *

Amount to be refunded. It must be less than or equal to the captured amount.

+ * @param builder function to build the amount value + * @return Builder + */ + + public PaymentIntentRefundActionBuilder withAmount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()); + return this; + } + + /** + *

Amount to be refunded. It must be less than or equal to the captured amount.

+ * @param amount value to be set + * @return Builder + */ + + public PaymentIntentRefundActionBuilder amount(final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + return this; + } + + /** + *

The identifier of the capture transaction that is associated with the refund action.

+ * @param transactionId value to be set + * @return Builder + */ + + public PaymentIntentRefundActionBuilder transactionId(@Nullable final String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + * @return Builder + */ + + public PaymentIntentRefundActionBuilder merchantReference(@Nullable final String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + *

Amount to be refunded. It must be less than or equal to the captured amount.

+ * @return amount + */ + + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + /** + *

The identifier of the capture transaction that is associated with the refund action.

+ * @return transactionId + */ + + @Nullable + public String getTransactionId() { + return this.transactionId; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @Nullable + public String getMerchantReference() { + return this.merchantReference; + } + + /** + * builds PaymentIntentRefundAction with checking for non-null required values + * @return PaymentIntentRefundAction + */ + public PaymentIntentRefundAction build() { + Objects.requireNonNull(amount, PaymentIntentRefundAction.class + ": amount is missing"); + return new PaymentIntentRefundActionImpl(amount, transactionId, merchantReference); + } + + /** + * builds PaymentIntentRefundAction without checking for non-null required values + * @return PaymentIntentRefundAction + */ + public PaymentIntentRefundAction buildUnchecked() { + return new PaymentIntentRefundActionImpl(amount, transactionId, merchantReference); + } + + /** + * factory method for an instance of PaymentIntentRefundActionBuilder + * @return builder + */ + public static PaymentIntentRefundActionBuilder of() { + return new PaymentIntentRefundActionBuilder(); + } + + /** + * create builder for PaymentIntentRefundAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentRefundActionBuilder of(final PaymentIntentRefundAction template) { + PaymentIntentRefundActionBuilder builder = new PaymentIntentRefundActionBuilder(); + builder.amount = template.getAmount(); + builder.transactionId = template.getTransactionId(); + builder.merchantReference = template.getMerchantReference(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionImpl.java new file mode 100644 index 00000000000..fe2d217d19c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionImpl.java @@ -0,0 +1,140 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Requests to refund the given amount to the customer. Checkout will request the PSP or gift card management system to proceed with the financial process to refund the amount.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentRefundActionImpl implements PaymentIntentRefundAction, ModelBase { + + private com.commercetools.checkout.models.payment_intents.PaymentIntentOperation action; + + private com.commercetools.checkout.models.common.Amount amount; + + private String transactionId; + + private String merchantReference; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntentRefundActionImpl(@JsonProperty("amount") final com.commercetools.checkout.models.common.Amount amount, + @JsonProperty("transactionId") final String transactionId, + @JsonProperty("merchantReference") final String merchantReference) { + this.amount = amount; + this.transactionId = transactionId; + this.merchantReference = merchantReference; + this.action = PaymentIntentOperation.findEnum("refundPayment"); + } + + /** + * create empty instance + */ + public PaymentIntentRefundActionImpl() { + this.action = PaymentIntentOperation.findEnum("refundPayment"); + } + + /** + *

Action to execute for the given Payment.

+ */ + + public com.commercetools.checkout.models.payment_intents.PaymentIntentOperation getAction() { + return this.action; + } + + /** + *

Amount to be refunded. It must be less than or equal to the captured amount.

+ */ + + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + /** + *

The identifier of the capture transaction that is associated with the refund action.

+ */ + + public String getTransactionId() { + return this.transactionId; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ */ + + public String getMerchantReference() { + return this.merchantReference; + } + + public void setAmount(final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + } + + public void setTransactionId(final String transactionId) { + this.transactionId = transactionId; + } + + public void setMerchantReference(final String merchantReference) { + this.merchantReference = merchantReference; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntentRefundActionImpl that = (PaymentIntentRefundActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(amount, that.amount) + .append(transactionId, that.transactionId) + .append(merchantReference, that.merchantReference) + .append(action, that.action) + .append(amount, that.amount) + .append(transactionId, that.transactionId) + .append(merchantReference, that.merchantReference) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(amount) + .append(transactionId) + .append(merchantReference) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("amount", amount) + .append("transactionId", transactionId) + .append("merchantReference", merchantReference) + .build(); + } + + @Override + public PaymentIntentRefundAction copyDeep() { + return PaymentIntentRefundAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseAction.java new file mode 100644 index 00000000000..ad26934a323 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseAction.java @@ -0,0 +1,127 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Requests to reverse a Payment. Checkout reverses the Payment, and then requests the PSP or gift card management system to proceed with the relevant process to reverse the Payment.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentReverseAction paymentIntentReverseAction = PaymentIntentReverseAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("reversePayment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntentReverseActionImpl.class) +public interface PaymentIntentReverseAction extends PaymentIntentAction { + + /** + * discriminator value for PaymentIntentReverseAction + */ + String REVERSE_PAYMENT = "reversePayment"; + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @JsonProperty("merchantReference") + public String getMerchantReference(); + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + */ + + public void setMerchantReference(final String merchantReference); + + /** + * factory method + * @return instance of PaymentIntentReverseAction + */ + public static PaymentIntentReverseAction of() { + return new PaymentIntentReverseActionImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntentReverseAction + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntentReverseAction of(final PaymentIntentReverseAction template) { + PaymentIntentReverseActionImpl instance = new PaymentIntentReverseActionImpl(); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + public PaymentIntentReverseAction copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntentReverseAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntentReverseAction deepCopy(@Nullable final PaymentIntentReverseAction template) { + if (template == null) { + return null; + } + PaymentIntentReverseActionImpl instance = new PaymentIntentReverseActionImpl(); + instance.setMerchantReference(template.getMerchantReference()); + return instance; + } + + /** + * builder factory method for PaymentIntentReverseAction + * @return builder + */ + public static PaymentIntentReverseActionBuilder builder() { + return PaymentIntentReverseActionBuilder.of(); + } + + /** + * create builder for PaymentIntentReverseAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentReverseActionBuilder builder(final PaymentIntentReverseAction template) { + return PaymentIntentReverseActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntentReverseAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionBuilder.java new file mode 100644 index 00000000000..d99afabc11c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntentReverseActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntentReverseAction paymentIntentReverseAction = PaymentIntentReverseAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentReverseActionBuilder implements Builder { + + @Nullable + private String merchantReference; + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @param merchantReference value to be set + * @return Builder + */ + + public PaymentIntentReverseActionBuilder merchantReference(@Nullable final String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ * @return merchantReference + */ + + @Nullable + public String getMerchantReference() { + return this.merchantReference; + } + + /** + * builds PaymentIntentReverseAction with checking for non-null required values + * @return PaymentIntentReverseAction + */ + public PaymentIntentReverseAction build() { + return new PaymentIntentReverseActionImpl(merchantReference); + } + + /** + * builds PaymentIntentReverseAction without checking for non-null required values + * @return PaymentIntentReverseAction + */ + public PaymentIntentReverseAction buildUnchecked() { + return new PaymentIntentReverseActionImpl(merchantReference); + } + + /** + * factory method for an instance of PaymentIntentReverseActionBuilder + * @return builder + */ + public static PaymentIntentReverseActionBuilder of() { + return new PaymentIntentReverseActionBuilder(); + } + + /** + * create builder for PaymentIntentReverseAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntentReverseActionBuilder of(final PaymentIntentReverseAction template) { + PaymentIntentReverseActionBuilder builder = new PaymentIntentReverseActionBuilder(); + builder.merchantReference = template.getMerchantReference(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionImpl.java new file mode 100644 index 00000000000..c2e1e6d5d86 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Requests to reverse a Payment. Checkout reverses the Payment, and then requests the PSP or gift card management system to proceed with the relevant process to reverse the Payment.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntentReverseActionImpl implements PaymentIntentReverseAction, ModelBase { + + private com.commercetools.checkout.models.payment_intents.PaymentIntentOperation action; + + private String merchantReference; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntentReverseActionImpl(@JsonProperty("merchantReference") final String merchantReference) { + this.merchantReference = merchantReference; + this.action = PaymentIntentOperation.findEnum("reversePayment"); + } + + /** + * create empty instance + */ + public PaymentIntentReverseActionImpl() { + this.action = PaymentIntentOperation.findEnum("reversePayment"); + } + + /** + *

Action to execute for the given Payment.

+ */ + + public com.commercetools.checkout.models.payment_intents.PaymentIntentOperation getAction() { + return this.action; + } + + /** + *

A merchant-defined identifier associated with the Payment to track and reconcile the Payment Intent Action on the merchant's side. For example, an invoice number.

+ */ + + public String getMerchantReference() { + return this.merchantReference; + } + + public void setMerchantReference(final String merchantReference) { + this.merchantReference = merchantReference; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntentReverseActionImpl that = (PaymentIntentReverseActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(merchantReference, that.merchantReference) + .append(action, that.action) + .append(merchantReference, that.merchantReference) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(merchantReference).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("merchantReference", merchantReference) + .build(); + } + + @Override + public PaymentIntentReverseAction copyDeep() { + return PaymentIntentReverseAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeError.java new file mode 100644 index 00000000000..761fd4ba3a8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when there was an error adding a Discount Code.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AddDiscountCodeError addDiscountCodeError = AddDiscountCodeError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("add_discount_code_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AddDiscountCodeErrorImpl.class) +public interface AddDiscountCodeError extends ResponseMessage { + + /** + * discriminator value for AddDiscountCodeError + */ + String ADD_DISCOUNT_CODE_ERROR = "add_discount_code_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Error adding discount code.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the error object.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Error adding discount code.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the error object.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of AddDiscountCodeError + */ + public static AddDiscountCodeError of() { + return new AddDiscountCodeErrorImpl(); + } + + /** + * factory method to create a shallow copy AddDiscountCodeError + * @param template instance to be copied + * @return copy instance + */ + public static AddDiscountCodeError of(final AddDiscountCodeError template) { + AddDiscountCodeErrorImpl instance = new AddDiscountCodeErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public AddDiscountCodeError copyDeep(); + + /** + * factory method to create a deep copy of AddDiscountCodeError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AddDiscountCodeError deepCopy(@Nullable final AddDiscountCodeError template) { + if (template == null) { + return null; + } + AddDiscountCodeErrorImpl instance = new AddDiscountCodeErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for AddDiscountCodeError + * @return builder + */ + public static AddDiscountCodeErrorBuilder builder() { + return AddDiscountCodeErrorBuilder.of(); + } + + /** + * create builder for AddDiscountCodeError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddDiscountCodeErrorBuilder builder(final AddDiscountCodeError template) { + return AddDiscountCodeErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAddDiscountCodeError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorBuilder.java new file mode 100644 index 00000000000..59f09502c98 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AddDiscountCodeErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AddDiscountCodeError addDiscountCodeError = AddDiscountCodeError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddDiscountCodeErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public AddDiscountCodeErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Error adding discount code.

+ * @param message value to be set + * @return Builder + */ + + public AddDiscountCodeErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public AddDiscountCodeErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the error object.

+ * @param payload value to be set + * @return Builder + */ + + public AddDiscountCodeErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error adding discount code.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the error object.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds AddDiscountCodeError with checking for non-null required values + * @return AddDiscountCodeError + */ + public AddDiscountCodeError build() { + Objects.requireNonNull(severity, AddDiscountCodeError.class + ": severity is missing"); + Objects.requireNonNull(message, AddDiscountCodeError.class + ": message is missing"); + Objects.requireNonNull(correlationId, AddDiscountCodeError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, AddDiscountCodeError.class + ": payload is missing"); + return new AddDiscountCodeErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds AddDiscountCodeError without checking for non-null required values + * @return AddDiscountCodeError + */ + public AddDiscountCodeError buildUnchecked() { + return new AddDiscountCodeErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of AddDiscountCodeErrorBuilder + * @return builder + */ + public static AddDiscountCodeErrorBuilder of() { + return new AddDiscountCodeErrorBuilder(); + } + + /** + * create builder for AddDiscountCodeError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddDiscountCodeErrorBuilder of(final AddDiscountCodeError template) { + AddDiscountCodeErrorBuilder builder = new AddDiscountCodeErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorImpl.java new file mode 100644 index 00000000000..40b6fe05ca5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when there was an error adding a Discount Code.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddDiscountCodeErrorImpl implements AddDiscountCodeError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + AddDiscountCodeErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = ADD_DISCOUNT_CODE_ERROR; + } + + /** + * create empty instance + */ + public AddDiscountCodeErrorImpl() { + this.code = ADD_DISCOUNT_CODE_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error adding discount code.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the error object.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AddDiscountCodeErrorImpl that = (AddDiscountCodeErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public AddDiscountCodeError copyDeep() { + return AddDiscountCodeError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivated.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivated.java new file mode 100644 index 00000000000..884709cfe11 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivated.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the requested Application is deactivated. Activate the Application in the Merchant Center to continue.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApplicationDeactivated applicationDeactivated = ApplicationDeactivated.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("application_disabled") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationDeactivatedImpl.class) +public interface ApplicationDeactivated extends ResponseMessage { + + /** + * discriminator value for ApplicationDeactivated + */ + String APPLICATION_DISABLED = "application_disabled"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Application {applicationKey} for {projectKey} is disabled.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the project and application objects with the related key property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Application {applicationKey} for {projectKey} is disabled.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the project and application objects with the related key property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of ApplicationDeactivated + */ + public static ApplicationDeactivated of() { + return new ApplicationDeactivatedImpl(); + } + + /** + * factory method to create a shallow copy ApplicationDeactivated + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationDeactivated of(final ApplicationDeactivated template) { + ApplicationDeactivatedImpl instance = new ApplicationDeactivatedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public ApplicationDeactivated copyDeep(); + + /** + * factory method to create a deep copy of ApplicationDeactivated + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationDeactivated deepCopy(@Nullable final ApplicationDeactivated template) { + if (template == null) { + return null; + } + ApplicationDeactivatedImpl instance = new ApplicationDeactivatedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for ApplicationDeactivated + * @return builder + */ + public static ApplicationDeactivatedBuilder builder() { + return ApplicationDeactivatedBuilder.of(); + } + + /** + * create builder for ApplicationDeactivated instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationDeactivatedBuilder builder(final ApplicationDeactivated template) { + return ApplicationDeactivatedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationDeactivated(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedBuilder.java new file mode 100644 index 00000000000..bf0166164cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationDeactivatedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApplicationDeactivated applicationDeactivated = ApplicationDeactivated.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationDeactivatedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public ApplicationDeactivatedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Application {applicationKey} for {projectKey} is disabled.

+ * @param message value to be set + * @return Builder + */ + + public ApplicationDeactivatedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ApplicationDeactivatedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the project and application objects with the related key property.

+ * @param payload value to be set + * @return Builder + */ + + public ApplicationDeactivatedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Application {applicationKey} for {projectKey} is disabled.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the project and application objects with the related key property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds ApplicationDeactivated with checking for non-null required values + * @return ApplicationDeactivated + */ + public ApplicationDeactivated build() { + Objects.requireNonNull(severity, ApplicationDeactivated.class + ": severity is missing"); + Objects.requireNonNull(message, ApplicationDeactivated.class + ": message is missing"); + Objects.requireNonNull(correlationId, ApplicationDeactivated.class + ": correlationId is missing"); + Objects.requireNonNull(payload, ApplicationDeactivated.class + ": payload is missing"); + return new ApplicationDeactivatedImpl(severity, message, correlationId, payload); + } + + /** + * builds ApplicationDeactivated without checking for non-null required values + * @return ApplicationDeactivated + */ + public ApplicationDeactivated buildUnchecked() { + return new ApplicationDeactivatedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of ApplicationDeactivatedBuilder + * @return builder + */ + public static ApplicationDeactivatedBuilder of() { + return new ApplicationDeactivatedBuilder(); + } + + /** + * create builder for ApplicationDeactivated instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationDeactivatedBuilder of(final ApplicationDeactivated template) { + ApplicationDeactivatedBuilder builder = new ApplicationDeactivatedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedImpl.java new file mode 100644 index 00000000000..655f827a9fc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the requested Application is deactivated. Activate the Application in the Merchant Center to continue.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationDeactivatedImpl implements ApplicationDeactivated, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationDeactivatedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = APPLICATION_DISABLED; + } + + /** + * create empty instance + */ + public ApplicationDeactivatedImpl() { + this.code = APPLICATION_DISABLED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Application {applicationKey} for {projectKey} is disabled.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the project and application objects with the related key property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationDeactivatedImpl that = (ApplicationDeactivatedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public ApplicationDeactivated copyDeep() { + return ApplicationDeactivated.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputData.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputData.java new file mode 100644 index 00000000000..e4b9219a6dd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputData.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Checkout properties contains invalid fields.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     BadInputData badInputData = BadInputData.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("invalid_fields") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = BadInputDataImpl.class) +public interface BadInputData extends ResponseMessage { + + /** + * discriminator value for BadInputData + */ + String INVALID_FIELDS = "invalid_fields"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Some fields are invalid.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the invalidFields array of objects with the related schema, path, value and message properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Some fields are invalid.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the invalidFields array of objects with the related schema, path, value and message properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of BadInputData + */ + public static BadInputData of() { + return new BadInputDataImpl(); + } + + /** + * factory method to create a shallow copy BadInputData + * @param template instance to be copied + * @return copy instance + */ + public static BadInputData of(final BadInputData template) { + BadInputDataImpl instance = new BadInputDataImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public BadInputData copyDeep(); + + /** + * factory method to create a deep copy of BadInputData + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BadInputData deepCopy(@Nullable final BadInputData template) { + if (template == null) { + return null; + } + BadInputDataImpl instance = new BadInputDataImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for BadInputData + * @return builder + */ + public static BadInputDataBuilder builder() { + return BadInputDataBuilder.of(); + } + + /** + * create builder for BadInputData instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BadInputDataBuilder builder(final BadInputData template) { + return BadInputDataBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withBadInputData(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputDataBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputDataBuilder.java new file mode 100644 index 00000000000..cd3ebfd2181 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputDataBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BadInputDataBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     BadInputData badInputData = BadInputData.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BadInputDataBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public BadInputDataBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Some fields are invalid.

+ * @param message value to be set + * @return Builder + */ + + public BadInputDataBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public BadInputDataBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the invalidFields array of objects with the related schema, path, value and message properties.

+ * @param payload value to be set + * @return Builder + */ + + public BadInputDataBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Some fields are invalid.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the invalidFields array of objects with the related schema, path, value and message properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds BadInputData with checking for non-null required values + * @return BadInputData + */ + public BadInputData build() { + Objects.requireNonNull(severity, BadInputData.class + ": severity is missing"); + Objects.requireNonNull(message, BadInputData.class + ": message is missing"); + Objects.requireNonNull(correlationId, BadInputData.class + ": correlationId is missing"); + Objects.requireNonNull(payload, BadInputData.class + ": payload is missing"); + return new BadInputDataImpl(severity, message, correlationId, payload); + } + + /** + * builds BadInputData without checking for non-null required values + * @return BadInputData + */ + public BadInputData buildUnchecked() { + return new BadInputDataImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of BadInputDataBuilder + * @return builder + */ + public static BadInputDataBuilder of() { + return new BadInputDataBuilder(); + } + + /** + * create builder for BadInputData instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BadInputDataBuilder of(final BadInputData template) { + BadInputDataBuilder builder = new BadInputDataBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputDataImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputDataImpl.java new file mode 100644 index 00000000000..e9799017d8d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/BadInputDataImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Checkout properties contains invalid fields.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BadInputDataImpl implements BadInputData, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + BadInputDataImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = INVALID_FIELDS; + } + + /** + * create empty instance + */ + public BadInputDataImpl() { + this.code = INVALID_FIELDS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Some fields are invalid.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the invalidFields array of objects with the related schema, path, value and message properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BadInputDataImpl that = (BadInputDataImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public BadInputData copyDeep() { + return BadInputData.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckout.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckout.java new file mode 100644 index 00000000000..fae63ab4963 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckout.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Cart was emptied during the checkout process. It is not possible to recover from this, the customer must restart the checkout process.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartEmptiedDuringCheckout cartEmptiedDuringCheckout = CartEmptiedDuringCheckout.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("cart_emptied_during_checkout") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartEmptiedDuringCheckoutImpl.class) +public interface CartEmptiedDuringCheckout extends ResponseMessage { + + /** + * discriminator value for CartEmptiedDuringCheckout + */ + String CART_EMPTIED_DURING_CHECKOUT = "cart_emptied_during_checkout"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Cart {cartId} was emptied during checkout.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Cart {cartId} was emptied during checkout.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of CartEmptiedDuringCheckout + */ + public static CartEmptiedDuringCheckout of() { + return new CartEmptiedDuringCheckoutImpl(); + } + + /** + * factory method to create a shallow copy CartEmptiedDuringCheckout + * @param template instance to be copied + * @return copy instance + */ + public static CartEmptiedDuringCheckout of(final CartEmptiedDuringCheckout template) { + CartEmptiedDuringCheckoutImpl instance = new CartEmptiedDuringCheckoutImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public CartEmptiedDuringCheckout copyDeep(); + + /** + * factory method to create a deep copy of CartEmptiedDuringCheckout + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartEmptiedDuringCheckout deepCopy(@Nullable final CartEmptiedDuringCheckout template) { + if (template == null) { + return null; + } + CartEmptiedDuringCheckoutImpl instance = new CartEmptiedDuringCheckoutImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for CartEmptiedDuringCheckout + * @return builder + */ + public static CartEmptiedDuringCheckoutBuilder builder() { + return CartEmptiedDuringCheckoutBuilder.of(); + } + + /** + * create builder for CartEmptiedDuringCheckout instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartEmptiedDuringCheckoutBuilder builder(final CartEmptiedDuringCheckout template) { + return CartEmptiedDuringCheckoutBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartEmptiedDuringCheckout(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutBuilder.java new file mode 100644 index 00000000000..a838a023d51 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartEmptiedDuringCheckoutBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartEmptiedDuringCheckout cartEmptiedDuringCheckout = CartEmptiedDuringCheckout.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartEmptiedDuringCheckoutBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public CartEmptiedDuringCheckoutBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Cart {cartId} was emptied during checkout.

+ * @param message value to be set + * @return Builder + */ + + public CartEmptiedDuringCheckoutBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CartEmptiedDuringCheckoutBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + * @return Builder + */ + + public CartEmptiedDuringCheckoutBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart {cartId} was emptied during checkout.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds CartEmptiedDuringCheckout with checking for non-null required values + * @return CartEmptiedDuringCheckout + */ + public CartEmptiedDuringCheckout build() { + Objects.requireNonNull(severity, CartEmptiedDuringCheckout.class + ": severity is missing"); + Objects.requireNonNull(message, CartEmptiedDuringCheckout.class + ": message is missing"); + Objects.requireNonNull(correlationId, CartEmptiedDuringCheckout.class + ": correlationId is missing"); + Objects.requireNonNull(payload, CartEmptiedDuringCheckout.class + ": payload is missing"); + return new CartEmptiedDuringCheckoutImpl(severity, message, correlationId, payload); + } + + /** + * builds CartEmptiedDuringCheckout without checking for non-null required values + * @return CartEmptiedDuringCheckout + */ + public CartEmptiedDuringCheckout buildUnchecked() { + return new CartEmptiedDuringCheckoutImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of CartEmptiedDuringCheckoutBuilder + * @return builder + */ + public static CartEmptiedDuringCheckoutBuilder of() { + return new CartEmptiedDuringCheckoutBuilder(); + } + + /** + * create builder for CartEmptiedDuringCheckout instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartEmptiedDuringCheckoutBuilder of(final CartEmptiedDuringCheckout template) { + CartEmptiedDuringCheckoutBuilder builder = new CartEmptiedDuringCheckoutBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutImpl.java new file mode 100644 index 00000000000..98c8e1f0450 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Cart was emptied during the checkout process. It is not possible to recover from this, the customer must restart the checkout process.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartEmptiedDuringCheckoutImpl implements CartEmptiedDuringCheckout, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + CartEmptiedDuringCheckoutImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = CART_EMPTIED_DURING_CHECKOUT; + } + + /** + * create empty instance + */ + public CartEmptiedDuringCheckoutImpl() { + this.code = CART_EMPTIED_DURING_CHECKOUT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart {cartId} was emptied during checkout.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartEmptiedDuringCheckoutImpl that = (CartEmptiedDuringCheckoutImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public CartEmptiedDuringCheckout copyDeep() { + return CartEmptiedDuringCheckout.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmpty.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmpty.java new file mode 100644 index 00000000000..40d77be4d07 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmpty.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Cart for the current checkout is empty. The Cart must contain at least one Line Item.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartEmpty cartEmpty = CartEmpty.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("cart_empty") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartEmptyImpl.class) +public interface CartEmpty extends ResponseMessage { + + /** + * discriminator value for CartEmpty + */ + String CART_EMPTY = "cart_empty"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Cart {cartId} is empty.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Cart {cartId} is empty.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of CartEmpty + */ + public static CartEmpty of() { + return new CartEmptyImpl(); + } + + /** + * factory method to create a shallow copy CartEmpty + * @param template instance to be copied + * @return copy instance + */ + public static CartEmpty of(final CartEmpty template) { + CartEmptyImpl instance = new CartEmptyImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public CartEmpty copyDeep(); + + /** + * factory method to create a deep copy of CartEmpty + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartEmpty deepCopy(@Nullable final CartEmpty template) { + if (template == null) { + return null; + } + CartEmptyImpl instance = new CartEmptyImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for CartEmpty + * @return builder + */ + public static CartEmptyBuilder builder() { + return CartEmptyBuilder.of(); + } + + /** + * create builder for CartEmpty instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartEmptyBuilder builder(final CartEmpty template) { + return CartEmptyBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartEmpty(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptyBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptyBuilder.java new file mode 100644 index 00000000000..20acc2630d6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptyBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartEmptyBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartEmpty cartEmpty = CartEmpty.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartEmptyBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public CartEmptyBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Cart {cartId} is empty.

+ * @param message value to be set + * @return Builder + */ + + public CartEmptyBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CartEmptyBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + * @return Builder + */ + + public CartEmptyBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart {cartId} is empty.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds CartEmpty with checking for non-null required values + * @return CartEmpty + */ + public CartEmpty build() { + Objects.requireNonNull(severity, CartEmpty.class + ": severity is missing"); + Objects.requireNonNull(message, CartEmpty.class + ": message is missing"); + Objects.requireNonNull(correlationId, CartEmpty.class + ": correlationId is missing"); + Objects.requireNonNull(payload, CartEmpty.class + ": payload is missing"); + return new CartEmptyImpl(severity, message, correlationId, payload); + } + + /** + * builds CartEmpty without checking for non-null required values + * @return CartEmpty + */ + public CartEmpty buildUnchecked() { + return new CartEmptyImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of CartEmptyBuilder + * @return builder + */ + public static CartEmptyBuilder of() { + return new CartEmptyBuilder(); + } + + /** + * create builder for CartEmpty instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartEmptyBuilder of(final CartEmpty template) { + CartEmptyBuilder builder = new CartEmptyBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptyImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptyImpl.java new file mode 100644 index 00000000000..a8a8927bfbc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartEmptyImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Cart for the current checkout is empty. The Cart must contain at least one Line Item.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartEmptyImpl implements CartEmpty, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + CartEmptyImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = CART_EMPTY; + } + + /** + * create empty instance + */ + public CartEmptyImpl() { + this.code = CART_EMPTY; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart {cartId} is empty.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartEmptyImpl that = (CartEmptyImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public CartEmpty copyDeep() { + return CartEmpty.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFound.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFound.java new file mode 100644 index 00000000000..bd4b13ac0b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFound.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Cart is not found. To start the checkout process, a valid Cart with at least one Line Item is required.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartNotFound cartNotFound = CartNotFound.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("cart_not_found") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartNotFoundImpl.class) +public interface CartNotFound extends ResponseMessage { + + /** + * discriminator value for CartNotFound + */ + String CART_NOT_FOUND = "cart_not_found"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Cart for {projectKey} and session {sessionId} not found.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the project and session objects with the related key and id properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Cart for {projectKey} and session {sessionId} not found.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the project and session objects with the related key and id properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of CartNotFound + */ + public static CartNotFound of() { + return new CartNotFoundImpl(); + } + + /** + * factory method to create a shallow copy CartNotFound + * @param template instance to be copied + * @return copy instance + */ + public static CartNotFound of(final CartNotFound template) { + CartNotFoundImpl instance = new CartNotFoundImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public CartNotFound copyDeep(); + + /** + * factory method to create a deep copy of CartNotFound + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartNotFound deepCopy(@Nullable final CartNotFound template) { + if (template == null) { + return null; + } + CartNotFoundImpl instance = new CartNotFoundImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for CartNotFound + * @return builder + */ + public static CartNotFoundBuilder builder() { + return CartNotFoundBuilder.of(); + } + + /** + * create builder for CartNotFound instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartNotFoundBuilder builder(final CartNotFound template) { + return CartNotFoundBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartNotFound(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFoundBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFoundBuilder.java new file mode 100644 index 00000000000..f2d4adb7b3f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFoundBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartNotFoundBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartNotFound cartNotFound = CartNotFound.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartNotFoundBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public CartNotFoundBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Cart for {projectKey} and session {sessionId} not found.

+ * @param message value to be set + * @return Builder + */ + + public CartNotFoundBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CartNotFoundBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the project and session objects with the related key and id properties.

+ * @param payload value to be set + * @return Builder + */ + + public CartNotFoundBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart for {projectKey} and session {sessionId} not found.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the project and session objects with the related key and id properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds CartNotFound with checking for non-null required values + * @return CartNotFound + */ + public CartNotFound build() { + Objects.requireNonNull(severity, CartNotFound.class + ": severity is missing"); + Objects.requireNonNull(message, CartNotFound.class + ": message is missing"); + Objects.requireNonNull(correlationId, CartNotFound.class + ": correlationId is missing"); + Objects.requireNonNull(payload, CartNotFound.class + ": payload is missing"); + return new CartNotFoundImpl(severity, message, correlationId, payload); + } + + /** + * builds CartNotFound without checking for non-null required values + * @return CartNotFound + */ + public CartNotFound buildUnchecked() { + return new CartNotFoundImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of CartNotFoundBuilder + * @return builder + */ + public static CartNotFoundBuilder of() { + return new CartNotFoundBuilder(); + } + + /** + * create builder for CartNotFound instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartNotFoundBuilder of(final CartNotFound template) { + CartNotFoundBuilder builder = new CartNotFoundBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFoundImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFoundImpl.java new file mode 100644 index 00000000000..fdf915b5242 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartNotFoundImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Cart is not found. To start the checkout process, a valid Cart with at least one Line Item is required.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartNotFoundImpl implements CartNotFound, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + CartNotFoundImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = CART_NOT_FOUND; + } + + /** + * create empty instance + */ + public CartNotFoundImpl() { + this.code = CART_NOT_FOUND; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart for {projectKey} and session {sessionId} not found.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the project and session objects with the related key and id properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartNotFoundImpl that = (CartNotFoundImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public CartNotFound copyDeep() { + return CartNotFound.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPayment.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPayment.java new file mode 100644 index 00000000000..894923fcb2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPayment.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when trying to add a Payment to a Cart that already references an approved Payment.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartWithExistingPayment cartWithExistingPayment = CartWithExistingPayment.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("cart_with_exisiting_payment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartWithExistingPaymentImpl.class) +public interface CartWithExistingPayment extends ResponseMessage { + + /** + * discriminator value for CartWithExistingPayment + */ + String CART_WITH_EXISITING_PAYMENT = "cart_with_exisiting_payment"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Cart with existing approved payment.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Cart with existing approved payment.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of CartWithExistingPayment + */ + public static CartWithExistingPayment of() { + return new CartWithExistingPaymentImpl(); + } + + /** + * factory method to create a shallow copy CartWithExistingPayment + * @param template instance to be copied + * @return copy instance + */ + public static CartWithExistingPayment of(final CartWithExistingPayment template) { + CartWithExistingPaymentImpl instance = new CartWithExistingPaymentImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public CartWithExistingPayment copyDeep(); + + /** + * factory method to create a deep copy of CartWithExistingPayment + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartWithExistingPayment deepCopy(@Nullable final CartWithExistingPayment template) { + if (template == null) { + return null; + } + CartWithExistingPaymentImpl instance = new CartWithExistingPaymentImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for CartWithExistingPayment + * @return builder + */ + public static CartWithExistingPaymentBuilder builder() { + return CartWithExistingPaymentBuilder.of(); + } + + /** + * create builder for CartWithExistingPayment instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartWithExistingPaymentBuilder builder(final CartWithExistingPayment template) { + return CartWithExistingPaymentBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartWithExistingPayment(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentBuilder.java new file mode 100644 index 00000000000..e3f169cdc16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartWithExistingPaymentBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartWithExistingPayment cartWithExistingPayment = CartWithExistingPayment.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartWithExistingPaymentBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public CartWithExistingPaymentBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Cart with existing approved payment.

+ * @param message value to be set + * @return Builder + */ + + public CartWithExistingPaymentBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CartWithExistingPaymentBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + * @return Builder + */ + + public CartWithExistingPaymentBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart with existing approved payment.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds CartWithExistingPayment with checking for non-null required values + * @return CartWithExistingPayment + */ + public CartWithExistingPayment build() { + Objects.requireNonNull(severity, CartWithExistingPayment.class + ": severity is missing"); + Objects.requireNonNull(message, CartWithExistingPayment.class + ": message is missing"); + Objects.requireNonNull(correlationId, CartWithExistingPayment.class + ": correlationId is missing"); + Objects.requireNonNull(payload, CartWithExistingPayment.class + ": payload is missing"); + return new CartWithExistingPaymentImpl(severity, message, correlationId, payload); + } + + /** + * builds CartWithExistingPayment without checking for non-null required values + * @return CartWithExistingPayment + */ + public CartWithExistingPayment buildUnchecked() { + return new CartWithExistingPaymentImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of CartWithExistingPaymentBuilder + * @return builder + */ + public static CartWithExistingPaymentBuilder of() { + return new CartWithExistingPaymentBuilder(); + } + + /** + * create builder for CartWithExistingPayment instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartWithExistingPaymentBuilder of(final CartWithExistingPayment template) { + CartWithExistingPaymentBuilder builder = new CartWithExistingPaymentBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentImpl.java new file mode 100644 index 00000000000..6538d8eb5de --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when trying to add a Payment to a Cart that already references an approved Payment.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartWithExistingPaymentImpl implements CartWithExistingPayment, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + CartWithExistingPaymentImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = CART_WITH_EXISITING_PAYMENT; + } + + /** + * create empty instance + */ + public CartWithExistingPaymentImpl() { + this.code = CART_WITH_EXISITING_PAYMENT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart with existing approved payment.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartWithExistingPaymentImpl that = (CartWithExistingPaymentImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public CartWithExistingPayment copyDeep() { + return CartWithExistingPayment.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelled.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelled.java new file mode 100644 index 00000000000..645a19d5164 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelled.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer cancels the checkout process.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutCancelled checkoutCancelled = CheckoutCancelled.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("checkout_cancelled") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CheckoutCancelledImpl.class) +public interface CheckoutCancelled extends Message { + + /** + * discriminator value for CheckoutCancelled + */ + String CHECKOUT_CANCELLED = "checkout_cancelled"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Checkout cancelled.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Checkout cancelled.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of CheckoutCancelled + */ + public static CheckoutCancelled of() { + return new CheckoutCancelledImpl(); + } + + /** + * factory method to create a shallow copy CheckoutCancelled + * @param template instance to be copied + * @return copy instance + */ + public static CheckoutCancelled of(final CheckoutCancelled template) { + CheckoutCancelledImpl instance = new CheckoutCancelledImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public CheckoutCancelled copyDeep(); + + /** + * factory method to create a deep copy of CheckoutCancelled + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CheckoutCancelled deepCopy(@Nullable final CheckoutCancelled template) { + if (template == null) { + return null; + } + CheckoutCancelledImpl instance = new CheckoutCancelledImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for CheckoutCancelled + * @return builder + */ + public static CheckoutCancelledBuilder builder() { + return CheckoutCancelledBuilder.of(); + } + + /** + * create builder for CheckoutCancelled instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutCancelledBuilder builder(final CheckoutCancelled template) { + return CheckoutCancelledBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCheckoutCancelled(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledBuilder.java new file mode 100644 index 00000000000..bef474bf02e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CheckoutCancelledBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutCancelled checkoutCancelled = CheckoutCancelled.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutCancelledBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public CheckoutCancelledBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Checkout cancelled.

+ * @param message value to be set + * @return Builder + */ + + public CheckoutCancelledBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CheckoutCancelledBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout cancelled.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds CheckoutCancelled with checking for non-null required values + * @return CheckoutCancelled + */ + public CheckoutCancelled build() { + Objects.requireNonNull(severity, CheckoutCancelled.class + ": severity is missing"); + Objects.requireNonNull(message, CheckoutCancelled.class + ": message is missing"); + Objects.requireNonNull(correlationId, CheckoutCancelled.class + ": correlationId is missing"); + return new CheckoutCancelledImpl(severity, message, correlationId); + } + + /** + * builds CheckoutCancelled without checking for non-null required values + * @return CheckoutCancelled + */ + public CheckoutCancelled buildUnchecked() { + return new CheckoutCancelledImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of CheckoutCancelledBuilder + * @return builder + */ + public static CheckoutCancelledBuilder of() { + return new CheckoutCancelledBuilder(); + } + + /** + * create builder for CheckoutCancelled instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutCancelledBuilder of(final CheckoutCancelled template) { + CheckoutCancelledBuilder builder = new CheckoutCancelledBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledImpl.java new file mode 100644 index 00000000000..78cb1adc5e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer cancels the checkout process.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutCancelledImpl implements CheckoutCancelled, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + CheckoutCancelledImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = CHECKOUT_CANCELLED; + } + + /** + * create empty instance + */ + public CheckoutCancelledImpl() { + this.code = CHECKOUT_CANCELLED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout cancelled.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CheckoutCancelledImpl that = (CheckoutCancelledImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public CheckoutCancelled copyDeep() { + return CheckoutCancelled.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompleted.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompleted.java new file mode 100644 index 00000000000..c8107adc6df --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompleted.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer completes the checkout process.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutCompleted checkoutCompleted = CheckoutCompleted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("checkout_completed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CheckoutCompletedImpl.class) +public interface CheckoutCompleted extends ResponseMessage { + + /** + * discriminator value for CheckoutCompleted + */ + String CHECKOUT_COMPLETED = "checkout_completed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Checkout for {orderId} completed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Contains the order object with the id property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Checkout for {orderId} completed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Contains the order object with the id property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of CheckoutCompleted + */ + public static CheckoutCompleted of() { + return new CheckoutCompletedImpl(); + } + + /** + * factory method to create a shallow copy CheckoutCompleted + * @param template instance to be copied + * @return copy instance + */ + public static CheckoutCompleted of(final CheckoutCompleted template) { + CheckoutCompletedImpl instance = new CheckoutCompletedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public CheckoutCompleted copyDeep(); + + /** + * factory method to create a deep copy of CheckoutCompleted + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CheckoutCompleted deepCopy(@Nullable final CheckoutCompleted template) { + if (template == null) { + return null; + } + CheckoutCompletedImpl instance = new CheckoutCompletedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for CheckoutCompleted + * @return builder + */ + public static CheckoutCompletedBuilder builder() { + return CheckoutCompletedBuilder.of(); + } + + /** + * create builder for CheckoutCompleted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutCompletedBuilder builder(final CheckoutCompleted template) { + return CheckoutCompletedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCheckoutCompleted(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedBuilder.java new file mode 100644 index 00000000000..2e4cb62569c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CheckoutCompletedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutCompleted checkoutCompleted = CheckoutCompleted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutCompletedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public CheckoutCompletedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Checkout for {orderId} completed.

+ * @param message value to be set + * @return Builder + */ + + public CheckoutCompletedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CheckoutCompletedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the order object with the id property.

+ * @param payload value to be set + * @return Builder + */ + + public CheckoutCompletedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout for {orderId} completed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the order object with the id property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds CheckoutCompleted with checking for non-null required values + * @return CheckoutCompleted + */ + public CheckoutCompleted build() { + Objects.requireNonNull(severity, CheckoutCompleted.class + ": severity is missing"); + Objects.requireNonNull(message, CheckoutCompleted.class + ": message is missing"); + Objects.requireNonNull(correlationId, CheckoutCompleted.class + ": correlationId is missing"); + Objects.requireNonNull(payload, CheckoutCompleted.class + ": payload is missing"); + return new CheckoutCompletedImpl(severity, message, correlationId, payload); + } + + /** + * builds CheckoutCompleted without checking for non-null required values + * @return CheckoutCompleted + */ + public CheckoutCompleted buildUnchecked() { + return new CheckoutCompletedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of CheckoutCompletedBuilder + * @return builder + */ + public static CheckoutCompletedBuilder of() { + return new CheckoutCompletedBuilder(); + } + + /** + * create builder for CheckoutCompleted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutCompletedBuilder of(final CheckoutCompleted template) { + CheckoutCompletedBuilder builder = new CheckoutCompletedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedImpl.java new file mode 100644 index 00000000000..230266af82a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer completes the checkout process.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutCompletedImpl implements CheckoutCompleted, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + CheckoutCompletedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = CHECKOUT_COMPLETED; + } + + /** + * create empty instance + */ + public CheckoutCompletedImpl() { + this.code = CHECKOUT_COMPLETED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout for {orderId} completed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the order object with the id property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CheckoutCompletedImpl that = (CheckoutCompletedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public CheckoutCompleted copyDeep() { + return CheckoutCompleted.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoaded.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoaded.java new file mode 100644 index 00000000000..ae82d15afb4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoaded.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when Checkout is loaded and waiting for the configuration properties to be passed with the checkoutFlow or paymentFlow method.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutLoaded checkoutLoaded = CheckoutLoaded.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("checkout_loaded") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CheckoutLoadedImpl.class) +public interface CheckoutLoaded extends Message { + + /** + * discriminator value for CheckoutLoaded + */ + String CHECKOUT_LOADED = "checkout_loaded"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Checkout loaded.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Checkout loaded.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of CheckoutLoaded + */ + public static CheckoutLoaded of() { + return new CheckoutLoadedImpl(); + } + + /** + * factory method to create a shallow copy CheckoutLoaded + * @param template instance to be copied + * @return copy instance + */ + public static CheckoutLoaded of(final CheckoutLoaded template) { + CheckoutLoadedImpl instance = new CheckoutLoadedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public CheckoutLoaded copyDeep(); + + /** + * factory method to create a deep copy of CheckoutLoaded + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CheckoutLoaded deepCopy(@Nullable final CheckoutLoaded template) { + if (template == null) { + return null; + } + CheckoutLoadedImpl instance = new CheckoutLoadedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for CheckoutLoaded + * @return builder + */ + public static CheckoutLoadedBuilder builder() { + return CheckoutLoadedBuilder.of(); + } + + /** + * create builder for CheckoutLoaded instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutLoadedBuilder builder(final CheckoutLoaded template) { + return CheckoutLoadedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCheckoutLoaded(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedBuilder.java new file mode 100644 index 00000000000..0ea56b37d5c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CheckoutLoadedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutLoaded checkoutLoaded = CheckoutLoaded.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutLoadedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public CheckoutLoadedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Checkout loaded.

+ * @param message value to be set + * @return Builder + */ + + public CheckoutLoadedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CheckoutLoadedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout loaded.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds CheckoutLoaded with checking for non-null required values + * @return CheckoutLoaded + */ + public CheckoutLoaded build() { + Objects.requireNonNull(severity, CheckoutLoaded.class + ": severity is missing"); + Objects.requireNonNull(message, CheckoutLoaded.class + ": message is missing"); + Objects.requireNonNull(correlationId, CheckoutLoaded.class + ": correlationId is missing"); + return new CheckoutLoadedImpl(severity, message, correlationId); + } + + /** + * builds CheckoutLoaded without checking for non-null required values + * @return CheckoutLoaded + */ + public CheckoutLoaded buildUnchecked() { + return new CheckoutLoadedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of CheckoutLoadedBuilder + * @return builder + */ + public static CheckoutLoadedBuilder of() { + return new CheckoutLoadedBuilder(); + } + + /** + * create builder for CheckoutLoaded instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutLoadedBuilder of(final CheckoutLoaded template) { + CheckoutLoadedBuilder builder = new CheckoutLoadedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedImpl.java new file mode 100644 index 00000000000..56a2b3fe5a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when Checkout is loaded and waiting for the configuration properties to be passed with the checkoutFlow or paymentFlow method.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutLoadedImpl implements CheckoutLoaded, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + CheckoutLoadedImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = CHECKOUT_LOADED; + } + + /** + * create empty instance + */ + public CheckoutLoadedImpl() { + this.code = CHECKOUT_LOADED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout loaded.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CheckoutLoadedImpl that = (CheckoutLoadedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public CheckoutLoaded copyDeep() { + return CheckoutLoaded.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStarted.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStarted.java new file mode 100644 index 00000000000..e424cbcf24d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStarted.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the configuration properties are passed successfully with the checkoutFlow or paymentFlow method and the checkout process starts.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutStarted checkoutStarted = CheckoutStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("checkout_started") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CheckoutStartedImpl.class) +public interface CheckoutStarted extends Message { + + /** + * discriminator value for CheckoutStarted + */ + String CHECKOUT_STARTED = "checkout_started"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Checkout started.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Checkout started.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of CheckoutStarted + */ + public static CheckoutStarted of() { + return new CheckoutStartedImpl(); + } + + /** + * factory method to create a shallow copy CheckoutStarted + * @param template instance to be copied + * @return copy instance + */ + public static CheckoutStarted of(final CheckoutStarted template) { + CheckoutStartedImpl instance = new CheckoutStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public CheckoutStarted copyDeep(); + + /** + * factory method to create a deep copy of CheckoutStarted + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CheckoutStarted deepCopy(@Nullable final CheckoutStarted template) { + if (template == null) { + return null; + } + CheckoutStartedImpl instance = new CheckoutStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for CheckoutStarted + * @return builder + */ + public static CheckoutStartedBuilder builder() { + return CheckoutStartedBuilder.of(); + } + + /** + * create builder for CheckoutStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutStartedBuilder builder(final CheckoutStarted template) { + return CheckoutStartedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCheckoutStarted(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedBuilder.java new file mode 100644 index 00000000000..68029a523e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CheckoutStartedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CheckoutStarted checkoutStarted = CheckoutStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutStartedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public CheckoutStartedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Checkout started.

+ * @param message value to be set + * @return Builder + */ + + public CheckoutStartedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public CheckoutStartedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout started.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds CheckoutStarted with checking for non-null required values + * @return CheckoutStarted + */ + public CheckoutStarted build() { + Objects.requireNonNull(severity, CheckoutStarted.class + ": severity is missing"); + Objects.requireNonNull(message, CheckoutStarted.class + ": message is missing"); + Objects.requireNonNull(correlationId, CheckoutStarted.class + ": correlationId is missing"); + return new CheckoutStartedImpl(severity, message, correlationId); + } + + /** + * builds CheckoutStarted without checking for non-null required values + * @return CheckoutStarted + */ + public CheckoutStarted buildUnchecked() { + return new CheckoutStartedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of CheckoutStartedBuilder + * @return builder + */ + public static CheckoutStartedBuilder of() { + return new CheckoutStartedBuilder(); + } + + /** + * create builder for CheckoutStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CheckoutStartedBuilder of(final CheckoutStarted template) { + CheckoutStartedBuilder builder = new CheckoutStartedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedImpl.java new file mode 100644 index 00000000000..1ab7d58c372 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the configuration properties are passed successfully with the checkoutFlow or paymentFlow method and the checkout process starts.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CheckoutStartedImpl implements CheckoutStarted, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + CheckoutStartedImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = CHECKOUT_STARTED; + } + + /** + * create empty instance + */ + public CheckoutStartedImpl() { + this.code = CHECKOUT_STARTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Checkout started.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CheckoutStartedImpl that = (CheckoutStartedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public CheckoutStarted copyDeep() { + return CheckoutStarted.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorError.java new file mode 100644 index 00000000000..afb84022797 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Connector triggers an error.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ConnectorError connectorError = ConnectorError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("connector_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ConnectorErrorImpl.class) +public interface ConnectorError extends ResponseMessage { + + /** + * discriminator value for ConnectorError + */ + String CONNECTOR_ERROR = "connector_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Connector error.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the connector object with the id property and optional error, message, and data properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Connector error.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the connector object with the id property and optional error, message, and data properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of ConnectorError + */ + public static ConnectorError of() { + return new ConnectorErrorImpl(); + } + + /** + * factory method to create a shallow copy ConnectorError + * @param template instance to be copied + * @return copy instance + */ + public static ConnectorError of(final ConnectorError template) { + ConnectorErrorImpl instance = new ConnectorErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public ConnectorError copyDeep(); + + /** + * factory method to create a deep copy of ConnectorError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ConnectorError deepCopy(@Nullable final ConnectorError template) { + if (template == null) { + return null; + } + ConnectorErrorImpl instance = new ConnectorErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for ConnectorError + * @return builder + */ + public static ConnectorErrorBuilder builder() { + return ConnectorErrorBuilder.of(); + } + + /** + * create builder for ConnectorError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConnectorErrorBuilder builder(final ConnectorError template) { + return ConnectorErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withConnectorError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorBuilder.java new file mode 100644 index 00000000000..2c844a29e8f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ConnectorErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ConnectorError connectorError = ConnectorError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConnectorErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public ConnectorErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Connector error.

+ * @param message value to be set + * @return Builder + */ + + public ConnectorErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ConnectorErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the connector object with the id property and optional error, message, and data properties.

+ * @param payload value to be set + * @return Builder + */ + + public ConnectorErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Connector error.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the connector object with the id property and optional error, message, and data properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds ConnectorError with checking for non-null required values + * @return ConnectorError + */ + public ConnectorError build() { + Objects.requireNonNull(severity, ConnectorError.class + ": severity is missing"); + Objects.requireNonNull(message, ConnectorError.class + ": message is missing"); + Objects.requireNonNull(correlationId, ConnectorError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, ConnectorError.class + ": payload is missing"); + return new ConnectorErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds ConnectorError without checking for non-null required values + * @return ConnectorError + */ + public ConnectorError buildUnchecked() { + return new ConnectorErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of ConnectorErrorBuilder + * @return builder + */ + public static ConnectorErrorBuilder of() { + return new ConnectorErrorBuilder(); + } + + /** + * create builder for ConnectorError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConnectorErrorBuilder of(final ConnectorError template) { + ConnectorErrorBuilder builder = new ConnectorErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorImpl.java new file mode 100644 index 00000000000..4d656e47fe4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Connector triggers an error.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConnectorErrorImpl implements ConnectorError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + ConnectorErrorImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = CONNECTOR_ERROR; + } + + /** + * create empty instance + */ + public ConnectorErrorImpl() { + this.code = CONNECTOR_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Connector error.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the connector object with the id property and optional error, message, and data properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ConnectorErrorImpl that = (ConnectorErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public ConnectorError copyDeep() { + return ConnectorError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFields.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFields.java new file mode 100644 index 00000000000..b24da767374 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFields.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Checkout properties contains one or more deprecated fields.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DeprecatedFields deprecatedFields = DeprecatedFields.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("deprecated_fields") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DeprecatedFieldsImpl.class) +public interface DeprecatedFields extends ResponseMessage { + + /** + * discriminator value for DeprecatedFields + */ + String DEPRECATED_FIELDS = "deprecated_fields"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`warn`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Some fields are deprecated.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the deprecatedFields array.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`warn`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Some fields are deprecated.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the deprecatedFields array.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of DeprecatedFields + */ + public static DeprecatedFields of() { + return new DeprecatedFieldsImpl(); + } + + /** + * factory method to create a shallow copy DeprecatedFields + * @param template instance to be copied + * @return copy instance + */ + public static DeprecatedFields of(final DeprecatedFields template) { + DeprecatedFieldsImpl instance = new DeprecatedFieldsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public DeprecatedFields copyDeep(); + + /** + * factory method to create a deep copy of DeprecatedFields + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DeprecatedFields deepCopy(@Nullable final DeprecatedFields template) { + if (template == null) { + return null; + } + DeprecatedFieldsImpl instance = new DeprecatedFieldsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for DeprecatedFields + * @return builder + */ + public static DeprecatedFieldsBuilder builder() { + return DeprecatedFieldsBuilder.of(); + } + + /** + * create builder for DeprecatedFields instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DeprecatedFieldsBuilder builder(final DeprecatedFields template) { + return DeprecatedFieldsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDeprecatedFields(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsBuilder.java new file mode 100644 index 00000000000..0fdc4fc3930 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DeprecatedFieldsBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DeprecatedFields deprecatedFields = DeprecatedFields.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DeprecatedFieldsBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`warn`

+ * @param severity value to be set + * @return Builder + */ + + public DeprecatedFieldsBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Some fields are deprecated.

+ * @param message value to be set + * @return Builder + */ + + public DeprecatedFieldsBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public DeprecatedFieldsBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the deprecatedFields array.

+ * @param payload value to be set + * @return Builder + */ + + public DeprecatedFieldsBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`warn`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Some fields are deprecated.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the deprecatedFields array.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds DeprecatedFields with checking for non-null required values + * @return DeprecatedFields + */ + public DeprecatedFields build() { + Objects.requireNonNull(severity, DeprecatedFields.class + ": severity is missing"); + Objects.requireNonNull(message, DeprecatedFields.class + ": message is missing"); + Objects.requireNonNull(correlationId, DeprecatedFields.class + ": correlationId is missing"); + Objects.requireNonNull(payload, DeprecatedFields.class + ": payload is missing"); + return new DeprecatedFieldsImpl(severity, message, correlationId, payload); + } + + /** + * builds DeprecatedFields without checking for non-null required values + * @return DeprecatedFields + */ + public DeprecatedFields buildUnchecked() { + return new DeprecatedFieldsImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of DeprecatedFieldsBuilder + * @return builder + */ + public static DeprecatedFieldsBuilder of() { + return new DeprecatedFieldsBuilder(); + } + + /** + * create builder for DeprecatedFields instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DeprecatedFieldsBuilder of(final DeprecatedFields template) { + DeprecatedFieldsBuilder builder = new DeprecatedFieldsBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsImpl.java new file mode 100644 index 00000000000..041d999a438 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Checkout properties contains one or more deprecated fields.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DeprecatedFieldsImpl implements DeprecatedFields, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + DeprecatedFieldsImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = DEPRECATED_FIELDS; + } + + /** + * create empty instance + */ + public DeprecatedFieldsImpl() { + this.code = DEPRECATED_FIELDS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`warn`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Some fields are deprecated.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the deprecatedFields array.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DeprecatedFieldsImpl that = (DeprecatedFieldsImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public DeprecatedFields copyDeep() { + return DeprecatedFields.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicable.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicable.java new file mode 100644 index 00000000000..8a0e8197db0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicable.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Discount Code is not applicable for the current Cart.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DiscountCodeNotApplicable discountCodeNotApplicable = DiscountCodeNotApplicable.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("discount_code_not_applicable") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountCodeNotApplicableImpl.class) +public interface DiscountCodeNotApplicable extends ResponseMessage { + + /** + * discriminator value for DiscountCodeNotApplicable + */ + String DISCOUNT_CODE_NOT_APPLICABLE = "discount_code_not_applicable"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Discount code not applicable.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cartId and discountCode properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Discount code not applicable.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cartId and discountCode properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of DiscountCodeNotApplicable + */ + public static DiscountCodeNotApplicable of() { + return new DiscountCodeNotApplicableImpl(); + } + + /** + * factory method to create a shallow copy DiscountCodeNotApplicable + * @param template instance to be copied + * @return copy instance + */ + public static DiscountCodeNotApplicable of(final DiscountCodeNotApplicable template) { + DiscountCodeNotApplicableImpl instance = new DiscountCodeNotApplicableImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public DiscountCodeNotApplicable copyDeep(); + + /** + * factory method to create a deep copy of DiscountCodeNotApplicable + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountCodeNotApplicable deepCopy(@Nullable final DiscountCodeNotApplicable template) { + if (template == null) { + return null; + } + DiscountCodeNotApplicableImpl instance = new DiscountCodeNotApplicableImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for DiscountCodeNotApplicable + * @return builder + */ + public static DiscountCodeNotApplicableBuilder builder() { + return DiscountCodeNotApplicableBuilder.of(); + } + + /** + * create builder for DiscountCodeNotApplicable instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeNotApplicableBuilder builder(final DiscountCodeNotApplicable template) { + return DiscountCodeNotApplicableBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountCodeNotApplicable(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableBuilder.java new file mode 100644 index 00000000000..3f9ba733bbf --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DiscountCodeNotApplicableBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DiscountCodeNotApplicable discountCodeNotApplicable = DiscountCodeNotApplicable.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeNotApplicableBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public DiscountCodeNotApplicableBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Discount code not applicable.

+ * @param message value to be set + * @return Builder + */ + + public DiscountCodeNotApplicableBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public DiscountCodeNotApplicableBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cartId and discountCode properties.

+ * @param payload value to be set + * @return Builder + */ + + public DiscountCodeNotApplicableBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Discount code not applicable.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cartId and discountCode properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds DiscountCodeNotApplicable with checking for non-null required values + * @return DiscountCodeNotApplicable + */ + public DiscountCodeNotApplicable build() { + Objects.requireNonNull(severity, DiscountCodeNotApplicable.class + ": severity is missing"); + Objects.requireNonNull(message, DiscountCodeNotApplicable.class + ": message is missing"); + Objects.requireNonNull(correlationId, DiscountCodeNotApplicable.class + ": correlationId is missing"); + Objects.requireNonNull(payload, DiscountCodeNotApplicable.class + ": payload is missing"); + return new DiscountCodeNotApplicableImpl(severity, message, correlationId, payload); + } + + /** + * builds DiscountCodeNotApplicable without checking for non-null required values + * @return DiscountCodeNotApplicable + */ + public DiscountCodeNotApplicable buildUnchecked() { + return new DiscountCodeNotApplicableImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of DiscountCodeNotApplicableBuilder + * @return builder + */ + public static DiscountCodeNotApplicableBuilder of() { + return new DiscountCodeNotApplicableBuilder(); + } + + /** + * create builder for DiscountCodeNotApplicable instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeNotApplicableBuilder of(final DiscountCodeNotApplicable template) { + DiscountCodeNotApplicableBuilder builder = new DiscountCodeNotApplicableBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableImpl.java new file mode 100644 index 00000000000..e12f2877014 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Discount Code is not applicable for the current Cart.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeNotApplicableImpl implements DiscountCodeNotApplicable, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeNotApplicableImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = DISCOUNT_CODE_NOT_APPLICABLE; + } + + /** + * create empty instance + */ + public DiscountCodeNotApplicableImpl() { + this.code = DISCOUNT_CODE_NOT_APPLICABLE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Discount code not applicable.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cartId and discountCode properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeNotApplicableImpl that = (DiscountCodeNotApplicableImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public DiscountCodeNotApplicable copyDeep() { + return DiscountCodeNotApplicable.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrations.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrations.java new file mode 100644 index 00000000000..3f2849533d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrations.java @@ -0,0 +1,175 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the loading of all the payment integrations have failed.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ErrorLoadingAllPaymentIntegrations errorLoadingAllPaymentIntegrations = ErrorLoadingAllPaymentIntegrations.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("error_loading_all_payment_integrations") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ErrorLoadingAllPaymentIntegrationsImpl.class) +public interface ErrorLoadingAllPaymentIntegrations extends Message { + + /** + * discriminator value for ErrorLoadingAllPaymentIntegrations + */ + String ERROR_LOADING_ALL_PAYMENT_INTEGRATIONS = "error_loading_all_payment_integrations"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Error loading all payment integrations.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Error loading all payment integrations.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of ErrorLoadingAllPaymentIntegrations + */ + public static ErrorLoadingAllPaymentIntegrations of() { + return new ErrorLoadingAllPaymentIntegrationsImpl(); + } + + /** + * factory method to create a shallow copy ErrorLoadingAllPaymentIntegrations + * @param template instance to be copied + * @return copy instance + */ + public static ErrorLoadingAllPaymentIntegrations of(final ErrorLoadingAllPaymentIntegrations template) { + ErrorLoadingAllPaymentIntegrationsImpl instance = new ErrorLoadingAllPaymentIntegrationsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public ErrorLoadingAllPaymentIntegrations copyDeep(); + + /** + * factory method to create a deep copy of ErrorLoadingAllPaymentIntegrations + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ErrorLoadingAllPaymentIntegrations deepCopy( + @Nullable final ErrorLoadingAllPaymentIntegrations template) { + if (template == null) { + return null; + } + ErrorLoadingAllPaymentIntegrationsImpl instance = new ErrorLoadingAllPaymentIntegrationsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for ErrorLoadingAllPaymentIntegrations + * @return builder + */ + public static ErrorLoadingAllPaymentIntegrationsBuilder builder() { + return ErrorLoadingAllPaymentIntegrationsBuilder.of(); + } + + /** + * create builder for ErrorLoadingAllPaymentIntegrations instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ErrorLoadingAllPaymentIntegrationsBuilder builder(final ErrorLoadingAllPaymentIntegrations template) { + return ErrorLoadingAllPaymentIntegrationsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withErrorLoadingAllPaymentIntegrations(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsBuilder.java new file mode 100644 index 00000000000..febc8bd299e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ErrorLoadingAllPaymentIntegrationsBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ErrorLoadingAllPaymentIntegrations errorLoadingAllPaymentIntegrations = ErrorLoadingAllPaymentIntegrations.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ErrorLoadingAllPaymentIntegrationsBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public ErrorLoadingAllPaymentIntegrationsBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Error loading all payment integrations.

+ * @param message value to be set + * @return Builder + */ + + public ErrorLoadingAllPaymentIntegrationsBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ErrorLoadingAllPaymentIntegrationsBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error loading all payment integrations.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds ErrorLoadingAllPaymentIntegrations with checking for non-null required values + * @return ErrorLoadingAllPaymentIntegrations + */ + public ErrorLoadingAllPaymentIntegrations build() { + Objects.requireNonNull(severity, ErrorLoadingAllPaymentIntegrations.class + ": severity is missing"); + Objects.requireNonNull(message, ErrorLoadingAllPaymentIntegrations.class + ": message is missing"); + Objects.requireNonNull(correlationId, ErrorLoadingAllPaymentIntegrations.class + ": correlationId is missing"); + return new ErrorLoadingAllPaymentIntegrationsImpl(severity, message, correlationId); + } + + /** + * builds ErrorLoadingAllPaymentIntegrations without checking for non-null required values + * @return ErrorLoadingAllPaymentIntegrations + */ + public ErrorLoadingAllPaymentIntegrations buildUnchecked() { + return new ErrorLoadingAllPaymentIntegrationsImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of ErrorLoadingAllPaymentIntegrationsBuilder + * @return builder + */ + public static ErrorLoadingAllPaymentIntegrationsBuilder of() { + return new ErrorLoadingAllPaymentIntegrationsBuilder(); + } + + /** + * create builder for ErrorLoadingAllPaymentIntegrations instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ErrorLoadingAllPaymentIntegrationsBuilder of(final ErrorLoadingAllPaymentIntegrations template) { + ErrorLoadingAllPaymentIntegrationsBuilder builder = new ErrorLoadingAllPaymentIntegrationsBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsImpl.java new file mode 100644 index 00000000000..41d02553df4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the loading of all the payment integrations have failed.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ErrorLoadingAllPaymentIntegrationsImpl implements ErrorLoadingAllPaymentIntegrations, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + ErrorLoadingAllPaymentIntegrationsImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = ERROR_LOADING_ALL_PAYMENT_INTEGRATIONS; + } + + /** + * create empty instance + */ + public ErrorLoadingAllPaymentIntegrationsImpl() { + this.code = ERROR_LOADING_ALL_PAYMENT_INTEGRATIONS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error loading all payment integrations.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ErrorLoadingAllPaymentIntegrationsImpl that = (ErrorLoadingAllPaymentIntegrationsImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public ErrorLoadingAllPaymentIntegrations copyDeep() { + return ErrorLoadingAllPaymentIntegrations.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSession.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSession.java new file mode 100644 index 00000000000..da5742cef4b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSession.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Checkout Session is expired.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ExpiredSession expiredSession = ExpiredSession.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("expired_session") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ExpiredSessionImpl.class) +public interface ExpiredSession extends Message { + + /** + * discriminator value for ExpiredSession + */ + String EXPIRED_SESSION = "expired_session"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Session is expired.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Session is expired.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of ExpiredSession + */ + public static ExpiredSession of() { + return new ExpiredSessionImpl(); + } + + /** + * factory method to create a shallow copy ExpiredSession + * @param template instance to be copied + * @return copy instance + */ + public static ExpiredSession of(final ExpiredSession template) { + ExpiredSessionImpl instance = new ExpiredSessionImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public ExpiredSession copyDeep(); + + /** + * factory method to create a deep copy of ExpiredSession + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ExpiredSession deepCopy(@Nullable final ExpiredSession template) { + if (template == null) { + return null; + } + ExpiredSessionImpl instance = new ExpiredSessionImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for ExpiredSession + * @return builder + */ + public static ExpiredSessionBuilder builder() { + return ExpiredSessionBuilder.of(); + } + + /** + * create builder for ExpiredSession instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExpiredSessionBuilder builder(final ExpiredSession template) { + return ExpiredSessionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withExpiredSession(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionBuilder.java new file mode 100644 index 00000000000..65b72860d4b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ExpiredSessionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ExpiredSession expiredSession = ExpiredSession.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ExpiredSessionBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public ExpiredSessionBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Session is expired.

+ * @param message value to be set + * @return Builder + */ + + public ExpiredSessionBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ExpiredSessionBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Session is expired.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds ExpiredSession with checking for non-null required values + * @return ExpiredSession + */ + public ExpiredSession build() { + Objects.requireNonNull(severity, ExpiredSession.class + ": severity is missing"); + Objects.requireNonNull(message, ExpiredSession.class + ": message is missing"); + Objects.requireNonNull(correlationId, ExpiredSession.class + ": correlationId is missing"); + return new ExpiredSessionImpl(severity, message, correlationId); + } + + /** + * builds ExpiredSession without checking for non-null required values + * @return ExpiredSession + */ + public ExpiredSession buildUnchecked() { + return new ExpiredSessionImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of ExpiredSessionBuilder + * @return builder + */ + public static ExpiredSessionBuilder of() { + return new ExpiredSessionBuilder(); + } + + /** + * create builder for ExpiredSession instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExpiredSessionBuilder of(final ExpiredSession template) { + ExpiredSessionBuilder builder = new ExpiredSessionBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionImpl.java new file mode 100644 index 00000000000..8c85b58aecd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Checkout Session is expired.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ExpiredSessionImpl implements ExpiredSession, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + ExpiredSessionImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = EXPIRED_SESSION; + } + + /** + * create empty instance + */ + public ExpiredSessionImpl() { + this.code = EXPIRED_SESSION; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Session is expired.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ExpiredSessionImpl that = (ExpiredSessionImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public ExpiredSession copyDeep() { + return ExpiredSession.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPending.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPending.java new file mode 100644 index 00000000000..96f90ab7bab --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPending.java @@ -0,0 +1,175 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated in Payment Only mode when the customer hasn't accepted the terms and conditions yet.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ExternalTermsAndConditionsPending externalTermsAndConditionsPending = ExternalTermsAndConditionsPending.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("external_terms_and_conditions_pending") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ExternalTermsAndConditionsPendingImpl.class) +public interface ExternalTermsAndConditionsPending extends Message { + + /** + * discriminator value for ExternalTermsAndConditionsPending + */ + String EXTERNAL_TERMS_AND_CONDITIONS_PENDING = "external_terms_and_conditions_pending"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

External terms and conditions pending.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

External terms and conditions pending.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of ExternalTermsAndConditionsPending + */ + public static ExternalTermsAndConditionsPending of() { + return new ExternalTermsAndConditionsPendingImpl(); + } + + /** + * factory method to create a shallow copy ExternalTermsAndConditionsPending + * @param template instance to be copied + * @return copy instance + */ + public static ExternalTermsAndConditionsPending of(final ExternalTermsAndConditionsPending template) { + ExternalTermsAndConditionsPendingImpl instance = new ExternalTermsAndConditionsPendingImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public ExternalTermsAndConditionsPending copyDeep(); + + /** + * factory method to create a deep copy of ExternalTermsAndConditionsPending + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ExternalTermsAndConditionsPending deepCopy( + @Nullable final ExternalTermsAndConditionsPending template) { + if (template == null) { + return null; + } + ExternalTermsAndConditionsPendingImpl instance = new ExternalTermsAndConditionsPendingImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for ExternalTermsAndConditionsPending + * @return builder + */ + public static ExternalTermsAndConditionsPendingBuilder builder() { + return ExternalTermsAndConditionsPendingBuilder.of(); + } + + /** + * create builder for ExternalTermsAndConditionsPending instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExternalTermsAndConditionsPendingBuilder builder(final ExternalTermsAndConditionsPending template) { + return ExternalTermsAndConditionsPendingBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withExternalTermsAndConditionsPending(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingBuilder.java new file mode 100644 index 00000000000..1d4428dd88d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ExternalTermsAndConditionsPendingBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ExternalTermsAndConditionsPending externalTermsAndConditionsPending = ExternalTermsAndConditionsPending.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ExternalTermsAndConditionsPendingBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public ExternalTermsAndConditionsPendingBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

External terms and conditions pending.

+ * @param message value to be set + * @return Builder + */ + + public ExternalTermsAndConditionsPendingBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ExternalTermsAndConditionsPendingBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

External terms and conditions pending.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds ExternalTermsAndConditionsPending with checking for non-null required values + * @return ExternalTermsAndConditionsPending + */ + public ExternalTermsAndConditionsPending build() { + Objects.requireNonNull(severity, ExternalTermsAndConditionsPending.class + ": severity is missing"); + Objects.requireNonNull(message, ExternalTermsAndConditionsPending.class + ": message is missing"); + Objects.requireNonNull(correlationId, ExternalTermsAndConditionsPending.class + ": correlationId is missing"); + return new ExternalTermsAndConditionsPendingImpl(severity, message, correlationId); + } + + /** + * builds ExternalTermsAndConditionsPending without checking for non-null required values + * @return ExternalTermsAndConditionsPending + */ + public ExternalTermsAndConditionsPending buildUnchecked() { + return new ExternalTermsAndConditionsPendingImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of ExternalTermsAndConditionsPendingBuilder + * @return builder + */ + public static ExternalTermsAndConditionsPendingBuilder of() { + return new ExternalTermsAndConditionsPendingBuilder(); + } + + /** + * create builder for ExternalTermsAndConditionsPending instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExternalTermsAndConditionsPendingBuilder of(final ExternalTermsAndConditionsPending template) { + ExternalTermsAndConditionsPendingBuilder builder = new ExternalTermsAndConditionsPendingBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingImpl.java new file mode 100644 index 00000000000..dd384fb6e34 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated in Payment Only mode when the customer hasn't accepted the terms and conditions yet.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ExternalTermsAndConditionsPendingImpl implements ExternalTermsAndConditionsPending, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + ExternalTermsAndConditionsPendingImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = EXTERNAL_TERMS_AND_CONDITIONS_PENDING; + } + + /** + * create empty instance + */ + public ExternalTermsAndConditionsPendingImpl() { + this.code = EXTERNAL_TERMS_AND_CONDITIONS_PENDING; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

External terms and conditions pending.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ExternalTermsAndConditionsPendingImpl that = (ExternalTermsAndConditionsPendingImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public ExternalTermsAndConditionsPending copyDeep() { + return ExternalTermsAndConditionsPending.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSession.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSession.java new file mode 100644 index 00000000000..b1df57150ad --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSession.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Checkout Session fails to refresh.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     FailedToRefreshSession failedToRefreshSession = FailedToRefreshSession.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("failed_to_refresh_session") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = FailedToRefreshSessionImpl.class) +public interface FailedToRefreshSession extends Message { + + /** + * discriminator value for FailedToRefreshSession + */ + String FAILED_TO_REFRESH_SESSION = "failed_to_refresh_session"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Failed to refresh session.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Failed to refresh session.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of FailedToRefreshSession + */ + public static FailedToRefreshSession of() { + return new FailedToRefreshSessionImpl(); + } + + /** + * factory method to create a shallow copy FailedToRefreshSession + * @param template instance to be copied + * @return copy instance + */ + public static FailedToRefreshSession of(final FailedToRefreshSession template) { + FailedToRefreshSessionImpl instance = new FailedToRefreshSessionImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public FailedToRefreshSession copyDeep(); + + /** + * factory method to create a deep copy of FailedToRefreshSession + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static FailedToRefreshSession deepCopy(@Nullable final FailedToRefreshSession template) { + if (template == null) { + return null; + } + FailedToRefreshSessionImpl instance = new FailedToRefreshSessionImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for FailedToRefreshSession + * @return builder + */ + public static FailedToRefreshSessionBuilder builder() { + return FailedToRefreshSessionBuilder.of(); + } + + /** + * create builder for FailedToRefreshSession instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static FailedToRefreshSessionBuilder builder(final FailedToRefreshSession template) { + return FailedToRefreshSessionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withFailedToRefreshSession(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionBuilder.java new file mode 100644 index 00000000000..0337fef5f87 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * FailedToRefreshSessionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     FailedToRefreshSession failedToRefreshSession = FailedToRefreshSession.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class FailedToRefreshSessionBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public FailedToRefreshSessionBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Failed to refresh session.

+ * @param message value to be set + * @return Builder + */ + + public FailedToRefreshSessionBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public FailedToRefreshSessionBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Failed to refresh session.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds FailedToRefreshSession with checking for non-null required values + * @return FailedToRefreshSession + */ + public FailedToRefreshSession build() { + Objects.requireNonNull(severity, FailedToRefreshSession.class + ": severity is missing"); + Objects.requireNonNull(message, FailedToRefreshSession.class + ": message is missing"); + Objects.requireNonNull(correlationId, FailedToRefreshSession.class + ": correlationId is missing"); + return new FailedToRefreshSessionImpl(severity, message, correlationId); + } + + /** + * builds FailedToRefreshSession without checking for non-null required values + * @return FailedToRefreshSession + */ + public FailedToRefreshSession buildUnchecked() { + return new FailedToRefreshSessionImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of FailedToRefreshSessionBuilder + * @return builder + */ + public static FailedToRefreshSessionBuilder of() { + return new FailedToRefreshSessionBuilder(); + } + + /** + * create builder for FailedToRefreshSession instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static FailedToRefreshSessionBuilder of(final FailedToRefreshSession template) { + FailedToRefreshSessionBuilder builder = new FailedToRefreshSessionBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionImpl.java new file mode 100644 index 00000000000..3a4ce23b45a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Checkout Session fails to refresh.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class FailedToRefreshSessionImpl implements FailedToRefreshSession, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + FailedToRefreshSessionImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = FAILED_TO_REFRESH_SESSION; + } + + /** + * create empty instance + */ + public FailedToRefreshSessionImpl() { + this.code = FAILED_TO_REFRESH_SESSION; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Failed to refresh session.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + FailedToRefreshSessionImpl that = (FailedToRefreshSessionImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public FailedToRefreshSession copyDeep() { + return FailedToRefreshSession.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceError.java new file mode 100644 index 00000000000..54e0cd6359e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceError.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when an error occurs while retrieving the balance of a gift card.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceError giftCardBalanceError = GiftCardBalanceError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("gift_card_balance_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GiftCardBalanceErrorImpl.class) +public interface GiftCardBalanceError extends Message { + + /** + * discriminator value for GiftCardBalanceError + */ + String GIFT_CARD_BALANCE_ERROR = "gift_card_balance_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Gift card balance failed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Gift card balance failed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of GiftCardBalanceError + */ + public static GiftCardBalanceError of() { + return new GiftCardBalanceErrorImpl(); + } + + /** + * factory method to create a shallow copy GiftCardBalanceError + * @param template instance to be copied + * @return copy instance + */ + public static GiftCardBalanceError of(final GiftCardBalanceError template) { + GiftCardBalanceErrorImpl instance = new GiftCardBalanceErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public GiftCardBalanceError copyDeep(); + + /** + * factory method to create a deep copy of GiftCardBalanceError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GiftCardBalanceError deepCopy(@Nullable final GiftCardBalanceError template) { + if (template == null) { + return null; + } + GiftCardBalanceErrorImpl instance = new GiftCardBalanceErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for GiftCardBalanceError + * @return builder + */ + public static GiftCardBalanceErrorBuilder builder() { + return GiftCardBalanceErrorBuilder.of(); + } + + /** + * create builder for GiftCardBalanceError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceErrorBuilder builder(final GiftCardBalanceError template) { + return GiftCardBalanceErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGiftCardBalanceError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorBuilder.java new file mode 100644 index 00000000000..c367eb4c58e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GiftCardBalanceErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceError giftCardBalanceError = GiftCardBalanceError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public GiftCardBalanceErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Gift card balance failed.

+ * @param message value to be set + * @return Builder + */ + + public GiftCardBalanceErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public GiftCardBalanceErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance failed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds GiftCardBalanceError with checking for non-null required values + * @return GiftCardBalanceError + */ + public GiftCardBalanceError build() { + Objects.requireNonNull(severity, GiftCardBalanceError.class + ": severity is missing"); + Objects.requireNonNull(message, GiftCardBalanceError.class + ": message is missing"); + Objects.requireNonNull(correlationId, GiftCardBalanceError.class + ": correlationId is missing"); + return new GiftCardBalanceErrorImpl(severity, message, correlationId); + } + + /** + * builds GiftCardBalanceError without checking for non-null required values + * @return GiftCardBalanceError + */ + public GiftCardBalanceError buildUnchecked() { + return new GiftCardBalanceErrorImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of GiftCardBalanceErrorBuilder + * @return builder + */ + public static GiftCardBalanceErrorBuilder of() { + return new GiftCardBalanceErrorBuilder(); + } + + /** + * create builder for GiftCardBalanceError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceErrorBuilder of(final GiftCardBalanceError template) { + GiftCardBalanceErrorBuilder builder = new GiftCardBalanceErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorImpl.java new file mode 100644 index 00000000000..0c1f1f770f0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when an error occurs while retrieving the balance of a gift card.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceErrorImpl implements GiftCardBalanceError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + GiftCardBalanceErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = GIFT_CARD_BALANCE_ERROR; + } + + /** + * create empty instance + */ + public GiftCardBalanceErrorImpl() { + this.code = GIFT_CARD_BALANCE_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance failed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GiftCardBalanceErrorImpl that = (GiftCardBalanceErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public GiftCardBalanceError copyDeep() { + return GiftCardBalanceError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemoved.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemoved.java new file mode 100644 index 00000000000..d3e2b7ecd16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemoved.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer removes a gift card's balance that was initially applied as a payment integration.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceRemoved giftCardBalanceRemoved = GiftCardBalanceRemoved.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("gift_card_balance_removed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GiftCardBalanceRemovedImpl.class) +public interface GiftCardBalanceRemoved extends Message { + + /** + * discriminator value for GiftCardBalanceRemoved + */ + String GIFT_CARD_BALANCE_REMOVED = "gift_card_balance_removed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Gift card balance removed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Gift card balance removed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of GiftCardBalanceRemoved + */ + public static GiftCardBalanceRemoved of() { + return new GiftCardBalanceRemovedImpl(); + } + + /** + * factory method to create a shallow copy GiftCardBalanceRemoved + * @param template instance to be copied + * @return copy instance + */ + public static GiftCardBalanceRemoved of(final GiftCardBalanceRemoved template) { + GiftCardBalanceRemovedImpl instance = new GiftCardBalanceRemovedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public GiftCardBalanceRemoved copyDeep(); + + /** + * factory method to create a deep copy of GiftCardBalanceRemoved + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GiftCardBalanceRemoved deepCopy(@Nullable final GiftCardBalanceRemoved template) { + if (template == null) { + return null; + } + GiftCardBalanceRemovedImpl instance = new GiftCardBalanceRemovedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for GiftCardBalanceRemoved + * @return builder + */ + public static GiftCardBalanceRemovedBuilder builder() { + return GiftCardBalanceRemovedBuilder.of(); + } + + /** + * create builder for GiftCardBalanceRemoved instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceRemovedBuilder builder(final GiftCardBalanceRemoved template) { + return GiftCardBalanceRemovedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGiftCardBalanceRemoved(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedBuilder.java new file mode 100644 index 00000000000..44f2c6aee10 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GiftCardBalanceRemovedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceRemoved giftCardBalanceRemoved = GiftCardBalanceRemoved.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceRemovedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public GiftCardBalanceRemovedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Gift card balance removed.

+ * @param message value to be set + * @return Builder + */ + + public GiftCardBalanceRemovedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public GiftCardBalanceRemovedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance removed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds GiftCardBalanceRemoved with checking for non-null required values + * @return GiftCardBalanceRemoved + */ + public GiftCardBalanceRemoved build() { + Objects.requireNonNull(severity, GiftCardBalanceRemoved.class + ": severity is missing"); + Objects.requireNonNull(message, GiftCardBalanceRemoved.class + ": message is missing"); + Objects.requireNonNull(correlationId, GiftCardBalanceRemoved.class + ": correlationId is missing"); + return new GiftCardBalanceRemovedImpl(severity, message, correlationId); + } + + /** + * builds GiftCardBalanceRemoved without checking for non-null required values + * @return GiftCardBalanceRemoved + */ + public GiftCardBalanceRemoved buildUnchecked() { + return new GiftCardBalanceRemovedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of GiftCardBalanceRemovedBuilder + * @return builder + */ + public static GiftCardBalanceRemovedBuilder of() { + return new GiftCardBalanceRemovedBuilder(); + } + + /** + * create builder for GiftCardBalanceRemoved instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceRemovedBuilder of(final GiftCardBalanceRemoved template) { + GiftCardBalanceRemovedBuilder builder = new GiftCardBalanceRemovedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedImpl.java new file mode 100644 index 00000000000..2aacd840311 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer removes a gift card's balance that was initially applied as a payment integration.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceRemovedImpl implements GiftCardBalanceRemoved, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + GiftCardBalanceRemovedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = GIFT_CARD_BALANCE_REMOVED; + } + + /** + * create empty instance + */ + public GiftCardBalanceRemovedImpl() { + this.code = GIFT_CARD_BALANCE_REMOVED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance removed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GiftCardBalanceRemovedImpl that = (GiftCardBalanceRemovedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public GiftCardBalanceRemoved copyDeep() { + return GiftCardBalanceRemoved.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStarted.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStarted.java new file mode 100644 index 00000000000..48e6d05efe5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStarted.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer enters the gift card's code for the payment, and Checkout initiates the retrieving of the gift card's balance.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceStarted giftCardBalanceStarted = GiftCardBalanceStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("gift_card_balance_started") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GiftCardBalanceStartedImpl.class) +public interface GiftCardBalanceStarted extends Message { + + /** + * discriminator value for GiftCardBalanceStarted + */ + String GIFT_CARD_BALANCE_STARTED = "gift_card_balance_started"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Gift card balance started.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Gift card balance started.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of GiftCardBalanceStarted + */ + public static GiftCardBalanceStarted of() { + return new GiftCardBalanceStartedImpl(); + } + + /** + * factory method to create a shallow copy GiftCardBalanceStarted + * @param template instance to be copied + * @return copy instance + */ + public static GiftCardBalanceStarted of(final GiftCardBalanceStarted template) { + GiftCardBalanceStartedImpl instance = new GiftCardBalanceStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public GiftCardBalanceStarted copyDeep(); + + /** + * factory method to create a deep copy of GiftCardBalanceStarted + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GiftCardBalanceStarted deepCopy(@Nullable final GiftCardBalanceStarted template) { + if (template == null) { + return null; + } + GiftCardBalanceStartedImpl instance = new GiftCardBalanceStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for GiftCardBalanceStarted + * @return builder + */ + public static GiftCardBalanceStartedBuilder builder() { + return GiftCardBalanceStartedBuilder.of(); + } + + /** + * create builder for GiftCardBalanceStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceStartedBuilder builder(final GiftCardBalanceStarted template) { + return GiftCardBalanceStartedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGiftCardBalanceStarted(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedBuilder.java new file mode 100644 index 00000000000..e7b7acfec75 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GiftCardBalanceStartedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceStarted giftCardBalanceStarted = GiftCardBalanceStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceStartedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public GiftCardBalanceStartedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Gift card balance started.

+ * @param message value to be set + * @return Builder + */ + + public GiftCardBalanceStartedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public GiftCardBalanceStartedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance started.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds GiftCardBalanceStarted with checking for non-null required values + * @return GiftCardBalanceStarted + */ + public GiftCardBalanceStarted build() { + Objects.requireNonNull(severity, GiftCardBalanceStarted.class + ": severity is missing"); + Objects.requireNonNull(message, GiftCardBalanceStarted.class + ": message is missing"); + Objects.requireNonNull(correlationId, GiftCardBalanceStarted.class + ": correlationId is missing"); + return new GiftCardBalanceStartedImpl(severity, message, correlationId); + } + + /** + * builds GiftCardBalanceStarted without checking for non-null required values + * @return GiftCardBalanceStarted + */ + public GiftCardBalanceStarted buildUnchecked() { + return new GiftCardBalanceStartedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of GiftCardBalanceStartedBuilder + * @return builder + */ + public static GiftCardBalanceStartedBuilder of() { + return new GiftCardBalanceStartedBuilder(); + } + + /** + * create builder for GiftCardBalanceStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceStartedBuilder of(final GiftCardBalanceStarted template) { + GiftCardBalanceStartedBuilder builder = new GiftCardBalanceStartedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedImpl.java new file mode 100644 index 00000000000..56ec355e75b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer enters the gift card's code for the payment, and Checkout initiates the retrieving of the gift card's balance.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceStartedImpl implements GiftCardBalanceStarted, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + GiftCardBalanceStartedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = GIFT_CARD_BALANCE_STARTED; + } + + /** + * create empty instance + */ + public GiftCardBalanceStartedImpl() { + this.code = GIFT_CARD_BALANCE_STARTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance started.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GiftCardBalanceStartedImpl that = (GiftCardBalanceStartedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public GiftCardBalanceStarted copyDeep() { + return GiftCardBalanceStarted.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccess.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccess.java new file mode 100644 index 00000000000..0b3061848fc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccess.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when Checkout successfully retrieves a gift card's balance.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceSuccess giftCardBalanceSuccess = GiftCardBalanceSuccess.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("gift_card_balance_success") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GiftCardBalanceSuccessImpl.class) +public interface GiftCardBalanceSuccess extends ResponseMessage { + + /** + * discriminator value for GiftCardBalanceSuccess + */ + String GIFT_CARD_BALANCE_SUCCESS = "gift_card_balance_success"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Gift card balance started.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the amount and isBalanceSufficient properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Gift card balance started.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the amount and isBalanceSufficient properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of GiftCardBalanceSuccess + */ + public static GiftCardBalanceSuccess of() { + return new GiftCardBalanceSuccessImpl(); + } + + /** + * factory method to create a shallow copy GiftCardBalanceSuccess + * @param template instance to be copied + * @return copy instance + */ + public static GiftCardBalanceSuccess of(final GiftCardBalanceSuccess template) { + GiftCardBalanceSuccessImpl instance = new GiftCardBalanceSuccessImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public GiftCardBalanceSuccess copyDeep(); + + /** + * factory method to create a deep copy of GiftCardBalanceSuccess + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GiftCardBalanceSuccess deepCopy(@Nullable final GiftCardBalanceSuccess template) { + if (template == null) { + return null; + } + GiftCardBalanceSuccessImpl instance = new GiftCardBalanceSuccessImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for GiftCardBalanceSuccess + * @return builder + */ + public static GiftCardBalanceSuccessBuilder builder() { + return GiftCardBalanceSuccessBuilder.of(); + } + + /** + * create builder for GiftCardBalanceSuccess instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceSuccessBuilder builder(final GiftCardBalanceSuccess template) { + return GiftCardBalanceSuccessBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGiftCardBalanceSuccess(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessBuilder.java new file mode 100644 index 00000000000..c82c58a1016 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GiftCardBalanceSuccessBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardBalanceSuccess giftCardBalanceSuccess = GiftCardBalanceSuccess.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceSuccessBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public GiftCardBalanceSuccessBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Gift card balance started.

+ * @param message value to be set + * @return Builder + */ + + public GiftCardBalanceSuccessBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public GiftCardBalanceSuccessBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the amount and isBalanceSufficient properties.

+ * @param payload value to be set + * @return Builder + */ + + public GiftCardBalanceSuccessBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance started.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the amount and isBalanceSufficient properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds GiftCardBalanceSuccess with checking for non-null required values + * @return GiftCardBalanceSuccess + */ + public GiftCardBalanceSuccess build() { + Objects.requireNonNull(severity, GiftCardBalanceSuccess.class + ": severity is missing"); + Objects.requireNonNull(message, GiftCardBalanceSuccess.class + ": message is missing"); + Objects.requireNonNull(correlationId, GiftCardBalanceSuccess.class + ": correlationId is missing"); + Objects.requireNonNull(payload, GiftCardBalanceSuccess.class + ": payload is missing"); + return new GiftCardBalanceSuccessImpl(severity, message, correlationId, payload); + } + + /** + * builds GiftCardBalanceSuccess without checking for non-null required values + * @return GiftCardBalanceSuccess + */ + public GiftCardBalanceSuccess buildUnchecked() { + return new GiftCardBalanceSuccessImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of GiftCardBalanceSuccessBuilder + * @return builder + */ + public static GiftCardBalanceSuccessBuilder of() { + return new GiftCardBalanceSuccessBuilder(); + } + + /** + * create builder for GiftCardBalanceSuccess instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardBalanceSuccessBuilder of(final GiftCardBalanceSuccess template) { + GiftCardBalanceSuccessBuilder builder = new GiftCardBalanceSuccessBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessImpl.java new file mode 100644 index 00000000000..4d265ee17a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when Checkout successfully retrieves a gift card's balance.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardBalanceSuccessImpl implements GiftCardBalanceSuccess, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + GiftCardBalanceSuccessImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = GIFT_CARD_BALANCE_SUCCESS; + } + + /** + * create empty instance + */ + public GiftCardBalanceSuccessImpl() { + this.code = GIFT_CARD_BALANCE_SUCCESS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card balance started.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the amount and isBalanceSufficient properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GiftCardBalanceSuccessImpl that = (GiftCardBalanceSuccessImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public GiftCardBalanceSuccess copyDeep() { + return GiftCardBalanceSuccess.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemError.java new file mode 100644 index 00000000000..57c60f23dc0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemError.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the redemption of a gift card's balance fails.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardRedeemError giftCardRedeemError = GiftCardRedeemError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("gift_card_redeem_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GiftCardRedeemErrorImpl.class) +public interface GiftCardRedeemError extends Message { + + /** + * discriminator value for GiftCardRedeemError + */ + String GIFT_CARD_REDEEM_ERROR = "gift_card_redeem_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Gift card redeem failed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Gift card redeem failed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of GiftCardRedeemError + */ + public static GiftCardRedeemError of() { + return new GiftCardRedeemErrorImpl(); + } + + /** + * factory method to create a shallow copy GiftCardRedeemError + * @param template instance to be copied + * @return copy instance + */ + public static GiftCardRedeemError of(final GiftCardRedeemError template) { + GiftCardRedeemErrorImpl instance = new GiftCardRedeemErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public GiftCardRedeemError copyDeep(); + + /** + * factory method to create a deep copy of GiftCardRedeemError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GiftCardRedeemError deepCopy(@Nullable final GiftCardRedeemError template) { + if (template == null) { + return null; + } + GiftCardRedeemErrorImpl instance = new GiftCardRedeemErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for GiftCardRedeemError + * @return builder + */ + public static GiftCardRedeemErrorBuilder builder() { + return GiftCardRedeemErrorBuilder.of(); + } + + /** + * create builder for GiftCardRedeemError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardRedeemErrorBuilder builder(final GiftCardRedeemError template) { + return GiftCardRedeemErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGiftCardRedeemError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorBuilder.java new file mode 100644 index 00000000000..766fbe8896b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GiftCardRedeemErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardRedeemError giftCardRedeemError = GiftCardRedeemError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardRedeemErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public GiftCardRedeemErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Gift card redeem failed.

+ * @param message value to be set + * @return Builder + */ + + public GiftCardRedeemErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public GiftCardRedeemErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card redeem failed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds GiftCardRedeemError with checking for non-null required values + * @return GiftCardRedeemError + */ + public GiftCardRedeemError build() { + Objects.requireNonNull(severity, GiftCardRedeemError.class + ": severity is missing"); + Objects.requireNonNull(message, GiftCardRedeemError.class + ": message is missing"); + Objects.requireNonNull(correlationId, GiftCardRedeemError.class + ": correlationId is missing"); + return new GiftCardRedeemErrorImpl(severity, message, correlationId); + } + + /** + * builds GiftCardRedeemError without checking for non-null required values + * @return GiftCardRedeemError + */ + public GiftCardRedeemError buildUnchecked() { + return new GiftCardRedeemErrorImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of GiftCardRedeemErrorBuilder + * @return builder + */ + public static GiftCardRedeemErrorBuilder of() { + return new GiftCardRedeemErrorBuilder(); + } + + /** + * create builder for GiftCardRedeemError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardRedeemErrorBuilder of(final GiftCardRedeemError template) { + GiftCardRedeemErrorBuilder builder = new GiftCardRedeemErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorImpl.java new file mode 100644 index 00000000000..dc70e24d20d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the redemption of a gift card's balance fails.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardRedeemErrorImpl implements GiftCardRedeemError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + GiftCardRedeemErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = GIFT_CARD_REDEEM_ERROR; + } + + /** + * create empty instance + */ + public GiftCardRedeemErrorImpl() { + this.code = GIFT_CARD_REDEEM_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card redeem failed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GiftCardRedeemErrorImpl that = (GiftCardRedeemErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public GiftCardRedeemError copyDeep() { + return GiftCardRedeemError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStarted.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStarted.java new file mode 100644 index 00000000000..85f1d1dbf11 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStarted.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer confirms the payment by gift card and Checkout initiates the redemption of the gift card's balance.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardRedeemStarted giftCardRedeemStarted = GiftCardRedeemStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("gift_card_redeem_started") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GiftCardRedeemStartedImpl.class) +public interface GiftCardRedeemStarted extends Message { + + /** + * discriminator value for GiftCardRedeemStarted + */ + String GIFT_CARD_REDEEM_STARTED = "gift_card_redeem_started"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Gift card redeem started.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Gift card redeem started.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of GiftCardRedeemStarted + */ + public static GiftCardRedeemStarted of() { + return new GiftCardRedeemStartedImpl(); + } + + /** + * factory method to create a shallow copy GiftCardRedeemStarted + * @param template instance to be copied + * @return copy instance + */ + public static GiftCardRedeemStarted of(final GiftCardRedeemStarted template) { + GiftCardRedeemStartedImpl instance = new GiftCardRedeemStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public GiftCardRedeemStarted copyDeep(); + + /** + * factory method to create a deep copy of GiftCardRedeemStarted + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GiftCardRedeemStarted deepCopy(@Nullable final GiftCardRedeemStarted template) { + if (template == null) { + return null; + } + GiftCardRedeemStartedImpl instance = new GiftCardRedeemStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for GiftCardRedeemStarted + * @return builder + */ + public static GiftCardRedeemStartedBuilder builder() { + return GiftCardRedeemStartedBuilder.of(); + } + + /** + * create builder for GiftCardRedeemStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardRedeemStartedBuilder builder(final GiftCardRedeemStarted template) { + return GiftCardRedeemStartedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGiftCardRedeemStarted(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedBuilder.java new file mode 100644 index 00000000000..94c4ebc145f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GiftCardRedeemStartedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardRedeemStarted giftCardRedeemStarted = GiftCardRedeemStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardRedeemStartedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public GiftCardRedeemStartedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Gift card redeem started.

+ * @param message value to be set + * @return Builder + */ + + public GiftCardRedeemStartedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public GiftCardRedeemStartedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card redeem started.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds GiftCardRedeemStarted with checking for non-null required values + * @return GiftCardRedeemStarted + */ + public GiftCardRedeemStarted build() { + Objects.requireNonNull(severity, GiftCardRedeemStarted.class + ": severity is missing"); + Objects.requireNonNull(message, GiftCardRedeemStarted.class + ": message is missing"); + Objects.requireNonNull(correlationId, GiftCardRedeemStarted.class + ": correlationId is missing"); + return new GiftCardRedeemStartedImpl(severity, message, correlationId); + } + + /** + * builds GiftCardRedeemStarted without checking for non-null required values + * @return GiftCardRedeemStarted + */ + public GiftCardRedeemStarted buildUnchecked() { + return new GiftCardRedeemStartedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of GiftCardRedeemStartedBuilder + * @return builder + */ + public static GiftCardRedeemStartedBuilder of() { + return new GiftCardRedeemStartedBuilder(); + } + + /** + * create builder for GiftCardRedeemStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardRedeemStartedBuilder of(final GiftCardRedeemStarted template) { + GiftCardRedeemStartedBuilder builder = new GiftCardRedeemStartedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedImpl.java new file mode 100644 index 00000000000..12b18da0f6d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer confirms the payment by gift card and Checkout initiates the redemption of the gift card's balance.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardRedeemStartedImpl implements GiftCardRedeemStarted, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + GiftCardRedeemStartedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = GIFT_CARD_REDEEM_STARTED; + } + + /** + * create empty instance + */ + public GiftCardRedeemStartedImpl() { + this.code = GIFT_CARD_REDEEM_STARTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card redeem started.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GiftCardRedeemStartedImpl that = (GiftCardRedeemStartedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public GiftCardRedeemStarted copyDeep() { + return GiftCardRedeemStarted.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccess.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccess.java new file mode 100644 index 00000000000..7ce282e2817 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccess.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the redemption of a gift card's balance is successful.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardRedeemSuccess giftCardRedeemSuccess = GiftCardRedeemSuccess.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("gift_card_redeem_success") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GiftCardRedeemSuccessImpl.class) +public interface GiftCardRedeemSuccess extends Message { + + /** + * discriminator value for GiftCardRedeemSuccess + */ + String GIFT_CARD_REDEEM_SUCCESS = "gift_card_redeem_success"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Gift card redeem success.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Gift card redeem success.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of GiftCardRedeemSuccess + */ + public static GiftCardRedeemSuccess of() { + return new GiftCardRedeemSuccessImpl(); + } + + /** + * factory method to create a shallow copy GiftCardRedeemSuccess + * @param template instance to be copied + * @return copy instance + */ + public static GiftCardRedeemSuccess of(final GiftCardRedeemSuccess template) { + GiftCardRedeemSuccessImpl instance = new GiftCardRedeemSuccessImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public GiftCardRedeemSuccess copyDeep(); + + /** + * factory method to create a deep copy of GiftCardRedeemSuccess + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GiftCardRedeemSuccess deepCopy(@Nullable final GiftCardRedeemSuccess template) { + if (template == null) { + return null; + } + GiftCardRedeemSuccessImpl instance = new GiftCardRedeemSuccessImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for GiftCardRedeemSuccess + * @return builder + */ + public static GiftCardRedeemSuccessBuilder builder() { + return GiftCardRedeemSuccessBuilder.of(); + } + + /** + * create builder for GiftCardRedeemSuccess instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardRedeemSuccessBuilder builder(final GiftCardRedeemSuccess template) { + return GiftCardRedeemSuccessBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGiftCardRedeemSuccess(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessBuilder.java new file mode 100644 index 00000000000..59dc936af7a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GiftCardRedeemSuccessBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GiftCardRedeemSuccess giftCardRedeemSuccess = GiftCardRedeemSuccess.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardRedeemSuccessBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public GiftCardRedeemSuccessBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Gift card redeem success.

+ * @param message value to be set + * @return Builder + */ + + public GiftCardRedeemSuccessBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public GiftCardRedeemSuccessBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card redeem success.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds GiftCardRedeemSuccess with checking for non-null required values + * @return GiftCardRedeemSuccess + */ + public GiftCardRedeemSuccess build() { + Objects.requireNonNull(severity, GiftCardRedeemSuccess.class + ": severity is missing"); + Objects.requireNonNull(message, GiftCardRedeemSuccess.class + ": message is missing"); + Objects.requireNonNull(correlationId, GiftCardRedeemSuccess.class + ": correlationId is missing"); + return new GiftCardRedeemSuccessImpl(severity, message, correlationId); + } + + /** + * builds GiftCardRedeemSuccess without checking for non-null required values + * @return GiftCardRedeemSuccess + */ + public GiftCardRedeemSuccess buildUnchecked() { + return new GiftCardRedeemSuccessImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of GiftCardRedeemSuccessBuilder + * @return builder + */ + public static GiftCardRedeemSuccessBuilder of() { + return new GiftCardRedeemSuccessBuilder(); + } + + /** + * create builder for GiftCardRedeemSuccess instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GiftCardRedeemSuccessBuilder of(final GiftCardRedeemSuccess template) { + GiftCardRedeemSuccessBuilder builder = new GiftCardRedeemSuccessBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessImpl.java new file mode 100644 index 00000000000..a3a58b74098 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the redemption of a gift card's balance is successful.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GiftCardRedeemSuccessImpl implements GiftCardRedeemSuccess, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + GiftCardRedeemSuccessImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = GIFT_CARD_REDEEM_SUCCESS; + } + + /** + * create empty instance + */ + public GiftCardRedeemSuccessImpl() { + this.code = GIFT_CARD_REDEEM_SUCCESS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Gift card redeem success.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GiftCardRedeemSuccessImpl that = (GiftCardRedeemSuccessImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public GiftCardRedeemSuccess copyDeep() { + return GiftCardRedeemSuccess.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitError.java new file mode 100644 index 00000000000..fea3943861d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitError.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when an error occurs during Checkout's initialization.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InitError initError = InitError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("init_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InitErrorImpl.class) +public interface InitError extends Message { + + /** + * discriminator value for InitError + */ + String INIT_ERROR = "init_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Error during initialization.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Error during initialization.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of InitError + */ + public static InitError of() { + return new InitErrorImpl(); + } + + /** + * factory method to create a shallow copy InitError + * @param template instance to be copied + * @return copy instance + */ + public static InitError of(final InitError template) { + InitErrorImpl instance = new InitErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public InitError copyDeep(); + + /** + * factory method to create a deep copy of InitError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InitError deepCopy(@Nullable final InitError template) { + if (template == null) { + return null; + } + InitErrorImpl instance = new InitErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for InitError + * @return builder + */ + public static InitErrorBuilder builder() { + return InitErrorBuilder.of(); + } + + /** + * create builder for InitError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InitErrorBuilder builder(final InitError template) { + return InitErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInitError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitErrorBuilder.java new file mode 100644 index 00000000000..b1d793bf738 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitErrorBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InitErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InitError initError = InitError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InitErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public InitErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Error during initialization.

+ * @param message value to be set + * @return Builder + */ + + public InitErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public InitErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error during initialization.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds InitError with checking for non-null required values + * @return InitError + */ + public InitError build() { + Objects.requireNonNull(severity, InitError.class + ": severity is missing"); + Objects.requireNonNull(message, InitError.class + ": message is missing"); + Objects.requireNonNull(correlationId, InitError.class + ": correlationId is missing"); + return new InitErrorImpl(severity, message, correlationId); + } + + /** + * builds InitError without checking for non-null required values + * @return InitError + */ + public InitError buildUnchecked() { + return new InitErrorImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of InitErrorBuilder + * @return builder + */ + public static InitErrorBuilder of() { + return new InitErrorBuilder(); + } + + /** + * create builder for InitError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InitErrorBuilder of(final InitError template) { + InitErrorBuilder builder = new InitErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitErrorImpl.java new file mode 100644 index 00000000000..61b1c85b74b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitErrorImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when an error occurs during Checkout's initialization.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InitErrorImpl implements InitError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + InitErrorImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = INIT_ERROR; + } + + /** + * create empty instance + */ + public InitErrorImpl() { + this.code = INIT_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error during initialization.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InitErrorImpl that = (InitErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public InitError copyDeep() { + return InitError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeout.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeout.java new file mode 100644 index 00000000000..859d9030b24 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeout.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when Checkout does not receive the configuration properties with the checkoutFlow or paymentFlow method on time.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InitTimeout initTimeout = InitTimeout.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("init_timeout") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InitTimeoutImpl.class) +public interface InitTimeout extends Message { + + /** + * discriminator value for InitTimeout + */ + String INIT_TIMEOUT = "init_timeout"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Timeout error, no init message received.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Timeout error, no init message received.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of InitTimeout + */ + public static InitTimeout of() { + return new InitTimeoutImpl(); + } + + /** + * factory method to create a shallow copy InitTimeout + * @param template instance to be copied + * @return copy instance + */ + public static InitTimeout of(final InitTimeout template) { + InitTimeoutImpl instance = new InitTimeoutImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public InitTimeout copyDeep(); + + /** + * factory method to create a deep copy of InitTimeout + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InitTimeout deepCopy(@Nullable final InitTimeout template) { + if (template == null) { + return null; + } + InitTimeoutImpl instance = new InitTimeoutImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for InitTimeout + * @return builder + */ + public static InitTimeoutBuilder builder() { + return InitTimeoutBuilder.of(); + } + + /** + * create builder for InitTimeout instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InitTimeoutBuilder builder(final InitTimeout template) { + return InitTimeoutBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInitTimeout(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeoutBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeoutBuilder.java new file mode 100644 index 00000000000..df9536e4bb0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeoutBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InitTimeoutBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InitTimeout initTimeout = InitTimeout.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InitTimeoutBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public InitTimeoutBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Timeout error, no init message received.

+ * @param message value to be set + * @return Builder + */ + + public InitTimeoutBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public InitTimeoutBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Timeout error, no init message received.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds InitTimeout with checking for non-null required values + * @return InitTimeout + */ + public InitTimeout build() { + Objects.requireNonNull(severity, InitTimeout.class + ": severity is missing"); + Objects.requireNonNull(message, InitTimeout.class + ": message is missing"); + Objects.requireNonNull(correlationId, InitTimeout.class + ": correlationId is missing"); + return new InitTimeoutImpl(severity, message, correlationId); + } + + /** + * builds InitTimeout without checking for non-null required values + * @return InitTimeout + */ + public InitTimeout buildUnchecked() { + return new InitTimeoutImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of InitTimeoutBuilder + * @return builder + */ + public static InitTimeoutBuilder of() { + return new InitTimeoutBuilder(); + } + + /** + * create builder for InitTimeout instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InitTimeoutBuilder of(final InitTimeout template) { + InitTimeoutBuilder builder = new InitTimeoutBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeoutImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeoutImpl.java new file mode 100644 index 00000000000..d64db80a758 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InitTimeoutImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when Checkout does not receive the configuration properties with the checkoutFlow or paymentFlow method on time.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InitTimeoutImpl implements InitTimeout, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + InitTimeoutImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = INIT_TIMEOUT; + } + + /** + * create empty instance + */ + public InitTimeoutImpl() { + this.code = INIT_TIMEOUT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Timeout error, no init message received.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InitTimeoutImpl that = (InitTimeoutImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public InitTimeout copyDeep() { + return InitTimeout.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocale.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocale.java new file mode 100644 index 00000000000..885f151f3bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocale.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the provided locale is invalid.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidLocale invalidLocale = InvalidLocale.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("invalid_locale") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InvalidLocaleImpl.class) +public interface InvalidLocale extends ResponseMessage { + + /** + * discriminator value for InvalidLocale + */ + String INVALID_LOCALE = "invalid_locale"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`warn`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

The provided {locale} is invalid.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the provided locale string, the related locale field (language or currency), and the used fallback one.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`warn`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

The provided {locale} is invalid.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the provided locale string, the related locale field (language or currency), and the used fallback one.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of InvalidLocale + */ + public static InvalidLocale of() { + return new InvalidLocaleImpl(); + } + + /** + * factory method to create a shallow copy InvalidLocale + * @param template instance to be copied + * @return copy instance + */ + public static InvalidLocale of(final InvalidLocale template) { + InvalidLocaleImpl instance = new InvalidLocaleImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public InvalidLocale copyDeep(); + + /** + * factory method to create a deep copy of InvalidLocale + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InvalidLocale deepCopy(@Nullable final InvalidLocale template) { + if (template == null) { + return null; + } + InvalidLocaleImpl instance = new InvalidLocaleImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for InvalidLocale + * @return builder + */ + public static InvalidLocaleBuilder builder() { + return InvalidLocaleBuilder.of(); + } + + /** + * create builder for InvalidLocale instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidLocaleBuilder builder(final InvalidLocale template) { + return InvalidLocaleBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInvalidLocale(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleBuilder.java new file mode 100644 index 00000000000..450fb3565aa --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InvalidLocaleBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidLocale invalidLocale = InvalidLocale.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidLocaleBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`warn`

+ * @param severity value to be set + * @return Builder + */ + + public InvalidLocaleBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

The provided {locale} is invalid.

+ * @param message value to be set + * @return Builder + */ + + public InvalidLocaleBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public InvalidLocaleBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the provided locale string, the related locale field (language or currency), and the used fallback one.

+ * @param payload value to be set + * @return Builder + */ + + public InvalidLocaleBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`warn`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

The provided {locale} is invalid.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the provided locale string, the related locale field (language or currency), and the used fallback one.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds InvalidLocale with checking for non-null required values + * @return InvalidLocale + */ + public InvalidLocale build() { + Objects.requireNonNull(severity, InvalidLocale.class + ": severity is missing"); + Objects.requireNonNull(message, InvalidLocale.class + ": message is missing"); + Objects.requireNonNull(correlationId, InvalidLocale.class + ": correlationId is missing"); + Objects.requireNonNull(payload, InvalidLocale.class + ": payload is missing"); + return new InvalidLocaleImpl(severity, message, correlationId, payload); + } + + /** + * builds InvalidLocale without checking for non-null required values + * @return InvalidLocale + */ + public InvalidLocale buildUnchecked() { + return new InvalidLocaleImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of InvalidLocaleBuilder + * @return builder + */ + public static InvalidLocaleBuilder of() { + return new InvalidLocaleBuilder(); + } + + /** + * create builder for InvalidLocale instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidLocaleBuilder of(final InvalidLocale template) { + InvalidLocaleBuilder builder = new InvalidLocaleBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleImpl.java new file mode 100644 index 00000000000..02c8142c8cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the provided locale is invalid.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidLocaleImpl implements InvalidLocale, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + InvalidLocaleImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = INVALID_LOCALE; + } + + /** + * create empty instance + */ + public InvalidLocaleImpl() { + this.code = INVALID_LOCALE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`warn`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

The provided {locale} is invalid.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the provided locale string, the related locale field (language or currency), and the used fallback one.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InvalidLocaleImpl that = (InvalidLocaleImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public InvalidLocale copyDeep() { + return InvalidLocale.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidMode.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidMode.java new file mode 100644 index 00000000000..e3b08ca6a9d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidMode.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Application does not support the requested Checkout mode.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidMode invalidMode = InvalidMode.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("invalid_mode") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InvalidModeImpl.class) +public interface InvalidMode extends Message { + + /** + * discriminator value for InvalidMode + */ + String INVALID_MODE = "invalid_mode"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

`{mode}mode requires an application with mode type{modeTypeRequested}. Current mode {modeTypeReceived}`.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

`{mode}mode requires an application with mode type{modeTypeRequested}. Current mode {modeTypeReceived}`.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of InvalidMode + */ + public static InvalidMode of() { + return new InvalidModeImpl(); + } + + /** + * factory method to create a shallow copy InvalidMode + * @param template instance to be copied + * @return copy instance + */ + public static InvalidMode of(final InvalidMode template) { + InvalidModeImpl instance = new InvalidModeImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public InvalidMode copyDeep(); + + /** + * factory method to create a deep copy of InvalidMode + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InvalidMode deepCopy(@Nullable final InvalidMode template) { + if (template == null) { + return null; + } + InvalidModeImpl instance = new InvalidModeImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for InvalidMode + * @return builder + */ + public static InvalidModeBuilder builder() { + return InvalidModeBuilder.of(); + } + + /** + * create builder for InvalidMode instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidModeBuilder builder(final InvalidMode template) { + return InvalidModeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInvalidMode(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidModeBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidModeBuilder.java new file mode 100644 index 00000000000..b4330a31277 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidModeBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InvalidModeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidMode invalidMode = InvalidMode.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidModeBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public InvalidModeBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

`{mode}mode requires an application with mode type{modeTypeRequested}. Current mode {modeTypeReceived}`.

+ * @param message value to be set + * @return Builder + */ + + public InvalidModeBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public InvalidModeBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

`{mode}mode requires an application with mode type{modeTypeRequested}. Current mode {modeTypeReceived}`.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds InvalidMode with checking for non-null required values + * @return InvalidMode + */ + public InvalidMode build() { + Objects.requireNonNull(severity, InvalidMode.class + ": severity is missing"); + Objects.requireNonNull(message, InvalidMode.class + ": message is missing"); + Objects.requireNonNull(correlationId, InvalidMode.class + ": correlationId is missing"); + return new InvalidModeImpl(severity, message, correlationId); + } + + /** + * builds InvalidMode without checking for non-null required values + * @return InvalidMode + */ + public InvalidMode buildUnchecked() { + return new InvalidModeImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of InvalidModeBuilder + * @return builder + */ + public static InvalidModeBuilder of() { + return new InvalidModeBuilder(); + } + + /** + * create builder for InvalidMode instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidModeBuilder of(final InvalidMode template) { + InvalidModeBuilder builder = new InvalidModeBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidModeImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidModeImpl.java new file mode 100644 index 00000000000..f48f6a2e8bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/InvalidModeImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Application does not support the requested Checkout mode.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidModeImpl implements InvalidMode, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + InvalidModeImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = INVALID_MODE; + } + + /** + * create empty instance + */ + public InvalidModeImpl() { + this.code = INVALID_MODE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

`{mode}mode requires an application with mode type{modeTypeRequested}. Current mode {modeTypeReceived}`.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InvalidModeImpl that = (InvalidModeImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public InvalidMode copyDeep() { + return InvalidMode.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/Message.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/Message.java new file mode 100644 index 00000000000..a4a015713a5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/Message.java @@ -0,0 +1,640 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * Message + * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     Message message = Message.addDiscountCodeErrorBuilder()
+ *             severity("{severity}")
+ *             message("{message}")
+ *             correlationId("{correlationId}")
+ *             payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "code", defaultImpl = MessageImpl.class, visible = true) +@JsonDeserialize(as = MessageImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Message { + + /** + *

Message code for the event.

+ * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Severity level of the event. Can be info, warn, or error.

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Human-readable description of the event.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Severity level of the event. Can be info, warn, or error.

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Human-readable description of the event.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + public Message copyDeep(); + + /** + * factory method to create a deep copy of Message + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Message deepCopy(@Nullable final Message template) { + if (template == null) { + return null; + } + + if (!(template instanceof MessageImpl)) { + return template.copyDeep(); + } + MessageImpl instance = new MessageImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder for addDiscountCodeError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.AddDiscountCodeErrorBuilder addDiscountCodeErrorBuilder() { + return com.commercetools.checkout.models.responses.AddDiscountCodeErrorBuilder.of(); + } + + /** + * builder for applicationDisabled subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ApplicationDeactivatedBuilder applicationDisabledBuilder() { + return com.commercetools.checkout.models.responses.ApplicationDeactivatedBuilder.of(); + } + + /** + * builder for invalidFields subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.BadInputDataBuilder invalidFieldsBuilder() { + return com.commercetools.checkout.models.responses.BadInputDataBuilder.of(); + } + + /** + * builder for cartEmptiedDuringCheckout subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CartEmptiedDuringCheckoutBuilder cartEmptiedDuringCheckoutBuilder() { + return com.commercetools.checkout.models.responses.CartEmptiedDuringCheckoutBuilder.of(); + } + + /** + * builder for cartEmpty subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CartEmptyBuilder cartEmptyBuilder() { + return com.commercetools.checkout.models.responses.CartEmptyBuilder.of(); + } + + /** + * builder for cartNotFound subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CartNotFoundBuilder cartNotFoundBuilder() { + return com.commercetools.checkout.models.responses.CartNotFoundBuilder.of(); + } + + /** + * builder for cartWithExisitingPayment subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder cartWithExisitingPaymentBuilder() { + return com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder.of(); + } + + /** + * builder for checkoutCancelled subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CheckoutCancelledBuilder checkoutCancelledBuilder() { + return com.commercetools.checkout.models.responses.CheckoutCancelledBuilder.of(); + } + + /** + * builder for checkoutCompleted subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CheckoutCompletedBuilder checkoutCompletedBuilder() { + return com.commercetools.checkout.models.responses.CheckoutCompletedBuilder.of(); + } + + /** + * builder for checkoutLoaded subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CheckoutLoadedBuilder checkoutLoadedBuilder() { + return com.commercetools.checkout.models.responses.CheckoutLoadedBuilder.of(); + } + + /** + * builder for checkoutStarted subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.CheckoutStartedBuilder checkoutStartedBuilder() { + return com.commercetools.checkout.models.responses.CheckoutStartedBuilder.of(); + } + + /** + * builder for connectorError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ConnectorErrorBuilder connectorErrorBuilder() { + return com.commercetools.checkout.models.responses.ConnectorErrorBuilder.of(); + } + + /** + * builder for deprecatedFields subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.DeprecatedFieldsBuilder deprecatedFieldsBuilder() { + return com.commercetools.checkout.models.responses.DeprecatedFieldsBuilder.of(); + } + + /** + * builder for discountCodeNotApplicable subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.DiscountCodeNotApplicableBuilder discountCodeNotApplicableBuilder() { + return com.commercetools.checkout.models.responses.DiscountCodeNotApplicableBuilder.of(); + } + + /** + * builder for errorLoadingAllPaymentIntegrations subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ErrorLoadingAllPaymentIntegrationsBuilder errorLoadingAllPaymentIntegrationsBuilder() { + return com.commercetools.checkout.models.responses.ErrorLoadingAllPaymentIntegrationsBuilder.of(); + } + + /** + * builder for expiredSession subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ExpiredSessionBuilder expiredSessionBuilder() { + return com.commercetools.checkout.models.responses.ExpiredSessionBuilder.of(); + } + + /** + * builder for externalTermsAndConditionsPending subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ExternalTermsAndConditionsPendingBuilder externalTermsAndConditionsPendingBuilder() { + return com.commercetools.checkout.models.responses.ExternalTermsAndConditionsPendingBuilder.of(); + } + + /** + * builder for failedToRefreshSession subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.FailedToRefreshSessionBuilder failedToRefreshSessionBuilder() { + return com.commercetools.checkout.models.responses.FailedToRefreshSessionBuilder.of(); + } + + /** + * builder for giftCardBalanceError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.GiftCardBalanceErrorBuilder giftCardBalanceErrorBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceErrorBuilder.of(); + } + + /** + * builder for giftCardBalanceRemoved subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.GiftCardBalanceRemovedBuilder giftCardBalanceRemovedBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceRemovedBuilder.of(); + } + + /** + * builder for giftCardBalanceStarted subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.GiftCardBalanceStartedBuilder giftCardBalanceStartedBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceStartedBuilder.of(); + } + + /** + * builder for giftCardBalanceSuccess subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.GiftCardBalanceSuccessBuilder giftCardBalanceSuccessBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceSuccessBuilder.of(); + } + + /** + * builder for giftCardRedeemError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.GiftCardRedeemErrorBuilder giftCardRedeemErrorBuilder() { + return com.commercetools.checkout.models.responses.GiftCardRedeemErrorBuilder.of(); + } + + /** + * builder for giftCardRedeemStarted subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.GiftCardRedeemStartedBuilder giftCardRedeemStartedBuilder() { + return com.commercetools.checkout.models.responses.GiftCardRedeemStartedBuilder.of(); + } + + /** + * builder for giftCardRedeemSuccess subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.GiftCardRedeemSuccessBuilder giftCardRedeemSuccessBuilder() { + return com.commercetools.checkout.models.responses.GiftCardRedeemSuccessBuilder.of(); + } + + /** + * builder for initError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.InitErrorBuilder initErrorBuilder() { + return com.commercetools.checkout.models.responses.InitErrorBuilder.of(); + } + + /** + * builder for initTimeout subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.InitTimeoutBuilder initTimeoutBuilder() { + return com.commercetools.checkout.models.responses.InitTimeoutBuilder.of(); + } + + /** + * builder for invalidLocale subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.InvalidLocaleBuilder invalidLocaleBuilder() { + return com.commercetools.checkout.models.responses.InvalidLocaleBuilder.of(); + } + + /** + * builder for invalidMode subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.InvalidModeBuilder invalidModeBuilder() { + return com.commercetools.checkout.models.responses.InvalidModeBuilder.of(); + } + + /** + * builder for multipleVendorButtonContainers subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.MultipleVendorButtonContainersBuilder multipleVendorButtonContainersBuilder() { + return com.commercetools.checkout.models.responses.MultipleVendorButtonContainersBuilder.of(); + } + + /** + * builder for noPaymentIntegrations subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.NoPaymentIntegrationsBuilder noPaymentIntegrationsBuilder() { + return com.commercetools.checkout.models.responses.NoPaymentIntegrationsBuilder.of(); + } + + /** + * builder for noShippingMethods subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.NoShippingMethodsBuilder noShippingMethodsBuilder() { + return com.commercetools.checkout.models.responses.NoShippingMethodsBuilder.of(); + } + + /** + * builder for nonOrderableCartError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.NonOrderableCartErrorBuilder nonOrderableCartErrorBuilder() { + return com.commercetools.checkout.models.responses.NonOrderableCartErrorBuilder.of(); + } + + /** + * builder for notApplicableDiscountCodeRemoved subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.NotApplicableDiscountCodeRemovedBuilder notApplicableDiscountCodeRemovedBuilder() { + return com.commercetools.checkout.models.responses.NotApplicableDiscountCodeRemovedBuilder.of(); + } + + /** + * builder for orderCreated subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.OrderCreatedBuilder orderCreatedBuilder() { + return com.commercetools.checkout.models.responses.OrderCreatedBuilder.of(); + } + + /** + * builder for orderCreationError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.OrderCreationErrorBuilder orderCreationErrorBuilder() { + return com.commercetools.checkout.models.responses.OrderCreationErrorBuilder.of(); + } + + /** + * builder for orderVerificationRetryError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.OrderVerificationRetryErrorBuilder orderVerificationRetryErrorBuilder() { + return com.commercetools.checkout.models.responses.OrderVerificationRetryErrorBuilder.of(); + } + + /** + * builder for orderVerificationStarted subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.OrderVerificationStartedBuilder orderVerificationStartedBuilder() { + return com.commercetools.checkout.models.responses.OrderVerificationStartedBuilder.of(); + } + + /** + * builder for orderVerificationTimeout subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.OrderVerificationTimeoutBuilder orderVerificationTimeoutBuilder() { + return com.commercetools.checkout.models.responses.OrderVerificationTimeoutBuilder.of(); + } + + /** + * builder for paymentCancelled subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentCancelledBuilder paymentCancelledBuilder() { + return com.commercetools.checkout.models.responses.PaymentCancelledBuilder.of(); + } + + /** + * builder for paymentFailed subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentFailedBuilder paymentFailedBuilder() { + return com.commercetools.checkout.models.responses.PaymentFailedBuilder.of(); + } + + /** + * builder for paymentIntegrationLoaded subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationLoadedBuilder paymentIntegrationLoadedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationLoadedBuilder.of(); + } + + /** + * builder for paymentIntegrationLoading subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationLoadingBuilder paymentIntegrationLoadingBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationLoadingBuilder.of(); + } + + /** + * builder for paymentIntegrationLoadingError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationLoadingErrorBuilder paymentIntegrationLoadingErrorBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationLoadingErrorBuilder.of(); + } + + /** + * builder for paymentIntegrationNotAvailable subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationNotAvailableBuilder paymentIntegrationNotAvailableBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationNotAvailableBuilder.of(); + } + + /** + * builder for paymentIntegrationSelected subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationSelectedBuilder paymentIntegrationSelectedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationSelectedBuilder.of(); + } + + /** + * builder for paymentIntegrationSelectionConfirmation subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationBuilder paymentIntegrationSelectionConfirmationBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationBuilder.of(); + } + + /** + * builder for paymentIntegrationSelectionConfirmationFailed subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationFailedBuilder paymentIntegrationSelectionConfirmationFailedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationFailedBuilder.of(); + } + + /** + * builder for paymentIntegrationsReceived subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentIntegrationsReceivedBuilder paymentIntegrationsReceivedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationsReceivedBuilder.of(); + } + + /** + * builder for paymentStarted subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentStartedBuilder paymentStartedBuilder() { + return com.commercetools.checkout.models.responses.PaymentStartedBuilder.of(); + } + + /** + * builder for paymentValidationFailed subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentValidationFailedBuilder paymentValidationFailedBuilder() { + return com.commercetools.checkout.models.responses.PaymentValidationFailedBuilder.of(); + } + + /** + * builder for paymentValidationPassed subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentValidationPassedBuilder paymentValidationPassedBuilder() { + return com.commercetools.checkout.models.responses.PaymentValidationPassedBuilder.of(); + } + + /** + * builder for paymentValidationStarted subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.PaymentValidationStartedBuilder paymentValidationStartedBuilder() { + return com.commercetools.checkout.models.responses.PaymentValidationStartedBuilder.of(); + } + + /** + * builder for projectDeactivated subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ProjectIsDeactivatedBuilder projectDeactivatedBuilder() { + return com.commercetools.checkout.models.responses.ProjectIsDeactivatedBuilder.of(); + } + + /** + * builder for removeDiscountCodeError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.RemoveDiscountCodeErrorBuilder removeDiscountCodeErrorBuilder() { + return com.commercetools.checkout.models.responses.RemoveDiscountCodeErrorBuilder.of(); + } + + /** + * builder for setShippingAddressError subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.SetShippingAddressErrorBuilder setShippingAddressErrorBuilder() { + return com.commercetools.checkout.models.responses.SetShippingAddressErrorBuilder.of(); + } + + /** + * builder for shippingAddressMissing subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ShippingAddressMissingErrorBuilder shippingAddressMissingBuilder() { + return com.commercetools.checkout.models.responses.ShippingAddressMissingErrorBuilder.of(); + } + + /** + * builder for shippingMethodDoesNotMatchCart subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ShippingMethodDoesNotMatchCartBuilder shippingMethodDoesNotMatchCartBuilder() { + return com.commercetools.checkout.models.responses.ShippingMethodDoesNotMatchCartBuilder.of(); + } + + /** + * builder for shippingMethodSelected subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ShippingMethodSelectedBuilder shippingMethodSelectedBuilder() { + return com.commercetools.checkout.models.responses.ShippingMethodSelectedBuilder.of(); + } + + /** + * builder for shippingMethodSelectionConfirmation subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.ShippingMethodSelectionConfirmationBuilder shippingMethodSelectionConfirmationBuilder() { + return com.commercetools.checkout.models.responses.ShippingMethodSelectionConfirmationBuilder.of(); + } + + /** + * builder for unavailableLocale subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.UnavailableLocaleBuilder unavailableLocaleBuilder() { + return com.commercetools.checkout.models.responses.UnavailableLocaleBuilder.of(); + } + + /** + * builder for unsupportedCountry subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.UnsupportedCountryBuilder unsupportedCountryBuilder() { + return com.commercetools.checkout.models.responses.UnsupportedCountryBuilder.of(); + } + + /** + * builder for updatedFields subtype + * @return builder + */ + public static com.commercetools.checkout.models.responses.UpdatedFieldsBuilder updatedFieldsBuilder() { + return com.commercetools.checkout.models.responses.UpdatedFieldsBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageBuilder.java new file mode 100644 index 00000000000..039b59fb139 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageBuilder.java @@ -0,0 +1,274 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MessageBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MessageBuilder { + + public com.commercetools.checkout.models.responses.AddDiscountCodeErrorBuilder addDiscountCodeErrorBuilder() { + return com.commercetools.checkout.models.responses.AddDiscountCodeErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ApplicationDeactivatedBuilder applicationDisabledBuilder() { + return com.commercetools.checkout.models.responses.ApplicationDeactivatedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.BadInputDataBuilder invalidFieldsBuilder() { + return com.commercetools.checkout.models.responses.BadInputDataBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CartEmptiedDuringCheckoutBuilder cartEmptiedDuringCheckoutBuilder() { + return com.commercetools.checkout.models.responses.CartEmptiedDuringCheckoutBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CartEmptyBuilder cartEmptyBuilder() { + return com.commercetools.checkout.models.responses.CartEmptyBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CartNotFoundBuilder cartNotFoundBuilder() { + return com.commercetools.checkout.models.responses.CartNotFoundBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder cartWithExisitingPaymentBuilder() { + return com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CheckoutCancelledBuilder checkoutCancelledBuilder() { + return com.commercetools.checkout.models.responses.CheckoutCancelledBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CheckoutCompletedBuilder checkoutCompletedBuilder() { + return com.commercetools.checkout.models.responses.CheckoutCompletedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CheckoutLoadedBuilder checkoutLoadedBuilder() { + return com.commercetools.checkout.models.responses.CheckoutLoadedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.CheckoutStartedBuilder checkoutStartedBuilder() { + return com.commercetools.checkout.models.responses.CheckoutStartedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ConnectorErrorBuilder connectorErrorBuilder() { + return com.commercetools.checkout.models.responses.ConnectorErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.DeprecatedFieldsBuilder deprecatedFieldsBuilder() { + return com.commercetools.checkout.models.responses.DeprecatedFieldsBuilder.of(); + } + + public com.commercetools.checkout.models.responses.DiscountCodeNotApplicableBuilder discountCodeNotApplicableBuilder() { + return com.commercetools.checkout.models.responses.DiscountCodeNotApplicableBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ErrorLoadingAllPaymentIntegrationsBuilder errorLoadingAllPaymentIntegrationsBuilder() { + return com.commercetools.checkout.models.responses.ErrorLoadingAllPaymentIntegrationsBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ExpiredSessionBuilder expiredSessionBuilder() { + return com.commercetools.checkout.models.responses.ExpiredSessionBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ExternalTermsAndConditionsPendingBuilder externalTermsAndConditionsPendingBuilder() { + return com.commercetools.checkout.models.responses.ExternalTermsAndConditionsPendingBuilder.of(); + } + + public com.commercetools.checkout.models.responses.FailedToRefreshSessionBuilder failedToRefreshSessionBuilder() { + return com.commercetools.checkout.models.responses.FailedToRefreshSessionBuilder.of(); + } + + public com.commercetools.checkout.models.responses.GiftCardBalanceErrorBuilder giftCardBalanceErrorBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.GiftCardBalanceRemovedBuilder giftCardBalanceRemovedBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceRemovedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.GiftCardBalanceStartedBuilder giftCardBalanceStartedBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceStartedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.GiftCardBalanceSuccessBuilder giftCardBalanceSuccessBuilder() { + return com.commercetools.checkout.models.responses.GiftCardBalanceSuccessBuilder.of(); + } + + public com.commercetools.checkout.models.responses.GiftCardRedeemErrorBuilder giftCardRedeemErrorBuilder() { + return com.commercetools.checkout.models.responses.GiftCardRedeemErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.GiftCardRedeemStartedBuilder giftCardRedeemStartedBuilder() { + return com.commercetools.checkout.models.responses.GiftCardRedeemStartedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.GiftCardRedeemSuccessBuilder giftCardRedeemSuccessBuilder() { + return com.commercetools.checkout.models.responses.GiftCardRedeemSuccessBuilder.of(); + } + + public com.commercetools.checkout.models.responses.InitErrorBuilder initErrorBuilder() { + return com.commercetools.checkout.models.responses.InitErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.InitTimeoutBuilder initTimeoutBuilder() { + return com.commercetools.checkout.models.responses.InitTimeoutBuilder.of(); + } + + public com.commercetools.checkout.models.responses.InvalidLocaleBuilder invalidLocaleBuilder() { + return com.commercetools.checkout.models.responses.InvalidLocaleBuilder.of(); + } + + public com.commercetools.checkout.models.responses.InvalidModeBuilder invalidModeBuilder() { + return com.commercetools.checkout.models.responses.InvalidModeBuilder.of(); + } + + public com.commercetools.checkout.models.responses.MultipleVendorButtonContainersBuilder multipleVendorButtonContainersBuilder() { + return com.commercetools.checkout.models.responses.MultipleVendorButtonContainersBuilder.of(); + } + + public com.commercetools.checkout.models.responses.NoPaymentIntegrationsBuilder noPaymentIntegrationsBuilder() { + return com.commercetools.checkout.models.responses.NoPaymentIntegrationsBuilder.of(); + } + + public com.commercetools.checkout.models.responses.NoShippingMethodsBuilder noShippingMethodsBuilder() { + return com.commercetools.checkout.models.responses.NoShippingMethodsBuilder.of(); + } + + public com.commercetools.checkout.models.responses.NonOrderableCartErrorBuilder nonOrderableCartErrorBuilder() { + return com.commercetools.checkout.models.responses.NonOrderableCartErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.NotApplicableDiscountCodeRemovedBuilder notApplicableDiscountCodeRemovedBuilder() { + return com.commercetools.checkout.models.responses.NotApplicableDiscountCodeRemovedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.OrderCreatedBuilder orderCreatedBuilder() { + return com.commercetools.checkout.models.responses.OrderCreatedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.OrderCreationErrorBuilder orderCreationErrorBuilder() { + return com.commercetools.checkout.models.responses.OrderCreationErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.OrderVerificationRetryErrorBuilder orderVerificationRetryErrorBuilder() { + return com.commercetools.checkout.models.responses.OrderVerificationRetryErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.OrderVerificationStartedBuilder orderVerificationStartedBuilder() { + return com.commercetools.checkout.models.responses.OrderVerificationStartedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.OrderVerificationTimeoutBuilder orderVerificationTimeoutBuilder() { + return com.commercetools.checkout.models.responses.OrderVerificationTimeoutBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentCancelledBuilder paymentCancelledBuilder() { + return com.commercetools.checkout.models.responses.PaymentCancelledBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentFailedBuilder paymentFailedBuilder() { + return com.commercetools.checkout.models.responses.PaymentFailedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationLoadedBuilder paymentIntegrationLoadedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationLoadedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationLoadingBuilder paymentIntegrationLoadingBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationLoadingBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationLoadingErrorBuilder paymentIntegrationLoadingErrorBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationLoadingErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationNotAvailableBuilder paymentIntegrationNotAvailableBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationNotAvailableBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationSelectedBuilder paymentIntegrationSelectedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationSelectedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationBuilder paymentIntegrationSelectionConfirmationBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationFailedBuilder paymentIntegrationSelectionConfirmationFailedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationSelectionConfirmationFailedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentIntegrationsReceivedBuilder paymentIntegrationsReceivedBuilder() { + return com.commercetools.checkout.models.responses.PaymentIntegrationsReceivedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentStartedBuilder paymentStartedBuilder() { + return com.commercetools.checkout.models.responses.PaymentStartedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentValidationFailedBuilder paymentValidationFailedBuilder() { + return com.commercetools.checkout.models.responses.PaymentValidationFailedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentValidationPassedBuilder paymentValidationPassedBuilder() { + return com.commercetools.checkout.models.responses.PaymentValidationPassedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.PaymentValidationStartedBuilder paymentValidationStartedBuilder() { + return com.commercetools.checkout.models.responses.PaymentValidationStartedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ProjectIsDeactivatedBuilder projectDeactivatedBuilder() { + return com.commercetools.checkout.models.responses.ProjectIsDeactivatedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.RemoveDiscountCodeErrorBuilder removeDiscountCodeErrorBuilder() { + return com.commercetools.checkout.models.responses.RemoveDiscountCodeErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.SetShippingAddressErrorBuilder setShippingAddressErrorBuilder() { + return com.commercetools.checkout.models.responses.SetShippingAddressErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ShippingAddressMissingErrorBuilder shippingAddressMissingBuilder() { + return com.commercetools.checkout.models.responses.ShippingAddressMissingErrorBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ShippingMethodDoesNotMatchCartBuilder shippingMethodDoesNotMatchCartBuilder() { + return com.commercetools.checkout.models.responses.ShippingMethodDoesNotMatchCartBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ShippingMethodSelectedBuilder shippingMethodSelectedBuilder() { + return com.commercetools.checkout.models.responses.ShippingMethodSelectedBuilder.of(); + } + + public com.commercetools.checkout.models.responses.ShippingMethodSelectionConfirmationBuilder shippingMethodSelectionConfirmationBuilder() { + return com.commercetools.checkout.models.responses.ShippingMethodSelectionConfirmationBuilder.of(); + } + + public com.commercetools.checkout.models.responses.UnavailableLocaleBuilder unavailableLocaleBuilder() { + return com.commercetools.checkout.models.responses.UnavailableLocaleBuilder.of(); + } + + public com.commercetools.checkout.models.responses.UnsupportedCountryBuilder unsupportedCountryBuilder() { + return com.commercetools.checkout.models.responses.UnsupportedCountryBuilder.of(); + } + + public com.commercetools.checkout.models.responses.UpdatedFieldsBuilder updatedFieldsBuilder() { + return com.commercetools.checkout.models.responses.UpdatedFieldsBuilder.of(); + } + + /** + * factory method for an instance of MessageBuilder + * @return builder + */ + public static MessageBuilder of() { + return new MessageBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageImpl.java new file mode 100644 index 00000000000..170f1ded4e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageImpl.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * Message + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MessageImpl implements Message, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + MessageImpl(@JsonProperty("code") final String code, @JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.code = code; + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + } + + /** + * create empty instance + */ + public MessageImpl() { + } + + /** + *

Message code for the event.

+ */ + + public String getCode() { + return this.code; + } + + /** + *

Severity level of the event. Can be info, warn, or error.

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Human-readable description of the event.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MessageImpl that = (MessageImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public Message copyDeep() { + return Message.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainers.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainers.java new file mode 100644 index 00000000000..504d512a462 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainers.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when multiple containers for vendor payment buttons are found.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     MultipleVendorButtonContainers multipleVendorButtonContainers = MultipleVendorButtonContainers.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("multiple_vendor_button_containers") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MultipleVendorButtonContainersImpl.class) +public interface MultipleVendorButtonContainers extends Message { + + /** + * discriminator value for MultipleVendorButtonContainers + */ + String MULTIPLE_VENDOR_BUTTON_CONTAINERS = "multiple_vendor_button_containers"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`warn`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Multiple vendor button containers detected, this may cause issues.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`warn`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Multiple vendor button containers detected, this may cause issues.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of MultipleVendorButtonContainers + */ + public static MultipleVendorButtonContainers of() { + return new MultipleVendorButtonContainersImpl(); + } + + /** + * factory method to create a shallow copy MultipleVendorButtonContainers + * @param template instance to be copied + * @return copy instance + */ + public static MultipleVendorButtonContainers of(final MultipleVendorButtonContainers template) { + MultipleVendorButtonContainersImpl instance = new MultipleVendorButtonContainersImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public MultipleVendorButtonContainers copyDeep(); + + /** + * factory method to create a deep copy of MultipleVendorButtonContainers + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MultipleVendorButtonContainers deepCopy(@Nullable final MultipleVendorButtonContainers template) { + if (template == null) { + return null; + } + MultipleVendorButtonContainersImpl instance = new MultipleVendorButtonContainersImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for MultipleVendorButtonContainers + * @return builder + */ + public static MultipleVendorButtonContainersBuilder builder() { + return MultipleVendorButtonContainersBuilder.of(); + } + + /** + * create builder for MultipleVendorButtonContainers instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MultipleVendorButtonContainersBuilder builder(final MultipleVendorButtonContainers template) { + return MultipleVendorButtonContainersBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMultipleVendorButtonContainers(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersBuilder.java new file mode 100644 index 00000000000..04a40967ecf --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MultipleVendorButtonContainersBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     MultipleVendorButtonContainers multipleVendorButtonContainers = MultipleVendorButtonContainers.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MultipleVendorButtonContainersBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`warn`

+ * @param severity value to be set + * @return Builder + */ + + public MultipleVendorButtonContainersBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Multiple vendor button containers detected, this may cause issues.

+ * @param message value to be set + * @return Builder + */ + + public MultipleVendorButtonContainersBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public MultipleVendorButtonContainersBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`warn`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Multiple vendor button containers detected, this may cause issues.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds MultipleVendorButtonContainers with checking for non-null required values + * @return MultipleVendorButtonContainers + */ + public MultipleVendorButtonContainers build() { + Objects.requireNonNull(severity, MultipleVendorButtonContainers.class + ": severity is missing"); + Objects.requireNonNull(message, MultipleVendorButtonContainers.class + ": message is missing"); + Objects.requireNonNull(correlationId, MultipleVendorButtonContainers.class + ": correlationId is missing"); + return new MultipleVendorButtonContainersImpl(severity, message, correlationId); + } + + /** + * builds MultipleVendorButtonContainers without checking for non-null required values + * @return MultipleVendorButtonContainers + */ + public MultipleVendorButtonContainers buildUnchecked() { + return new MultipleVendorButtonContainersImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of MultipleVendorButtonContainersBuilder + * @return builder + */ + public static MultipleVendorButtonContainersBuilder of() { + return new MultipleVendorButtonContainersBuilder(); + } + + /** + * create builder for MultipleVendorButtonContainers instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MultipleVendorButtonContainersBuilder of(final MultipleVendorButtonContainers template) { + MultipleVendorButtonContainersBuilder builder = new MultipleVendorButtonContainersBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersImpl.java new file mode 100644 index 00000000000..636cacc7439 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when multiple containers for vendor payment buttons are found.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MultipleVendorButtonContainersImpl implements MultipleVendorButtonContainers, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + MultipleVendorButtonContainersImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = MULTIPLE_VENDOR_BUTTON_CONTAINERS; + } + + /** + * create empty instance + */ + public MultipleVendorButtonContainersImpl() { + this.code = MULTIPLE_VENDOR_BUTTON_CONTAINERS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`warn`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Multiple vendor button containers detected, this may cause issues.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MultipleVendorButtonContainersImpl that = (MultipleVendorButtonContainersImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public MultipleVendorButtonContainers copyDeep() { + return MultipleVendorButtonContainers.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrations.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrations.java new file mode 100644 index 00000000000..b95e39654c9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrations.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when no payment integration is set up for an Application. Add at least one Payment integration to the Application in the Merchant Center.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NoPaymentIntegrations noPaymentIntegrations = NoPaymentIntegrations.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("no_payment_integrations") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = NoPaymentIntegrationsImpl.class) +public interface NoPaymentIntegrations extends Message { + + /** + * discriminator value for NoPaymentIntegrations + */ + String NO_PAYMENT_INTEGRATIONS = "no_payment_integrations"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

There are no payment integrations configured.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

There are no payment integrations configured.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of NoPaymentIntegrations + */ + public static NoPaymentIntegrations of() { + return new NoPaymentIntegrationsImpl(); + } + + /** + * factory method to create a shallow copy NoPaymentIntegrations + * @param template instance to be copied + * @return copy instance + */ + public static NoPaymentIntegrations of(final NoPaymentIntegrations template) { + NoPaymentIntegrationsImpl instance = new NoPaymentIntegrationsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public NoPaymentIntegrations copyDeep(); + + /** + * factory method to create a deep copy of NoPaymentIntegrations + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static NoPaymentIntegrations deepCopy(@Nullable final NoPaymentIntegrations template) { + if (template == null) { + return null; + } + NoPaymentIntegrationsImpl instance = new NoPaymentIntegrationsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for NoPaymentIntegrations + * @return builder + */ + public static NoPaymentIntegrationsBuilder builder() { + return NoPaymentIntegrationsBuilder.of(); + } + + /** + * create builder for NoPaymentIntegrations instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NoPaymentIntegrationsBuilder builder(final NoPaymentIntegrations template) { + return NoPaymentIntegrationsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withNoPaymentIntegrations(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsBuilder.java new file mode 100644 index 00000000000..cfdc459adf0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * NoPaymentIntegrationsBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NoPaymentIntegrations noPaymentIntegrations = NoPaymentIntegrations.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NoPaymentIntegrationsBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public NoPaymentIntegrationsBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

There are no payment integrations configured.

+ * @param message value to be set + * @return Builder + */ + + public NoPaymentIntegrationsBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public NoPaymentIntegrationsBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

There are no payment integrations configured.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds NoPaymentIntegrations with checking for non-null required values + * @return NoPaymentIntegrations + */ + public NoPaymentIntegrations build() { + Objects.requireNonNull(severity, NoPaymentIntegrations.class + ": severity is missing"); + Objects.requireNonNull(message, NoPaymentIntegrations.class + ": message is missing"); + Objects.requireNonNull(correlationId, NoPaymentIntegrations.class + ": correlationId is missing"); + return new NoPaymentIntegrationsImpl(severity, message, correlationId); + } + + /** + * builds NoPaymentIntegrations without checking for non-null required values + * @return NoPaymentIntegrations + */ + public NoPaymentIntegrations buildUnchecked() { + return new NoPaymentIntegrationsImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of NoPaymentIntegrationsBuilder + * @return builder + */ + public static NoPaymentIntegrationsBuilder of() { + return new NoPaymentIntegrationsBuilder(); + } + + /** + * create builder for NoPaymentIntegrations instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NoPaymentIntegrationsBuilder of(final NoPaymentIntegrations template) { + NoPaymentIntegrationsBuilder builder = new NoPaymentIntegrationsBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsImpl.java new file mode 100644 index 00000000000..1df1021eae8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when no payment integration is set up for an Application. Add at least one Payment integration to the Application in the Merchant Center.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NoPaymentIntegrationsImpl implements NoPaymentIntegrations, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + NoPaymentIntegrationsImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = NO_PAYMENT_INTEGRATIONS; + } + + /** + * create empty instance + */ + public NoPaymentIntegrationsImpl() { + this.code = NO_PAYMENT_INTEGRATIONS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

There are no payment integrations configured.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + NoPaymentIntegrationsImpl that = (NoPaymentIntegrationsImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public NoPaymentIntegrations copyDeep() { + return NoPaymentIntegrations.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethods.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethods.java new file mode 100644 index 00000000000..bebcea5b278 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethods.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when no Shipping Method is available for the shipping address of the Cart. This may indicate an incomplete configuration.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NoShippingMethods noShippingMethods = NoShippingMethods.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("no_shipping_methods") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = NoShippingMethodsImpl.class) +public interface NoShippingMethods extends ResponseMessage { + + /** + * discriminator value for NoShippingMethods + */ + String NO_SHIPPING_METHODS = "no_shipping_methods"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

There are no shipping methods matching cart.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

There are no shipping methods matching cart.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of NoShippingMethods + */ + public static NoShippingMethods of() { + return new NoShippingMethodsImpl(); + } + + /** + * factory method to create a shallow copy NoShippingMethods + * @param template instance to be copied + * @return copy instance + */ + public static NoShippingMethods of(final NoShippingMethods template) { + NoShippingMethodsImpl instance = new NoShippingMethodsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public NoShippingMethods copyDeep(); + + /** + * factory method to create a deep copy of NoShippingMethods + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static NoShippingMethods deepCopy(@Nullable final NoShippingMethods template) { + if (template == null) { + return null; + } + NoShippingMethodsImpl instance = new NoShippingMethodsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for NoShippingMethods + * @return builder + */ + public static NoShippingMethodsBuilder builder() { + return NoShippingMethodsBuilder.of(); + } + + /** + * create builder for NoShippingMethods instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NoShippingMethodsBuilder builder(final NoShippingMethods template) { + return NoShippingMethodsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withNoShippingMethods(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsBuilder.java new file mode 100644 index 00000000000..aabd8dab061 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * NoShippingMethodsBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NoShippingMethods noShippingMethods = NoShippingMethods.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NoShippingMethodsBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public NoShippingMethodsBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

There are no shipping methods matching cart.

+ * @param message value to be set + * @return Builder + */ + + public NoShippingMethodsBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public NoShippingMethodsBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + * @return Builder + */ + + public NoShippingMethodsBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

There are no shipping methods matching cart.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds NoShippingMethods with checking for non-null required values + * @return NoShippingMethods + */ + public NoShippingMethods build() { + Objects.requireNonNull(severity, NoShippingMethods.class + ": severity is missing"); + Objects.requireNonNull(message, NoShippingMethods.class + ": message is missing"); + Objects.requireNonNull(correlationId, NoShippingMethods.class + ": correlationId is missing"); + Objects.requireNonNull(payload, NoShippingMethods.class + ": payload is missing"); + return new NoShippingMethodsImpl(severity, message, correlationId, payload); + } + + /** + * builds NoShippingMethods without checking for non-null required values + * @return NoShippingMethods + */ + public NoShippingMethods buildUnchecked() { + return new NoShippingMethodsImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of NoShippingMethodsBuilder + * @return builder + */ + public static NoShippingMethodsBuilder of() { + return new NoShippingMethodsBuilder(); + } + + /** + * create builder for NoShippingMethods instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NoShippingMethodsBuilder of(final NoShippingMethods template) { + NoShippingMethodsBuilder builder = new NoShippingMethodsBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsImpl.java new file mode 100644 index 00000000000..b805da16fb8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when no Shipping Method is available for the shipping address of the Cart. This may indicate an incomplete configuration.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NoShippingMethodsImpl implements NoShippingMethods, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + NoShippingMethodsImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = NO_SHIPPING_METHODS; + } + + /** + * create empty instance + */ + public NoShippingMethodsImpl() { + this.code = NO_SHIPPING_METHODS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

There are no shipping methods matching cart.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + NoShippingMethodsImpl that = (NoShippingMethodsImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public NoShippingMethods copyDeep() { + return NoShippingMethods.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartError.java new file mode 100644 index 00000000000..61f0b8a1691 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Order could not be created due to inconsistencies in the Cart.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NonOrderableCartError nonOrderableCartError = NonOrderableCartError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("non_orderable_cart_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = NonOrderableCartErrorImpl.class) +public interface NonOrderableCartError extends ResponseMessage { + + /** + * discriminator value for NonOrderableCartError + */ + String NON_ORDERABLE_CART_ERROR = "non_orderable_cart_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

This cart is not orderable.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cart object with the id and errors properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

This cart is not orderable.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cart object with the id and errors properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of NonOrderableCartError + */ + public static NonOrderableCartError of() { + return new NonOrderableCartErrorImpl(); + } + + /** + * factory method to create a shallow copy NonOrderableCartError + * @param template instance to be copied + * @return copy instance + */ + public static NonOrderableCartError of(final NonOrderableCartError template) { + NonOrderableCartErrorImpl instance = new NonOrderableCartErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public NonOrderableCartError copyDeep(); + + /** + * factory method to create a deep copy of NonOrderableCartError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static NonOrderableCartError deepCopy(@Nullable final NonOrderableCartError template) { + if (template == null) { + return null; + } + NonOrderableCartErrorImpl instance = new NonOrderableCartErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for NonOrderableCartError + * @return builder + */ + public static NonOrderableCartErrorBuilder builder() { + return NonOrderableCartErrorBuilder.of(); + } + + /** + * create builder for NonOrderableCartError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NonOrderableCartErrorBuilder builder(final NonOrderableCartError template) { + return NonOrderableCartErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withNonOrderableCartError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorBuilder.java new file mode 100644 index 00000000000..ae88304b521 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * NonOrderableCartErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NonOrderableCartError nonOrderableCartError = NonOrderableCartError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NonOrderableCartErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public NonOrderableCartErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

This cart is not orderable.

+ * @param message value to be set + * @return Builder + */ + + public NonOrderableCartErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public NonOrderableCartErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cart object with the id and errors properties.

+ * @param payload value to be set + * @return Builder + */ + + public NonOrderableCartErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

This cart is not orderable.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id and errors properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds NonOrderableCartError with checking for non-null required values + * @return NonOrderableCartError + */ + public NonOrderableCartError build() { + Objects.requireNonNull(severity, NonOrderableCartError.class + ": severity is missing"); + Objects.requireNonNull(message, NonOrderableCartError.class + ": message is missing"); + Objects.requireNonNull(correlationId, NonOrderableCartError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, NonOrderableCartError.class + ": payload is missing"); + return new NonOrderableCartErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds NonOrderableCartError without checking for non-null required values + * @return NonOrderableCartError + */ + public NonOrderableCartError buildUnchecked() { + return new NonOrderableCartErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of NonOrderableCartErrorBuilder + * @return builder + */ + public static NonOrderableCartErrorBuilder of() { + return new NonOrderableCartErrorBuilder(); + } + + /** + * create builder for NonOrderableCartError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NonOrderableCartErrorBuilder of(final NonOrderableCartError template) { + NonOrderableCartErrorBuilder builder = new NonOrderableCartErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorImpl.java new file mode 100644 index 00000000000..1ac7533aabe --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Order could not be created due to inconsistencies in the Cart.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NonOrderableCartErrorImpl implements NonOrderableCartError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + NonOrderableCartErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = NON_ORDERABLE_CART_ERROR; + } + + /** + * create empty instance + */ + public NonOrderableCartErrorImpl() { + this.code = NON_ORDERABLE_CART_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

This cart is not orderable.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id and errors properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + NonOrderableCartErrorImpl that = (NonOrderableCartErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public NonOrderableCartError copyDeep() { + return NonOrderableCartError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemoved.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemoved.java new file mode 100644 index 00000000000..fcad55d84f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemoved.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when using the paymentFlow method and Checkout removes a Discount Code from the Cart because it does not apply to the Cart. Checkout removes the Discount Code to avoid an order creation error when converting the Cart to an Order.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NotApplicableDiscountCodeRemoved notApplicableDiscountCodeRemoved = NotApplicableDiscountCodeRemoved.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("not_applicable_discount_code_removed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = NotApplicableDiscountCodeRemovedImpl.class) +public interface NotApplicableDiscountCodeRemoved extends ResponseMessage { + + /** + * discriminator value for NotApplicableDiscountCodeRemoved + */ + String NOT_APPLICABLE_DISCOUNT_CODE_REMOVED = "not_applicable_discount_code_removed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`warn`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Not applicable discount code removed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cartId and discountCode properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`warn`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Not applicable discount code removed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cartId and discountCode properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of NotApplicableDiscountCodeRemoved + */ + public static NotApplicableDiscountCodeRemoved of() { + return new NotApplicableDiscountCodeRemovedImpl(); + } + + /** + * factory method to create a shallow copy NotApplicableDiscountCodeRemoved + * @param template instance to be copied + * @return copy instance + */ + public static NotApplicableDiscountCodeRemoved of(final NotApplicableDiscountCodeRemoved template) { + NotApplicableDiscountCodeRemovedImpl instance = new NotApplicableDiscountCodeRemovedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public NotApplicableDiscountCodeRemoved copyDeep(); + + /** + * factory method to create a deep copy of NotApplicableDiscountCodeRemoved + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static NotApplicableDiscountCodeRemoved deepCopy(@Nullable final NotApplicableDiscountCodeRemoved template) { + if (template == null) { + return null; + } + NotApplicableDiscountCodeRemovedImpl instance = new NotApplicableDiscountCodeRemovedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for NotApplicableDiscountCodeRemoved + * @return builder + */ + public static NotApplicableDiscountCodeRemovedBuilder builder() { + return NotApplicableDiscountCodeRemovedBuilder.of(); + } + + /** + * create builder for NotApplicableDiscountCodeRemoved instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NotApplicableDiscountCodeRemovedBuilder builder(final NotApplicableDiscountCodeRemoved template) { + return NotApplicableDiscountCodeRemovedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withNotApplicableDiscountCodeRemoved(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedBuilder.java new file mode 100644 index 00000000000..e88dd777474 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * NotApplicableDiscountCodeRemovedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     NotApplicableDiscountCodeRemoved notApplicableDiscountCodeRemoved = NotApplicableDiscountCodeRemoved.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NotApplicableDiscountCodeRemovedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`warn`

+ * @param severity value to be set + * @return Builder + */ + + public NotApplicableDiscountCodeRemovedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Not applicable discount code removed.

+ * @param message value to be set + * @return Builder + */ + + public NotApplicableDiscountCodeRemovedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public NotApplicableDiscountCodeRemovedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cartId and discountCode properties.

+ * @param payload value to be set + * @return Builder + */ + + public NotApplicableDiscountCodeRemovedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`warn`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Not applicable discount code removed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cartId and discountCode properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds NotApplicableDiscountCodeRemoved with checking for non-null required values + * @return NotApplicableDiscountCodeRemoved + */ + public NotApplicableDiscountCodeRemoved build() { + Objects.requireNonNull(severity, NotApplicableDiscountCodeRemoved.class + ": severity is missing"); + Objects.requireNonNull(message, NotApplicableDiscountCodeRemoved.class + ": message is missing"); + Objects.requireNonNull(correlationId, NotApplicableDiscountCodeRemoved.class + ": correlationId is missing"); + Objects.requireNonNull(payload, NotApplicableDiscountCodeRemoved.class + ": payload is missing"); + return new NotApplicableDiscountCodeRemovedImpl(severity, message, correlationId, payload); + } + + /** + * builds NotApplicableDiscountCodeRemoved without checking for non-null required values + * @return NotApplicableDiscountCodeRemoved + */ + public NotApplicableDiscountCodeRemoved buildUnchecked() { + return new NotApplicableDiscountCodeRemovedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of NotApplicableDiscountCodeRemovedBuilder + * @return builder + */ + public static NotApplicableDiscountCodeRemovedBuilder of() { + return new NotApplicableDiscountCodeRemovedBuilder(); + } + + /** + * create builder for NotApplicableDiscountCodeRemoved instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NotApplicableDiscountCodeRemovedBuilder of(final NotApplicableDiscountCodeRemoved template) { + NotApplicableDiscountCodeRemovedBuilder builder = new NotApplicableDiscountCodeRemovedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedImpl.java new file mode 100644 index 00000000000..05250a984ff --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when using the paymentFlow method and Checkout removes a Discount Code from the Cart because it does not apply to the Cart. Checkout removes the Discount Code to avoid an order creation error when converting the Cart to an Order.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NotApplicableDiscountCodeRemovedImpl implements NotApplicableDiscountCodeRemoved, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + NotApplicableDiscountCodeRemovedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = NOT_APPLICABLE_DISCOUNT_CODE_REMOVED; + } + + /** + * create empty instance + */ + public NotApplicableDiscountCodeRemovedImpl() { + this.code = NOT_APPLICABLE_DISCOUNT_CODE_REMOVED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`warn`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Not applicable discount code removed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cartId and discountCode properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + NotApplicableDiscountCodeRemovedImpl that = (NotApplicableDiscountCodeRemovedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public NotApplicableDiscountCodeRemoved copyDeep() { + return NotApplicableDiscountCodeRemoved.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreated.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreated.java new file mode 100644 index 00000000000..01609652997 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreated.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when an Order is created after a successful checkout process.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderCreated orderCreated = OrderCreated.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("order_created") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderCreatedImpl.class) +public interface OrderCreated extends ResponseMessage { + + /** + * discriminator value for OrderCreated + */ + String ORDER_CREATED = "order_created"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Order {orderId} created.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the order object with the id property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Order {orderId} created.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the order object with the id property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of OrderCreated + */ + public static OrderCreated of() { + return new OrderCreatedImpl(); + } + + /** + * factory method to create a shallow copy OrderCreated + * @param template instance to be copied + * @return copy instance + */ + public static OrderCreated of(final OrderCreated template) { + OrderCreatedImpl instance = new OrderCreatedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public OrderCreated copyDeep(); + + /** + * factory method to create a deep copy of OrderCreated + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderCreated deepCopy(@Nullable final OrderCreated template) { + if (template == null) { + return null; + } + OrderCreatedImpl instance = new OrderCreatedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for OrderCreated + * @return builder + */ + public static OrderCreatedBuilder builder() { + return OrderCreatedBuilder.of(); + } + + /** + * create builder for OrderCreated instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreatedBuilder builder(final OrderCreated template) { + return OrderCreatedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderCreated(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreatedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreatedBuilder.java new file mode 100644 index 00000000000..e19c17b92f5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreatedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderCreatedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderCreated orderCreated = OrderCreated.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreatedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public OrderCreatedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Order {orderId} created.

+ * @param message value to be set + * @return Builder + */ + + public OrderCreatedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public OrderCreatedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the order object with the id property.

+ * @param payload value to be set + * @return Builder + */ + + public OrderCreatedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order {orderId} created.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the order object with the id property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds OrderCreated with checking for non-null required values + * @return OrderCreated + */ + public OrderCreated build() { + Objects.requireNonNull(severity, OrderCreated.class + ": severity is missing"); + Objects.requireNonNull(message, OrderCreated.class + ": message is missing"); + Objects.requireNonNull(correlationId, OrderCreated.class + ": correlationId is missing"); + Objects.requireNonNull(payload, OrderCreated.class + ": payload is missing"); + return new OrderCreatedImpl(severity, message, correlationId, payload); + } + + /** + * builds OrderCreated without checking for non-null required values + * @return OrderCreated + */ + public OrderCreated buildUnchecked() { + return new OrderCreatedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of OrderCreatedBuilder + * @return builder + */ + public static OrderCreatedBuilder of() { + return new OrderCreatedBuilder(); + } + + /** + * create builder for OrderCreated instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreatedBuilder of(final OrderCreated template) { + OrderCreatedBuilder builder = new OrderCreatedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreatedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreatedImpl.java new file mode 100644 index 00000000000..25a8d69ea1a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreatedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when an Order is created after a successful checkout process.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreatedImpl implements OrderCreated, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + OrderCreatedImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = ORDER_CREATED; + } + + /** + * create empty instance + */ + public OrderCreatedImpl() { + this.code = ORDER_CREATED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order {orderId} created.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the order object with the id property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderCreatedImpl that = (OrderCreatedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public OrderCreated copyDeep() { + return OrderCreated.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationError.java new file mode 100644 index 00000000000..846b401ceff --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when an Order that references an approved Payment cannot be created.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderCreationError orderCreationError = OrderCreationError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("order_creation_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderCreationErrorImpl.class) +public interface OrderCreationError extends ResponseMessage { + + /** + * discriminator value for OrderCreationError + */ + String ORDER_CREATION_ERROR = "order_creation_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Order creation failed with approved payment.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains paymentReference, sessionId, and the errors array of objects, with the related code and message properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Order creation failed with approved payment.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains paymentReference, sessionId, and the errors array of objects, with the related code and message properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of OrderCreationError + */ + public static OrderCreationError of() { + return new OrderCreationErrorImpl(); + } + + /** + * factory method to create a shallow copy OrderCreationError + * @param template instance to be copied + * @return copy instance + */ + public static OrderCreationError of(final OrderCreationError template) { + OrderCreationErrorImpl instance = new OrderCreationErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public OrderCreationError copyDeep(); + + /** + * factory method to create a deep copy of OrderCreationError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderCreationError deepCopy(@Nullable final OrderCreationError template) { + if (template == null) { + return null; + } + OrderCreationErrorImpl instance = new OrderCreationErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for OrderCreationError + * @return builder + */ + public static OrderCreationErrorBuilder builder() { + return OrderCreationErrorBuilder.of(); + } + + /** + * create builder for OrderCreationError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreationErrorBuilder builder(final OrderCreationError template) { + return OrderCreationErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderCreationError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorBuilder.java new file mode 100644 index 00000000000..cd943debb1b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderCreationErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderCreationError orderCreationError = OrderCreationError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreationErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public OrderCreationErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Order creation failed with approved payment.

+ * @param message value to be set + * @return Builder + */ + + public OrderCreationErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public OrderCreationErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains paymentReference, sessionId, and the errors array of objects, with the related code and message properties.

+ * @param payload value to be set + * @return Builder + */ + + public OrderCreationErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order creation failed with approved payment.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains paymentReference, sessionId, and the errors array of objects, with the related code and message properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds OrderCreationError with checking for non-null required values + * @return OrderCreationError + */ + public OrderCreationError build() { + Objects.requireNonNull(severity, OrderCreationError.class + ": severity is missing"); + Objects.requireNonNull(message, OrderCreationError.class + ": message is missing"); + Objects.requireNonNull(correlationId, OrderCreationError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, OrderCreationError.class + ": payload is missing"); + return new OrderCreationErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds OrderCreationError without checking for non-null required values + * @return OrderCreationError + */ + public OrderCreationError buildUnchecked() { + return new OrderCreationErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of OrderCreationErrorBuilder + * @return builder + */ + public static OrderCreationErrorBuilder of() { + return new OrderCreationErrorBuilder(); + } + + /** + * create builder for OrderCreationError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreationErrorBuilder of(final OrderCreationError template) { + OrderCreationErrorBuilder builder = new OrderCreationErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorImpl.java new file mode 100644 index 00000000000..80dd1795f5f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when an Order that references an approved Payment cannot be created.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreationErrorImpl implements OrderCreationError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + OrderCreationErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = ORDER_CREATION_ERROR; + } + + /** + * create empty instance + */ + public OrderCreationErrorImpl() { + this.code = ORDER_CREATION_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order creation failed with approved payment.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains paymentReference, sessionId, and the errors array of objects, with the related code and message properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderCreationErrorImpl that = (OrderCreationErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public OrderCreationError copyDeep() { + return OrderCreationError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryError.java new file mode 100644 index 00000000000..e9f01901b47 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when retrying the verification of the Order results in an error.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderVerificationRetryError orderVerificationRetryError = OrderVerificationRetryError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("order_verification_retry_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderVerificationRetryErrorImpl.class) +public interface OrderVerificationRetryError extends ResponseMessage { + + /** + * discriminator value for OrderVerificationRetryError + */ + String ORDER_VERIFICATION_RETRY_ERROR = "order_verification_retry_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Order verification retry error.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the error property that can be either orderReferenceNotAvailable or orderVerificationOngoing.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Order verification retry error.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the error property that can be either orderReferenceNotAvailable or orderVerificationOngoing.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of OrderVerificationRetryError + */ + public static OrderVerificationRetryError of() { + return new OrderVerificationRetryErrorImpl(); + } + + /** + * factory method to create a shallow copy OrderVerificationRetryError + * @param template instance to be copied + * @return copy instance + */ + public static OrderVerificationRetryError of(final OrderVerificationRetryError template) { + OrderVerificationRetryErrorImpl instance = new OrderVerificationRetryErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public OrderVerificationRetryError copyDeep(); + + /** + * factory method to create a deep copy of OrderVerificationRetryError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderVerificationRetryError deepCopy(@Nullable final OrderVerificationRetryError template) { + if (template == null) { + return null; + } + OrderVerificationRetryErrorImpl instance = new OrderVerificationRetryErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for OrderVerificationRetryError + * @return builder + */ + public static OrderVerificationRetryErrorBuilder builder() { + return OrderVerificationRetryErrorBuilder.of(); + } + + /** + * create builder for OrderVerificationRetryError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderVerificationRetryErrorBuilder builder(final OrderVerificationRetryError template) { + return OrderVerificationRetryErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderVerificationRetryError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorBuilder.java new file mode 100644 index 00000000000..5bc88e9575b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderVerificationRetryErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderVerificationRetryError orderVerificationRetryError = OrderVerificationRetryError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderVerificationRetryErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public OrderVerificationRetryErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Order verification retry error.

+ * @param message value to be set + * @return Builder + */ + + public OrderVerificationRetryErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public OrderVerificationRetryErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the error property that can be either orderReferenceNotAvailable or orderVerificationOngoing.

+ * @param payload value to be set + * @return Builder + */ + + public OrderVerificationRetryErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order verification retry error.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the error property that can be either orderReferenceNotAvailable or orderVerificationOngoing.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds OrderVerificationRetryError with checking for non-null required values + * @return OrderVerificationRetryError + */ + public OrderVerificationRetryError build() { + Objects.requireNonNull(severity, OrderVerificationRetryError.class + ": severity is missing"); + Objects.requireNonNull(message, OrderVerificationRetryError.class + ": message is missing"); + Objects.requireNonNull(correlationId, OrderVerificationRetryError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, OrderVerificationRetryError.class + ": payload is missing"); + return new OrderVerificationRetryErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds OrderVerificationRetryError without checking for non-null required values + * @return OrderVerificationRetryError + */ + public OrderVerificationRetryError buildUnchecked() { + return new OrderVerificationRetryErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of OrderVerificationRetryErrorBuilder + * @return builder + */ + public static OrderVerificationRetryErrorBuilder of() { + return new OrderVerificationRetryErrorBuilder(); + } + + /** + * create builder for OrderVerificationRetryError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderVerificationRetryErrorBuilder of(final OrderVerificationRetryError template) { + OrderVerificationRetryErrorBuilder builder = new OrderVerificationRetryErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorImpl.java new file mode 100644 index 00000000000..7eb8b09aa53 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when retrying the verification of the Order results in an error.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderVerificationRetryErrorImpl implements OrderVerificationRetryError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + OrderVerificationRetryErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = ORDER_VERIFICATION_RETRY_ERROR; + } + + /** + * create empty instance + */ + public OrderVerificationRetryErrorImpl() { + this.code = ORDER_VERIFICATION_RETRY_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order verification retry error.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the error property that can be either orderReferenceNotAvailable or orderVerificationOngoing.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderVerificationRetryErrorImpl that = (OrderVerificationRetryErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public OrderVerificationRetryError copyDeep() { + return OrderVerificationRetryError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStarted.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStarted.java new file mode 100644 index 00000000000..3b43ec56908 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStarted.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when Checkout starts verifying the Order.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderVerificationStarted orderVerificationStarted = OrderVerificationStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("order_verification_started") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderVerificationStartedImpl.class) +public interface OrderVerificationStarted extends Message { + + /** + * discriminator value for OrderVerificationStarted + */ + String ORDER_VERIFICATION_STARTED = "order_verification_started"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Order verification started.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Order verification started.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of OrderVerificationStarted + */ + public static OrderVerificationStarted of() { + return new OrderVerificationStartedImpl(); + } + + /** + * factory method to create a shallow copy OrderVerificationStarted + * @param template instance to be copied + * @return copy instance + */ + public static OrderVerificationStarted of(final OrderVerificationStarted template) { + OrderVerificationStartedImpl instance = new OrderVerificationStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public OrderVerificationStarted copyDeep(); + + /** + * factory method to create a deep copy of OrderVerificationStarted + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderVerificationStarted deepCopy(@Nullable final OrderVerificationStarted template) { + if (template == null) { + return null; + } + OrderVerificationStartedImpl instance = new OrderVerificationStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for OrderVerificationStarted + * @return builder + */ + public static OrderVerificationStartedBuilder builder() { + return OrderVerificationStartedBuilder.of(); + } + + /** + * create builder for OrderVerificationStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderVerificationStartedBuilder builder(final OrderVerificationStarted template) { + return OrderVerificationStartedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderVerificationStarted(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedBuilder.java new file mode 100644 index 00000000000..4fe41d94745 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderVerificationStartedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderVerificationStarted orderVerificationStarted = OrderVerificationStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderVerificationStartedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public OrderVerificationStartedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Order verification started.

+ * @param message value to be set + * @return Builder + */ + + public OrderVerificationStartedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public OrderVerificationStartedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order verification started.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds OrderVerificationStarted with checking for non-null required values + * @return OrderVerificationStarted + */ + public OrderVerificationStarted build() { + Objects.requireNonNull(severity, OrderVerificationStarted.class + ": severity is missing"); + Objects.requireNonNull(message, OrderVerificationStarted.class + ": message is missing"); + Objects.requireNonNull(correlationId, OrderVerificationStarted.class + ": correlationId is missing"); + return new OrderVerificationStartedImpl(severity, message, correlationId); + } + + /** + * builds OrderVerificationStarted without checking for non-null required values + * @return OrderVerificationStarted + */ + public OrderVerificationStarted buildUnchecked() { + return new OrderVerificationStartedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of OrderVerificationStartedBuilder + * @return builder + */ + public static OrderVerificationStartedBuilder of() { + return new OrderVerificationStartedBuilder(); + } + + /** + * create builder for OrderVerificationStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderVerificationStartedBuilder of(final OrderVerificationStarted template) { + OrderVerificationStartedBuilder builder = new OrderVerificationStartedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedImpl.java new file mode 100644 index 00000000000..b26be37b159 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when Checkout starts verifying the Order.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderVerificationStartedImpl implements OrderVerificationStarted, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + OrderVerificationStartedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = ORDER_VERIFICATION_STARTED; + } + + /** + * create empty instance + */ + public OrderVerificationStartedImpl() { + this.code = ORDER_VERIFICATION_STARTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order verification started.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderVerificationStartedImpl that = (OrderVerificationStartedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public OrderVerificationStarted copyDeep() { + return OrderVerificationStarted.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeout.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeout.java new file mode 100644 index 00000000000..549caf11702 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeout.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the verification of the Order times out.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderVerificationTimeout orderVerificationTimeout = OrderVerificationTimeout.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("order_verification_timeout") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderVerificationTimeoutImpl.class) +public interface OrderVerificationTimeout extends Message { + + /** + * discriminator value for OrderVerificationTimeout + */ + String ORDER_VERIFICATION_TIMEOUT = "order_verification_timeout"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Order verification timeout.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Order verification timeout.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of OrderVerificationTimeout + */ + public static OrderVerificationTimeout of() { + return new OrderVerificationTimeoutImpl(); + } + + /** + * factory method to create a shallow copy OrderVerificationTimeout + * @param template instance to be copied + * @return copy instance + */ + public static OrderVerificationTimeout of(final OrderVerificationTimeout template) { + OrderVerificationTimeoutImpl instance = new OrderVerificationTimeoutImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public OrderVerificationTimeout copyDeep(); + + /** + * factory method to create a deep copy of OrderVerificationTimeout + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderVerificationTimeout deepCopy(@Nullable final OrderVerificationTimeout template) { + if (template == null) { + return null; + } + OrderVerificationTimeoutImpl instance = new OrderVerificationTimeoutImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for OrderVerificationTimeout + * @return builder + */ + public static OrderVerificationTimeoutBuilder builder() { + return OrderVerificationTimeoutBuilder.of(); + } + + /** + * create builder for OrderVerificationTimeout instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderVerificationTimeoutBuilder builder(final OrderVerificationTimeout template) { + return OrderVerificationTimeoutBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderVerificationTimeout(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutBuilder.java new file mode 100644 index 00000000000..667600198c1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderVerificationTimeoutBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderVerificationTimeout orderVerificationTimeout = OrderVerificationTimeout.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderVerificationTimeoutBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public OrderVerificationTimeoutBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Order verification timeout.

+ * @param message value to be set + * @return Builder + */ + + public OrderVerificationTimeoutBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public OrderVerificationTimeoutBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order verification timeout.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds OrderVerificationTimeout with checking for non-null required values + * @return OrderVerificationTimeout + */ + public OrderVerificationTimeout build() { + Objects.requireNonNull(severity, OrderVerificationTimeout.class + ": severity is missing"); + Objects.requireNonNull(message, OrderVerificationTimeout.class + ": message is missing"); + Objects.requireNonNull(correlationId, OrderVerificationTimeout.class + ": correlationId is missing"); + return new OrderVerificationTimeoutImpl(severity, message, correlationId); + } + + /** + * builds OrderVerificationTimeout without checking for non-null required values + * @return OrderVerificationTimeout + */ + public OrderVerificationTimeout buildUnchecked() { + return new OrderVerificationTimeoutImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of OrderVerificationTimeoutBuilder + * @return builder + */ + public static OrderVerificationTimeoutBuilder of() { + return new OrderVerificationTimeoutBuilder(); + } + + /** + * create builder for OrderVerificationTimeout instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderVerificationTimeoutBuilder of(final OrderVerificationTimeout template) { + OrderVerificationTimeoutBuilder builder = new OrderVerificationTimeoutBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutImpl.java new file mode 100644 index 00000000000..996639c251f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the verification of the Order times out.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderVerificationTimeoutImpl implements OrderVerificationTimeout, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + OrderVerificationTimeoutImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = ORDER_VERIFICATION_TIMEOUT; + } + + /** + * create empty instance + */ + public OrderVerificationTimeoutImpl() { + this.code = ORDER_VERIFICATION_TIMEOUT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Order verification timeout.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderVerificationTimeoutImpl that = (OrderVerificationTimeoutImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public OrderVerificationTimeout copyDeep() { + return OrderVerificationTimeout.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelled.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelled.java new file mode 100644 index 00000000000..ef43fd829db --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelled.java @@ -0,0 +1,195 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.payment.PaymentReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer cancels the payment (for example, by closing the browser's window).

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentCancelled paymentCancelled = PaymentCancelled.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_cancelled") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentCancelledImpl.class) +public interface PaymentCancelled extends ResponseMessage { + + /** + * discriminator value for PaymentCancelled + */ + String PAYMENT_CANCELLED = "payment_cancelled"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment cancelled.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the reference data of a Payment.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public PaymentReference getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment cancelled.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the reference data of a Payment.

+ * @param payload value to be set + */ + + public void setPayload(final PaymentReference payload); + + /** + * factory method + * @return instance of PaymentCancelled + */ + public static PaymentCancelled of() { + return new PaymentCancelledImpl(); + } + + /** + * factory method to create a shallow copy PaymentCancelled + * @param template instance to be copied + * @return copy instance + */ + public static PaymentCancelled of(final PaymentCancelled template) { + PaymentCancelledImpl instance = new PaymentCancelledImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentCancelled copyDeep(); + + /** + * factory method to create a deep copy of PaymentCancelled + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentCancelled deepCopy(@Nullable final PaymentCancelled template) { + if (template == null) { + return null; + } + PaymentCancelledImpl instance = new PaymentCancelledImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(com.commercetools.checkout.models.payment.PaymentReference.deepCopy(template.getPayload())); + return instance; + } + + /** + * builder factory method for PaymentCancelled + * @return builder + */ + public static PaymentCancelledBuilder builder() { + return PaymentCancelledBuilder.of(); + } + + /** + * create builder for PaymentCancelled instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentCancelledBuilder builder(final PaymentCancelled template) { + return PaymentCancelledBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentCancelled(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledBuilder.java new file mode 100644 index 00000000000..fa2ac290e99 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledBuilder.java @@ -0,0 +1,182 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentCancelledBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentCancelled paymentCancelled = PaymentCancelled.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentCancelledBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private com.commercetools.checkout.models.payment.PaymentReference payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentCancelledBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment cancelled.

+ * @param message value to be set + * @return Builder + */ + + public PaymentCancelledBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentCancelledBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param builder function to build the payload value + * @return Builder + */ + + public PaymentCancelledBuilder payload( + Function builder) { + this.payload = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()).build(); + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param builder function to build the payload value + * @return Builder + */ + + public PaymentCancelledBuilder withPayload( + Function builder) { + this.payload = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()); + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentCancelledBuilder payload(final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment cancelled.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the reference data of a Payment.

+ * @return payload + */ + + public com.commercetools.checkout.models.payment.PaymentReference getPayload() { + return this.payload; + } + + /** + * builds PaymentCancelled with checking for non-null required values + * @return PaymentCancelled + */ + public PaymentCancelled build() { + Objects.requireNonNull(severity, PaymentCancelled.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentCancelled.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentCancelled.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentCancelled.class + ": payload is missing"); + return new PaymentCancelledImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentCancelled without checking for non-null required values + * @return PaymentCancelled + */ + public PaymentCancelled buildUnchecked() { + return new PaymentCancelledImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentCancelledBuilder + * @return builder + */ + public static PaymentCancelledBuilder of() { + return new PaymentCancelledBuilder(); + } + + /** + * create builder for PaymentCancelled instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentCancelledBuilder of(final PaymentCancelled template) { + PaymentCancelledBuilder builder = new PaymentCancelledBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledImpl.java new file mode 100644 index 00000000000..4e5abcd0fb2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer cancels the payment (for example, by closing the browser's window).

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentCancelledImpl implements PaymentCancelled, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private com.commercetools.checkout.models.payment.PaymentReference payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentCancelledImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_CANCELLED; + } + + /** + * create empty instance + */ + public PaymentCancelledImpl() { + this.code = PAYMENT_CANCELLED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment cancelled.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the reference data of a Payment.

+ */ + + public com.commercetools.checkout.models.payment.PaymentReference getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentCancelledImpl that = (PaymentCancelledImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentCancelled copyDeep() { + return PaymentCancelled.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailed.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailed.java new file mode 100644 index 00000000000..05ba90114f5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailed.java @@ -0,0 +1,195 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.payment.PaymentReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the payment fails.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentFailed paymentFailed = PaymentFailed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_failed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentFailedImpl.class) +public interface PaymentFailed extends ResponseMessage { + + /** + * discriminator value for PaymentFailed + */ + String PAYMENT_FAILED = "payment_failed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment failed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the reference data of a Payment.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public PaymentReference getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment failed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the reference data of a Payment.

+ * @param payload value to be set + */ + + public void setPayload(final PaymentReference payload); + + /** + * factory method + * @return instance of PaymentFailed + */ + public static PaymentFailed of() { + return new PaymentFailedImpl(); + } + + /** + * factory method to create a shallow copy PaymentFailed + * @param template instance to be copied + * @return copy instance + */ + public static PaymentFailed of(final PaymentFailed template) { + PaymentFailedImpl instance = new PaymentFailedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentFailed copyDeep(); + + /** + * factory method to create a deep copy of PaymentFailed + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentFailed deepCopy(@Nullable final PaymentFailed template) { + if (template == null) { + return null; + } + PaymentFailedImpl instance = new PaymentFailedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(com.commercetools.checkout.models.payment.PaymentReference.deepCopy(template.getPayload())); + return instance; + } + + /** + * builder factory method for PaymentFailed + * @return builder + */ + public static PaymentFailedBuilder builder() { + return PaymentFailedBuilder.of(); + } + + /** + * create builder for PaymentFailed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentFailedBuilder builder(final PaymentFailed template) { + return PaymentFailedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentFailed(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailedBuilder.java new file mode 100644 index 00000000000..63420b8e251 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailedBuilder.java @@ -0,0 +1,182 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentFailedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentFailed paymentFailed = PaymentFailed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentFailedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private com.commercetools.checkout.models.payment.PaymentReference payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentFailedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment failed.

+ * @param message value to be set + * @return Builder + */ + + public PaymentFailedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentFailedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param builder function to build the payload value + * @return Builder + */ + + public PaymentFailedBuilder payload( + Function builder) { + this.payload = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()).build(); + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param builder function to build the payload value + * @return Builder + */ + + public PaymentFailedBuilder withPayload( + Function builder) { + this.payload = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()); + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentFailedBuilder payload(final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment failed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the reference data of a Payment.

+ * @return payload + */ + + public com.commercetools.checkout.models.payment.PaymentReference getPayload() { + return this.payload; + } + + /** + * builds PaymentFailed with checking for non-null required values + * @return PaymentFailed + */ + public PaymentFailed build() { + Objects.requireNonNull(severity, PaymentFailed.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentFailed.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentFailed.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentFailed.class + ": payload is missing"); + return new PaymentFailedImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentFailed without checking for non-null required values + * @return PaymentFailed + */ + public PaymentFailed buildUnchecked() { + return new PaymentFailedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentFailedBuilder + * @return builder + */ + public static PaymentFailedBuilder of() { + return new PaymentFailedBuilder(); + } + + /** + * create builder for PaymentFailed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentFailedBuilder of(final PaymentFailed template) { + PaymentFailedBuilder builder = new PaymentFailedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailedImpl.java new file mode 100644 index 00000000000..c7a7f4cf9b3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentFailedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the payment fails.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentFailedImpl implements PaymentFailed, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private com.commercetools.checkout.models.payment.PaymentReference payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentFailedImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_FAILED; + } + + /** + * create empty instance + */ + public PaymentFailedImpl() { + this.code = PAYMENT_FAILED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment failed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the reference data of a Payment.

+ */ + + public com.commercetools.checkout.models.payment.PaymentReference getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentFailedImpl that = (PaymentFailedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentFailed copyDeep() { + return PaymentFailed.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoaded.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoaded.java new file mode 100644 index 00000000000..889275e3291 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoaded.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the selected payment integration is loaded.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationLoaded paymentIntegrationLoaded = PaymentIntegrationLoaded.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integration_loaded") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationLoadedImpl.class) +public interface PaymentIntegrationLoaded extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationLoaded + */ + String PAYMENT_INTEGRATION_LOADED = "payment_integration_loaded"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integration loaded.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integration loaded.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationLoaded + */ + public static PaymentIntegrationLoaded of() { + return new PaymentIntegrationLoadedImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationLoaded + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationLoaded of(final PaymentIntegrationLoaded template) { + PaymentIntegrationLoadedImpl instance = new PaymentIntegrationLoadedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationLoaded copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationLoaded + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationLoaded deepCopy(@Nullable final PaymentIntegrationLoaded template) { + if (template == null) { + return null; + } + PaymentIntegrationLoadedImpl instance = new PaymentIntegrationLoadedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationLoaded + * @return builder + */ + public static PaymentIntegrationLoadedBuilder builder() { + return PaymentIntegrationLoadedBuilder.of(); + } + + /** + * create builder for PaymentIntegrationLoaded instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationLoadedBuilder builder(final PaymentIntegrationLoaded template) { + return PaymentIntegrationLoadedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationLoaded(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedBuilder.java new file mode 100644 index 00000000000..0588af70db5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationLoadedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationLoaded paymentIntegrationLoaded = PaymentIntegrationLoaded.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationLoadedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationLoadedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integration loaded.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationLoadedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationLoadedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationLoadedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration loaded.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationLoaded with checking for non-null required values + * @return PaymentIntegrationLoaded + */ + public PaymentIntegrationLoaded build() { + Objects.requireNonNull(severity, PaymentIntegrationLoaded.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationLoaded.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentIntegrationLoaded.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationLoaded.class + ": payload is missing"); + return new PaymentIntegrationLoadedImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationLoaded without checking for non-null required values + * @return PaymentIntegrationLoaded + */ + public PaymentIntegrationLoaded buildUnchecked() { + return new PaymentIntegrationLoadedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationLoadedBuilder + * @return builder + */ + public static PaymentIntegrationLoadedBuilder of() { + return new PaymentIntegrationLoadedBuilder(); + } + + /** + * create builder for PaymentIntegrationLoaded instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationLoadedBuilder of(final PaymentIntegrationLoaded template) { + PaymentIntegrationLoadedBuilder builder = new PaymentIntegrationLoadedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedImpl.java new file mode 100644 index 00000000000..f2f651c0301 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the selected payment integration is loaded.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationLoadedImpl implements PaymentIntegrationLoaded, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationLoadedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATION_LOADED; + } + + /** + * create empty instance + */ + public PaymentIntegrationLoadedImpl() { + this.code = PAYMENT_INTEGRATION_LOADED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration loaded.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and connectorId properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationLoadedImpl that = (PaymentIntegrationLoadedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationLoaded copyDeep() { + return PaymentIntegrationLoaded.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoading.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoading.java new file mode 100644 index 00000000000..a1bd3b5e23c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoading.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the selected payment integration is loading.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationLoading paymentIntegrationLoading = PaymentIntegrationLoading.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integration_loading") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationLoadingImpl.class) +public interface PaymentIntegrationLoading extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationLoading + */ + String PAYMENT_INTEGRATION_LOADING = "payment_integration_loading"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integration loading.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integration loading.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationLoading + */ + public static PaymentIntegrationLoading of() { + return new PaymentIntegrationLoadingImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationLoading + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationLoading of(final PaymentIntegrationLoading template) { + PaymentIntegrationLoadingImpl instance = new PaymentIntegrationLoadingImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationLoading copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationLoading + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationLoading deepCopy(@Nullable final PaymentIntegrationLoading template) { + if (template == null) { + return null; + } + PaymentIntegrationLoadingImpl instance = new PaymentIntegrationLoadingImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationLoading + * @return builder + */ + public static PaymentIntegrationLoadingBuilder builder() { + return PaymentIntegrationLoadingBuilder.of(); + } + + /** + * create builder for PaymentIntegrationLoading instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationLoadingBuilder builder(final PaymentIntegrationLoading template) { + return PaymentIntegrationLoadingBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationLoading(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingBuilder.java new file mode 100644 index 00000000000..ef080f99cb9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationLoadingBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationLoading paymentIntegrationLoading = PaymentIntegrationLoading.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationLoadingBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integration loading.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration loading.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and connectorId properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationLoading with checking for non-null required values + * @return PaymentIntegrationLoading + */ + public PaymentIntegrationLoading build() { + Objects.requireNonNull(severity, PaymentIntegrationLoading.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationLoading.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentIntegrationLoading.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationLoading.class + ": payload is missing"); + return new PaymentIntegrationLoadingImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationLoading without checking for non-null required values + * @return PaymentIntegrationLoading + */ + public PaymentIntegrationLoading buildUnchecked() { + return new PaymentIntegrationLoadingImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationLoadingBuilder + * @return builder + */ + public static PaymentIntegrationLoadingBuilder of() { + return new PaymentIntegrationLoadingBuilder(); + } + + /** + * create builder for PaymentIntegrationLoading instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationLoadingBuilder of(final PaymentIntegrationLoading template) { + PaymentIntegrationLoadingBuilder builder = new PaymentIntegrationLoadingBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingError.java new file mode 100644 index 00000000000..492a7ca739f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the loading of the selected payment integration fails.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationLoadingError paymentIntegrationLoadingError = PaymentIntegrationLoadingError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integration_loading_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationLoadingErrorImpl.class) +public interface PaymentIntegrationLoadingError extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationLoadingError + */ + String PAYMENT_INTEGRATION_LOADING_ERROR = "payment_integration_loading_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integration loading failed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains an error object and the integration object with the type and connectorId properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integration loading failed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains an error object and the integration object with the type and connectorId properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationLoadingError + */ + public static PaymentIntegrationLoadingError of() { + return new PaymentIntegrationLoadingErrorImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationLoadingError + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationLoadingError of(final PaymentIntegrationLoadingError template) { + PaymentIntegrationLoadingErrorImpl instance = new PaymentIntegrationLoadingErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationLoadingError copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationLoadingError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationLoadingError deepCopy(@Nullable final PaymentIntegrationLoadingError template) { + if (template == null) { + return null; + } + PaymentIntegrationLoadingErrorImpl instance = new PaymentIntegrationLoadingErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationLoadingError + * @return builder + */ + public static PaymentIntegrationLoadingErrorBuilder builder() { + return PaymentIntegrationLoadingErrorBuilder.of(); + } + + /** + * create builder for PaymentIntegrationLoadingError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationLoadingErrorBuilder builder(final PaymentIntegrationLoadingError template) { + return PaymentIntegrationLoadingErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationLoadingError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorBuilder.java new file mode 100644 index 00000000000..c9557ca7d82 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationLoadingErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationLoadingError paymentIntegrationLoadingError = PaymentIntegrationLoadingError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationLoadingErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integration loading failed.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains an error object and the integration object with the type and connectorId properties.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationLoadingErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration loading failed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains an error object and the integration object with the type and connectorId properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationLoadingError with checking for non-null required values + * @return PaymentIntegrationLoadingError + */ + public PaymentIntegrationLoadingError build() { + Objects.requireNonNull(severity, PaymentIntegrationLoadingError.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationLoadingError.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentIntegrationLoadingError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationLoadingError.class + ": payload is missing"); + return new PaymentIntegrationLoadingErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationLoadingError without checking for non-null required values + * @return PaymentIntegrationLoadingError + */ + public PaymentIntegrationLoadingError buildUnchecked() { + return new PaymentIntegrationLoadingErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationLoadingErrorBuilder + * @return builder + */ + public static PaymentIntegrationLoadingErrorBuilder of() { + return new PaymentIntegrationLoadingErrorBuilder(); + } + + /** + * create builder for PaymentIntegrationLoadingError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationLoadingErrorBuilder of(final PaymentIntegrationLoadingError template) { + PaymentIntegrationLoadingErrorBuilder builder = new PaymentIntegrationLoadingErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorImpl.java new file mode 100644 index 00000000000..6d223de410d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the loading of the selected payment integration fails.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationLoadingErrorImpl implements PaymentIntegrationLoadingError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationLoadingErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATION_LOADING_ERROR; + } + + /** + * create empty instance + */ + public PaymentIntegrationLoadingErrorImpl() { + this.code = PAYMENT_INTEGRATION_LOADING_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration loading failed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains an error object and the integration object with the type and connectorId properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationLoadingErrorImpl that = (PaymentIntegrationLoadingErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationLoadingError copyDeep() { + return PaymentIntegrationLoadingError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingImpl.java new file mode 100644 index 00000000000..17437e8584b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the selected payment integration is loading.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationLoadingImpl implements PaymentIntegrationLoading, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationLoadingImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATION_LOADING; + } + + /** + * create empty instance + */ + public PaymentIntegrationLoadingImpl() { + this.code = PAYMENT_INTEGRATION_LOADING; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration loading.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and connectorId properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationLoadingImpl that = (PaymentIntegrationLoadingImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationLoading copyDeep() { + return PaymentIntegrationLoading.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailable.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailable.java new file mode 100644 index 00000000000..2315991526e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailable.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when there is an error with the selected payment integration and the payment integration is unavailable.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationNotAvailable paymentIntegrationNotAvailable = PaymentIntegrationNotAvailable.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integration_not_available") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationNotAvailableImpl.class) +public interface PaymentIntegrationNotAvailable extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationNotAvailable + */ + String PAYMENT_INTEGRATION_NOT_AVAILABLE = "payment_integration_not_available"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`warn`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integration not available.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the method object with the type, id, and connectorId properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`warn`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integration not available.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the method object with the type, id, and connectorId properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationNotAvailable + */ + public static PaymentIntegrationNotAvailable of() { + return new PaymentIntegrationNotAvailableImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationNotAvailable + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationNotAvailable of(final PaymentIntegrationNotAvailable template) { + PaymentIntegrationNotAvailableImpl instance = new PaymentIntegrationNotAvailableImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationNotAvailable copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationNotAvailable + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationNotAvailable deepCopy(@Nullable final PaymentIntegrationNotAvailable template) { + if (template == null) { + return null; + } + PaymentIntegrationNotAvailableImpl instance = new PaymentIntegrationNotAvailableImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationNotAvailable + * @return builder + */ + public static PaymentIntegrationNotAvailableBuilder builder() { + return PaymentIntegrationNotAvailableBuilder.of(); + } + + /** + * create builder for PaymentIntegrationNotAvailable instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationNotAvailableBuilder builder(final PaymentIntegrationNotAvailable template) { + return PaymentIntegrationNotAvailableBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationNotAvailable(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableBuilder.java new file mode 100644 index 00000000000..2471458f7b6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationNotAvailableBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationNotAvailable paymentIntegrationNotAvailable = PaymentIntegrationNotAvailable.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationNotAvailableBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`warn`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationNotAvailableBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integration not available.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationNotAvailableBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationNotAvailableBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the method object with the type, id, and connectorId properties.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationNotAvailableBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`warn`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration not available.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the method object with the type, id, and connectorId properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationNotAvailable with checking for non-null required values + * @return PaymentIntegrationNotAvailable + */ + public PaymentIntegrationNotAvailable build() { + Objects.requireNonNull(severity, PaymentIntegrationNotAvailable.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationNotAvailable.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentIntegrationNotAvailable.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationNotAvailable.class + ": payload is missing"); + return new PaymentIntegrationNotAvailableImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationNotAvailable without checking for non-null required values + * @return PaymentIntegrationNotAvailable + */ + public PaymentIntegrationNotAvailable buildUnchecked() { + return new PaymentIntegrationNotAvailableImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationNotAvailableBuilder + * @return builder + */ + public static PaymentIntegrationNotAvailableBuilder of() { + return new PaymentIntegrationNotAvailableBuilder(); + } + + /** + * create builder for PaymentIntegrationNotAvailable instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationNotAvailableBuilder of(final PaymentIntegrationNotAvailable template) { + PaymentIntegrationNotAvailableBuilder builder = new PaymentIntegrationNotAvailableBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableImpl.java new file mode 100644 index 00000000000..8450516802b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when there is an error with the selected payment integration and the payment integration is unavailable.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationNotAvailableImpl implements PaymentIntegrationNotAvailable, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationNotAvailableImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATION_NOT_AVAILABLE; + } + + /** + * create empty instance + */ + public PaymentIntegrationNotAvailableImpl() { + this.code = PAYMENT_INTEGRATION_NOT_AVAILABLE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`warn`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration not available.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the method object with the type, id, and connectorId properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationNotAvailableImpl that = (PaymentIntegrationNotAvailableImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationNotAvailable copyDeep() { + return PaymentIntegrationNotAvailable.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelected.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelected.java new file mode 100644 index 00000000000..a35b9a819ef --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelected.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer selects the payment integration.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationSelected paymentIntegrationSelected = PaymentIntegrationSelected.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integration_selected") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationSelectedImpl.class) +public interface PaymentIntegrationSelected extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationSelected + */ + String PAYMENT_INTEGRATION_SELECTED = "payment_integration_selected"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integration selected.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integration selected.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationSelected + */ + public static PaymentIntegrationSelected of() { + return new PaymentIntegrationSelectedImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationSelected + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationSelected of(final PaymentIntegrationSelected template) { + PaymentIntegrationSelectedImpl instance = new PaymentIntegrationSelectedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationSelected copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationSelected + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationSelected deepCopy(@Nullable final PaymentIntegrationSelected template) { + if (template == null) { + return null; + } + PaymentIntegrationSelectedImpl instance = new PaymentIntegrationSelectedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationSelected + * @return builder + */ + public static PaymentIntegrationSelectedBuilder builder() { + return PaymentIntegrationSelectedBuilder.of(); + } + + /** + * create builder for PaymentIntegrationSelected instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationSelectedBuilder builder(final PaymentIntegrationSelected template) { + return PaymentIntegrationSelectedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationSelected(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedBuilder.java new file mode 100644 index 00000000000..90bbca5ddc4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationSelectedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationSelected paymentIntegrationSelected = PaymentIntegrationSelected.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationSelectedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationSelectedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integration selected.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationSelectedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationSelectedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationSelectedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration selected.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationSelected with checking for non-null required values + * @return PaymentIntegrationSelected + */ + public PaymentIntegrationSelected build() { + Objects.requireNonNull(severity, PaymentIntegrationSelected.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationSelected.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentIntegrationSelected.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationSelected.class + ": payload is missing"); + return new PaymentIntegrationSelectedImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationSelected without checking for non-null required values + * @return PaymentIntegrationSelected + */ + public PaymentIntegrationSelected buildUnchecked() { + return new PaymentIntegrationSelectedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationSelectedBuilder + * @return builder + */ + public static PaymentIntegrationSelectedBuilder of() { + return new PaymentIntegrationSelectedBuilder(); + } + + /** + * create builder for PaymentIntegrationSelected instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationSelectedBuilder of(final PaymentIntegrationSelected template) { + PaymentIntegrationSelectedBuilder builder = new PaymentIntegrationSelectedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedImpl.java new file mode 100644 index 00000000000..48cb8cee85a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer selects the payment integration.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationSelectedImpl implements PaymentIntegrationSelected, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationSelectedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATION_SELECTED; + } + + /** + * create empty instance + */ + public PaymentIntegrationSelectedImpl() { + this.code = PAYMENT_INTEGRATION_SELECTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration selected.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationSelectedImpl that = (PaymentIntegrationSelectedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationSelected copyDeep() { + return PaymentIntegrationSelected.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmation.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmation.java new file mode 100644 index 00000000000..1d70d2166ab --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmation.java @@ -0,0 +1,197 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer has entered the payment integration information and moves to the next step.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationSelectionConfirmation paymentIntegrationSelectionConfirmation = PaymentIntegrationSelectionConfirmation.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integration_selection_confirmation") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationSelectionConfirmationImpl.class) +public interface PaymentIntegrationSelectionConfirmation extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationSelectionConfirmation + */ + String PAYMENT_INTEGRATION_SELECTION_CONFIRMATION = "payment_integration_selection_confirmation"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integration selected.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integration selected.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationSelectionConfirmation + */ + public static PaymentIntegrationSelectionConfirmation of() { + return new PaymentIntegrationSelectionConfirmationImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationSelectionConfirmation + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationSelectionConfirmation of(final PaymentIntegrationSelectionConfirmation template) { + PaymentIntegrationSelectionConfirmationImpl instance = new PaymentIntegrationSelectionConfirmationImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationSelectionConfirmation copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationSelectionConfirmation + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationSelectionConfirmation deepCopy( + @Nullable final PaymentIntegrationSelectionConfirmation template) { + if (template == null) { + return null; + } + PaymentIntegrationSelectionConfirmationImpl instance = new PaymentIntegrationSelectionConfirmationImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationSelectionConfirmation + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationBuilder builder() { + return PaymentIntegrationSelectionConfirmationBuilder.of(); + } + + /** + * create builder for PaymentIntegrationSelectionConfirmation instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationBuilder builder( + final PaymentIntegrationSelectionConfirmation template) { + return PaymentIntegrationSelectionConfirmationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationSelectionConfirmation( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationBuilder.java new file mode 100644 index 00000000000..0ef03811a45 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationBuilder.java @@ -0,0 +1,160 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationSelectionConfirmationBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationSelectionConfirmation paymentIntegrationSelectionConfirmation = PaymentIntegrationSelectionConfirmation.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationSelectionConfirmationBuilder + implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integration selected.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration selected.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationSelectionConfirmation with checking for non-null required values + * @return PaymentIntegrationSelectionConfirmation + */ + public PaymentIntegrationSelectionConfirmation build() { + Objects.requireNonNull(severity, PaymentIntegrationSelectionConfirmation.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationSelectionConfirmation.class + ": message is missing"); + Objects.requireNonNull(correlationId, + PaymentIntegrationSelectionConfirmation.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationSelectionConfirmation.class + ": payload is missing"); + return new PaymentIntegrationSelectionConfirmationImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationSelectionConfirmation without checking for non-null required values + * @return PaymentIntegrationSelectionConfirmation + */ + public PaymentIntegrationSelectionConfirmation buildUnchecked() { + return new PaymentIntegrationSelectionConfirmationImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationSelectionConfirmationBuilder + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationBuilder of() { + return new PaymentIntegrationSelectionConfirmationBuilder(); + } + + /** + * create builder for PaymentIntegrationSelectionConfirmation instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationBuilder of( + final PaymentIntegrationSelectionConfirmation template) { + PaymentIntegrationSelectionConfirmationBuilder builder = new PaymentIntegrationSelectionConfirmationBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailed.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailed.java new file mode 100644 index 00000000000..914910dd64f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailed.java @@ -0,0 +1,198 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the selection of the payment integration by the customer is not successful.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationSelectionConfirmationFailed paymentIntegrationSelectionConfirmationFailed = PaymentIntegrationSelectionConfirmationFailed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integration_selection_confirmation_failed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationSelectionConfirmationFailedImpl.class) +public interface PaymentIntegrationSelectionConfirmationFailed extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationSelectionConfirmationFailed + */ + String PAYMENT_INTEGRATION_SELECTION_CONFIRMATION_FAILED = "payment_integration_selection_confirmation_failed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integration selection failed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the integration object with the type property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integration selection failed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the integration object with the type property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationSelectionConfirmationFailed + */ + public static PaymentIntegrationSelectionConfirmationFailed of() { + return new PaymentIntegrationSelectionConfirmationFailedImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationSelectionConfirmationFailed + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationSelectionConfirmationFailed of( + final PaymentIntegrationSelectionConfirmationFailed template) { + PaymentIntegrationSelectionConfirmationFailedImpl instance = new PaymentIntegrationSelectionConfirmationFailedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationSelectionConfirmationFailed copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationSelectionConfirmationFailed + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationSelectionConfirmationFailed deepCopy( + @Nullable final PaymentIntegrationSelectionConfirmationFailed template) { + if (template == null) { + return null; + } + PaymentIntegrationSelectionConfirmationFailedImpl instance = new PaymentIntegrationSelectionConfirmationFailedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationSelectionConfirmationFailed + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationFailedBuilder builder() { + return PaymentIntegrationSelectionConfirmationFailedBuilder.of(); + } + + /** + * create builder for PaymentIntegrationSelectionConfirmationFailed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationFailedBuilder builder( + final PaymentIntegrationSelectionConfirmationFailed template) { + return PaymentIntegrationSelectionConfirmationFailedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationSelectionConfirmationFailed( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedBuilder.java new file mode 100644 index 00000000000..6288a8b3c24 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedBuilder.java @@ -0,0 +1,160 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationSelectionConfirmationFailedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationSelectionConfirmationFailed paymentIntegrationSelectionConfirmationFailed = PaymentIntegrationSelectionConfirmationFailed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationSelectionConfirmationFailedBuilder + implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationFailedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integration selection failed.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationFailedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationFailedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the integration object with the type property.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationSelectionConfirmationFailedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration selection failed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationSelectionConfirmationFailed with checking for non-null required values + * @return PaymentIntegrationSelectionConfirmationFailed + */ + public PaymentIntegrationSelectionConfirmationFailed build() { + Objects.requireNonNull(severity, PaymentIntegrationSelectionConfirmationFailed.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationSelectionConfirmationFailed.class + ": message is missing"); + Objects.requireNonNull(correlationId, + PaymentIntegrationSelectionConfirmationFailed.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationSelectionConfirmationFailed.class + ": payload is missing"); + return new PaymentIntegrationSelectionConfirmationFailedImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationSelectionConfirmationFailed without checking for non-null required values + * @return PaymentIntegrationSelectionConfirmationFailed + */ + public PaymentIntegrationSelectionConfirmationFailed buildUnchecked() { + return new PaymentIntegrationSelectionConfirmationFailedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationSelectionConfirmationFailedBuilder + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationFailedBuilder of() { + return new PaymentIntegrationSelectionConfirmationFailedBuilder(); + } + + /** + * create builder for PaymentIntegrationSelectionConfirmationFailed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationSelectionConfirmationFailedBuilder of( + final PaymentIntegrationSelectionConfirmationFailed template) { + PaymentIntegrationSelectionConfirmationFailedBuilder builder = new PaymentIntegrationSelectionConfirmationFailedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedImpl.java new file mode 100644 index 00000000000..2be381f6ed1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedImpl.java @@ -0,0 +1,160 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the selection of the payment integration by the customer is not successful.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationSelectionConfirmationFailedImpl + implements PaymentIntegrationSelectionConfirmationFailed, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationSelectionConfirmationFailedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATION_SELECTION_CONFIRMATION_FAILED; + } + + /** + * create empty instance + */ + public PaymentIntegrationSelectionConfirmationFailedImpl() { + this.code = PAYMENT_INTEGRATION_SELECTION_CONFIRMATION_FAILED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration selection failed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationSelectionConfirmationFailedImpl that = (PaymentIntegrationSelectionConfirmationFailedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationSelectionConfirmationFailed copyDeep() { + return PaymentIntegrationSelectionConfirmationFailed.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationImpl.java new file mode 100644 index 00000000000..2d78869cd04 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer has entered the payment integration information and moves to the next step.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationSelectionConfirmationImpl implements PaymentIntegrationSelectionConfirmation, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationSelectionConfirmationImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATION_SELECTION_CONFIRMATION; + } + + /** + * create empty instance + */ + public PaymentIntegrationSelectionConfirmationImpl() { + this.code = PAYMENT_INTEGRATION_SELECTION_CONFIRMATION; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integration selected.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type and hasVendorButton properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationSelectionConfirmationImpl that = (PaymentIntegrationSelectionConfirmationImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationSelectionConfirmation copyDeep() { + return PaymentIntegrationSelectionConfirmation.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceived.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceived.java new file mode 100644 index 00000000000..569c48bdc07 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceived.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when Checkout receives and loads the payment integrations configured for the Application.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationsReceived paymentIntegrationsReceived = PaymentIntegrationsReceived.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_integrations_received") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationsReceivedImpl.class) +public interface PaymentIntegrationsReceived extends ResponseMessage { + + /** + * discriminator value for PaymentIntegrationsReceived + */ + String PAYMENT_INTEGRATIONS_RECEIVED = "payment_integrations_received"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment integrations received.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the paymentIntegrations array of objects with the type and connectorId properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment integrations received.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the paymentIntegrations array of objects with the type and connectorId properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentIntegrationsReceived + */ + public static PaymentIntegrationsReceived of() { + return new PaymentIntegrationsReceivedImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationsReceived + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationsReceived of(final PaymentIntegrationsReceived template) { + PaymentIntegrationsReceivedImpl instance = new PaymentIntegrationsReceivedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentIntegrationsReceived copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationsReceived + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationsReceived deepCopy(@Nullable final PaymentIntegrationsReceived template) { + if (template == null) { + return null; + } + PaymentIntegrationsReceivedImpl instance = new PaymentIntegrationsReceivedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentIntegrationsReceived + * @return builder + */ + public static PaymentIntegrationsReceivedBuilder builder() { + return PaymentIntegrationsReceivedBuilder.of(); + } + + /** + * create builder for PaymentIntegrationsReceived instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationsReceivedBuilder builder(final PaymentIntegrationsReceived template) { + return PaymentIntegrationsReceivedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationsReceived(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedBuilder.java new file mode 100644 index 00000000000..242ef40af4c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationsReceivedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentIntegrationsReceived paymentIntegrationsReceived = PaymentIntegrationsReceived.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationsReceivedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentIntegrationsReceivedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment integrations received.

+ * @param message value to be set + * @return Builder + */ + + public PaymentIntegrationsReceivedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentIntegrationsReceivedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the paymentIntegrations array of objects with the type and connectorId properties.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentIntegrationsReceivedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integrations received.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the paymentIntegrations array of objects with the type and connectorId properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentIntegrationsReceived with checking for non-null required values + * @return PaymentIntegrationsReceived + */ + public PaymentIntegrationsReceived build() { + Objects.requireNonNull(severity, PaymentIntegrationsReceived.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentIntegrationsReceived.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentIntegrationsReceived.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentIntegrationsReceived.class + ": payload is missing"); + return new PaymentIntegrationsReceivedImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentIntegrationsReceived without checking for non-null required values + * @return PaymentIntegrationsReceived + */ + public PaymentIntegrationsReceived buildUnchecked() { + return new PaymentIntegrationsReceivedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentIntegrationsReceivedBuilder + * @return builder + */ + public static PaymentIntegrationsReceivedBuilder of() { + return new PaymentIntegrationsReceivedBuilder(); + } + + /** + * create builder for PaymentIntegrationsReceived instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationsReceivedBuilder of(final PaymentIntegrationsReceived template) { + PaymentIntegrationsReceivedBuilder builder = new PaymentIntegrationsReceivedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedImpl.java new file mode 100644 index 00000000000..011e6eb8ac6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when Checkout receives and loads the payment integrations configured for the Application.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationsReceivedImpl implements PaymentIntegrationsReceived, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationsReceivedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_INTEGRATIONS_RECEIVED; + } + + /** + * create empty instance + */ + public PaymentIntegrationsReceivedImpl() { + this.code = PAYMENT_INTEGRATIONS_RECEIVED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment integrations received.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the paymentIntegrations array of objects with the type and connectorId properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationsReceivedImpl that = (PaymentIntegrationsReceivedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentIntegrationsReceived copyDeep() { + return PaymentIntegrationsReceived.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStarted.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStarted.java new file mode 100644 index 00000000000..6e740d43811 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStarted.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the payment starts.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentStarted paymentStarted = PaymentStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_started") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentStartedImpl.class) +public interface PaymentStarted extends ResponseMessage { + + /** + * discriminator value for PaymentStarted + */ + String PAYMENT_STARTED = "payment_started"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment started.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the integration object with the type property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment started.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the integration object with the type property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of PaymentStarted + */ + public static PaymentStarted of() { + return new PaymentStartedImpl(); + } + + /** + * factory method to create a shallow copy PaymentStarted + * @param template instance to be copied + * @return copy instance + */ + public static PaymentStarted of(final PaymentStarted template) { + PaymentStartedImpl instance = new PaymentStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentStarted copyDeep(); + + /** + * factory method to create a deep copy of PaymentStarted + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentStarted deepCopy(@Nullable final PaymentStarted template) { + if (template == null) { + return null; + } + PaymentStartedImpl instance = new PaymentStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for PaymentStarted + * @return builder + */ + public static PaymentStartedBuilder builder() { + return PaymentStartedBuilder.of(); + } + + /** + * create builder for PaymentStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentStartedBuilder builder(final PaymentStarted template) { + return PaymentStartedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentStarted(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStartedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStartedBuilder.java new file mode 100644 index 00000000000..0f54b7fe45a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStartedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentStartedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentStarted paymentStarted = PaymentStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentStartedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentStartedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment started.

+ * @param message value to be set + * @return Builder + */ + + public PaymentStartedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentStartedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the integration object with the type property.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentStartedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment started.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds PaymentStarted with checking for non-null required values + * @return PaymentStarted + */ + public PaymentStarted build() { + Objects.requireNonNull(severity, PaymentStarted.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentStarted.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentStarted.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentStarted.class + ": payload is missing"); + return new PaymentStartedImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentStarted without checking for non-null required values + * @return PaymentStarted + */ + public PaymentStarted buildUnchecked() { + return new PaymentStartedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentStartedBuilder + * @return builder + */ + public static PaymentStartedBuilder of() { + return new PaymentStartedBuilder(); + } + + /** + * create builder for PaymentStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentStartedBuilder of(final PaymentStarted template) { + PaymentStartedBuilder builder = new PaymentStartedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStartedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStartedImpl.java new file mode 100644 index 00000000000..aa56e73fe76 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentStartedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the payment starts.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentStartedImpl implements PaymentStarted, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentStartedImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_STARTED; + } + + /** + * create empty instance + */ + public PaymentStartedImpl() { + this.code = PAYMENT_STARTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment started.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the integration object with the type property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentStartedImpl that = (PaymentStartedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentStarted copyDeep() { + return PaymentStarted.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailed.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailed.java new file mode 100644 index 00000000000..c467f719927 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailed.java @@ -0,0 +1,195 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.payment.PaymentReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when Checkout and the payment service provider (PSP) do not validate the payment information entered by the customer.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentValidationFailed paymentValidationFailed = PaymentValidationFailed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_validation_failed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentValidationFailedImpl.class) +public interface PaymentValidationFailed extends ResponseMessage { + + /** + * discriminator value for PaymentValidationFailed + */ + String PAYMENT_VALIDATION_FAILED = "payment_validation_failed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment validation failed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the reference data of a Payment.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public PaymentReference getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment validation failed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the reference data of a Payment.

+ * @param payload value to be set + */ + + public void setPayload(final PaymentReference payload); + + /** + * factory method + * @return instance of PaymentValidationFailed + */ + public static PaymentValidationFailed of() { + return new PaymentValidationFailedImpl(); + } + + /** + * factory method to create a shallow copy PaymentValidationFailed + * @param template instance to be copied + * @return copy instance + */ + public static PaymentValidationFailed of(final PaymentValidationFailed template) { + PaymentValidationFailedImpl instance = new PaymentValidationFailedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public PaymentValidationFailed copyDeep(); + + /** + * factory method to create a deep copy of PaymentValidationFailed + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentValidationFailed deepCopy(@Nullable final PaymentValidationFailed template) { + if (template == null) { + return null; + } + PaymentValidationFailedImpl instance = new PaymentValidationFailedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(com.commercetools.checkout.models.payment.PaymentReference.deepCopy(template.getPayload())); + return instance; + } + + /** + * builder factory method for PaymentValidationFailed + * @return builder + */ + public static PaymentValidationFailedBuilder builder() { + return PaymentValidationFailedBuilder.of(); + } + + /** + * create builder for PaymentValidationFailed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentValidationFailedBuilder builder(final PaymentValidationFailed template) { + return PaymentValidationFailedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentValidationFailed(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedBuilder.java new file mode 100644 index 00000000000..7cd8a74d5f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedBuilder.java @@ -0,0 +1,183 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentValidationFailedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentValidationFailed paymentValidationFailed = PaymentValidationFailed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentValidationFailedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private com.commercetools.checkout.models.payment.PaymentReference payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentValidationFailedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment validation failed.

+ * @param message value to be set + * @return Builder + */ + + public PaymentValidationFailedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentValidationFailedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param builder function to build the payload value + * @return Builder + */ + + public PaymentValidationFailedBuilder payload( + Function builder) { + this.payload = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()).build(); + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param builder function to build the payload value + * @return Builder + */ + + public PaymentValidationFailedBuilder withPayload( + Function builder) { + this.payload = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()); + return this; + } + + /** + *

Contains the reference data of a Payment.

+ * @param payload value to be set + * @return Builder + */ + + public PaymentValidationFailedBuilder payload( + final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment validation failed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the reference data of a Payment.

+ * @return payload + */ + + public com.commercetools.checkout.models.payment.PaymentReference getPayload() { + return this.payload; + } + + /** + * builds PaymentValidationFailed with checking for non-null required values + * @return PaymentValidationFailed + */ + public PaymentValidationFailed build() { + Objects.requireNonNull(severity, PaymentValidationFailed.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentValidationFailed.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentValidationFailed.class + ": correlationId is missing"); + Objects.requireNonNull(payload, PaymentValidationFailed.class + ": payload is missing"); + return new PaymentValidationFailedImpl(severity, message, correlationId, payload); + } + + /** + * builds PaymentValidationFailed without checking for non-null required values + * @return PaymentValidationFailed + */ + public PaymentValidationFailed buildUnchecked() { + return new PaymentValidationFailedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of PaymentValidationFailedBuilder + * @return builder + */ + public static PaymentValidationFailedBuilder of() { + return new PaymentValidationFailedBuilder(); + } + + /** + * create builder for PaymentValidationFailed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentValidationFailedBuilder of(final PaymentValidationFailed template) { + PaymentValidationFailedBuilder builder = new PaymentValidationFailedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedImpl.java new file mode 100644 index 00000000000..c0c35eea7f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when Checkout and the payment service provider (PSP) do not validate the payment information entered by the customer.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentValidationFailedImpl implements PaymentValidationFailed, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private com.commercetools.checkout.models.payment.PaymentReference payload; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentValidationFailedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PAYMENT_VALIDATION_FAILED; + } + + /** + * create empty instance + */ + public PaymentValidationFailedImpl() { + this.code = PAYMENT_VALIDATION_FAILED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment validation failed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the reference data of a Payment.

+ */ + + public com.commercetools.checkout.models.payment.PaymentReference getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final com.commercetools.checkout.models.payment.PaymentReference payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentValidationFailedImpl that = (PaymentValidationFailedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public PaymentValidationFailed copyDeep() { + return PaymentValidationFailed.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassed.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassed.java new file mode 100644 index 00000000000..d20107a2787 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassed.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when Checkout and the payment service provider (PSP) validate the payment information entered by the customer.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentValidationPassed paymentValidationPassed = PaymentValidationPassed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_validation_passed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentValidationPassedImpl.class) +public interface PaymentValidationPassed extends Message { + + /** + * discriminator value for PaymentValidationPassed + */ + String PAYMENT_VALIDATION_PASSED = "payment_validation_passed"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment validation passed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment validation passed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of PaymentValidationPassed + */ + public static PaymentValidationPassed of() { + return new PaymentValidationPassedImpl(); + } + + /** + * factory method to create a shallow copy PaymentValidationPassed + * @param template instance to be copied + * @return copy instance + */ + public static PaymentValidationPassed of(final PaymentValidationPassed template) { + PaymentValidationPassedImpl instance = new PaymentValidationPassedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public PaymentValidationPassed copyDeep(); + + /** + * factory method to create a deep copy of PaymentValidationPassed + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentValidationPassed deepCopy(@Nullable final PaymentValidationPassed template) { + if (template == null) { + return null; + } + PaymentValidationPassedImpl instance = new PaymentValidationPassedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for PaymentValidationPassed + * @return builder + */ + public static PaymentValidationPassedBuilder builder() { + return PaymentValidationPassedBuilder.of(); + } + + /** + * create builder for PaymentValidationPassed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentValidationPassedBuilder builder(final PaymentValidationPassed template) { + return PaymentValidationPassedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentValidationPassed(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedBuilder.java new file mode 100644 index 00000000000..39a3346a807 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentValidationPassedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentValidationPassed paymentValidationPassed = PaymentValidationPassed.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentValidationPassedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentValidationPassedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment validation passed.

+ * @param message value to be set + * @return Builder + */ + + public PaymentValidationPassedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentValidationPassedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment validation passed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds PaymentValidationPassed with checking for non-null required values + * @return PaymentValidationPassed + */ + public PaymentValidationPassed build() { + Objects.requireNonNull(severity, PaymentValidationPassed.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentValidationPassed.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentValidationPassed.class + ": correlationId is missing"); + return new PaymentValidationPassedImpl(severity, message, correlationId); + } + + /** + * builds PaymentValidationPassed without checking for non-null required values + * @return PaymentValidationPassed + */ + public PaymentValidationPassed buildUnchecked() { + return new PaymentValidationPassedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of PaymentValidationPassedBuilder + * @return builder + */ + public static PaymentValidationPassedBuilder of() { + return new PaymentValidationPassedBuilder(); + } + + /** + * create builder for PaymentValidationPassed instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentValidationPassedBuilder of(final PaymentValidationPassed template) { + PaymentValidationPassedBuilder builder = new PaymentValidationPassedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedImpl.java new file mode 100644 index 00000000000..4bf5377bd42 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when Checkout and the payment service provider (PSP) validate the payment information entered by the customer.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentValidationPassedImpl implements PaymentValidationPassed, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentValidationPassedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = PAYMENT_VALIDATION_PASSED; + } + + /** + * create empty instance + */ + public PaymentValidationPassedImpl() { + this.code = PAYMENT_VALIDATION_PASSED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment validation passed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentValidationPassedImpl that = (PaymentValidationPassedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public PaymentValidationPassed copyDeep() { + return PaymentValidationPassed.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStarted.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStarted.java new file mode 100644 index 00000000000..f03c125f5c6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStarted.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the validation of the payment information entered by the customer starts.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentValidationStarted paymentValidationStarted = PaymentValidationStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("payment_validation_started") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentValidationStartedImpl.class) +public interface PaymentValidationStarted extends Message { + + /** + * discriminator value for PaymentValidationStarted + */ + String PAYMENT_VALIDATION_STARTED = "payment_validation_started"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Payment validation started.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Payment validation started.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of PaymentValidationStarted + */ + public static PaymentValidationStarted of() { + return new PaymentValidationStartedImpl(); + } + + /** + * factory method to create a shallow copy PaymentValidationStarted + * @param template instance to be copied + * @return copy instance + */ + public static PaymentValidationStarted of(final PaymentValidationStarted template) { + PaymentValidationStartedImpl instance = new PaymentValidationStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public PaymentValidationStarted copyDeep(); + + /** + * factory method to create a deep copy of PaymentValidationStarted + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentValidationStarted deepCopy(@Nullable final PaymentValidationStarted template) { + if (template == null) { + return null; + } + PaymentValidationStartedImpl instance = new PaymentValidationStartedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for PaymentValidationStarted + * @return builder + */ + public static PaymentValidationStartedBuilder builder() { + return PaymentValidationStartedBuilder.of(); + } + + /** + * create builder for PaymentValidationStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentValidationStartedBuilder builder(final PaymentValidationStarted template) { + return PaymentValidationStartedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentValidationStarted(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedBuilder.java new file mode 100644 index 00000000000..0c51d7f0ceb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentValidationStartedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     PaymentValidationStarted paymentValidationStarted = PaymentValidationStarted.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentValidationStartedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public PaymentValidationStartedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Payment validation started.

+ * @param message value to be set + * @return Builder + */ + + public PaymentValidationStartedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public PaymentValidationStartedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment validation started.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds PaymentValidationStarted with checking for non-null required values + * @return PaymentValidationStarted + */ + public PaymentValidationStarted build() { + Objects.requireNonNull(severity, PaymentValidationStarted.class + ": severity is missing"); + Objects.requireNonNull(message, PaymentValidationStarted.class + ": message is missing"); + Objects.requireNonNull(correlationId, PaymentValidationStarted.class + ": correlationId is missing"); + return new PaymentValidationStartedImpl(severity, message, correlationId); + } + + /** + * builds PaymentValidationStarted without checking for non-null required values + * @return PaymentValidationStarted + */ + public PaymentValidationStarted buildUnchecked() { + return new PaymentValidationStartedImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of PaymentValidationStartedBuilder + * @return builder + */ + public static PaymentValidationStartedBuilder of() { + return new PaymentValidationStartedBuilder(); + } + + /** + * create builder for PaymentValidationStarted instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentValidationStartedBuilder of(final PaymentValidationStarted template) { + PaymentValidationStartedBuilder builder = new PaymentValidationStartedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedImpl.java new file mode 100644 index 00000000000..bbd8e6af873 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the validation of the payment information entered by the customer starts.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentValidationStartedImpl implements PaymentValidationStarted, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentValidationStartedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = PAYMENT_VALIDATION_STARTED; + } + + /** + * create empty instance + */ + public PaymentValidationStartedImpl() { + this.code = PAYMENT_VALIDATION_STARTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Payment validation started.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentValidationStartedImpl that = (PaymentValidationStartedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public PaymentValidationStarted copyDeep() { + return PaymentValidationStarted.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivated.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivated.java new file mode 100644 index 00000000000..2cf3f76b723 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivated.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Checkout projectKey is deactivated and cannot be initialized. To activate it, contact the Checkout support team.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProjectIsDeactivated projectIsDeactivated = ProjectIsDeactivated.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("project_deactivated") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProjectIsDeactivatedImpl.class) +public interface ProjectIsDeactivated extends ResponseMessage { + + /** + * discriminator value for ProjectIsDeactivated + */ + String PROJECT_DEACTIVATED = "project_deactivated"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Project {projectKey} is deactivated.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the project object with the key property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Project {projectKey} is deactivated.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the project object with the key property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of ProjectIsDeactivated + */ + public static ProjectIsDeactivated of() { + return new ProjectIsDeactivatedImpl(); + } + + /** + * factory method to create a shallow copy ProjectIsDeactivated + * @param template instance to be copied + * @return copy instance + */ + public static ProjectIsDeactivated of(final ProjectIsDeactivated template) { + ProjectIsDeactivatedImpl instance = new ProjectIsDeactivatedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public ProjectIsDeactivated copyDeep(); + + /** + * factory method to create a deep copy of ProjectIsDeactivated + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProjectIsDeactivated deepCopy(@Nullable final ProjectIsDeactivated template) { + if (template == null) { + return null; + } + ProjectIsDeactivatedImpl instance = new ProjectIsDeactivatedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for ProjectIsDeactivated + * @return builder + */ + public static ProjectIsDeactivatedBuilder builder() { + return ProjectIsDeactivatedBuilder.of(); + } + + /** + * create builder for ProjectIsDeactivated instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProjectIsDeactivatedBuilder builder(final ProjectIsDeactivated template) { + return ProjectIsDeactivatedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProjectIsDeactivated(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedBuilder.java new file mode 100644 index 00000000000..37ab9363178 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProjectIsDeactivatedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProjectIsDeactivated projectIsDeactivated = ProjectIsDeactivated.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProjectIsDeactivatedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public ProjectIsDeactivatedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Project {projectKey} is deactivated.

+ * @param message value to be set + * @return Builder + */ + + public ProjectIsDeactivatedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ProjectIsDeactivatedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the project object with the key property.

+ * @param payload value to be set + * @return Builder + */ + + public ProjectIsDeactivatedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Project {projectKey} is deactivated.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the project object with the key property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds ProjectIsDeactivated with checking for non-null required values + * @return ProjectIsDeactivated + */ + public ProjectIsDeactivated build() { + Objects.requireNonNull(severity, ProjectIsDeactivated.class + ": severity is missing"); + Objects.requireNonNull(message, ProjectIsDeactivated.class + ": message is missing"); + Objects.requireNonNull(correlationId, ProjectIsDeactivated.class + ": correlationId is missing"); + Objects.requireNonNull(payload, ProjectIsDeactivated.class + ": payload is missing"); + return new ProjectIsDeactivatedImpl(severity, message, correlationId, payload); + } + + /** + * builds ProjectIsDeactivated without checking for non-null required values + * @return ProjectIsDeactivated + */ + public ProjectIsDeactivated buildUnchecked() { + return new ProjectIsDeactivatedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of ProjectIsDeactivatedBuilder + * @return builder + */ + public static ProjectIsDeactivatedBuilder of() { + return new ProjectIsDeactivatedBuilder(); + } + + /** + * create builder for ProjectIsDeactivated instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProjectIsDeactivatedBuilder of(final ProjectIsDeactivated template) { + ProjectIsDeactivatedBuilder builder = new ProjectIsDeactivatedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedImpl.java new file mode 100644 index 00000000000..bbe4461d8f3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Checkout projectKey is deactivated and cannot be initialized. To activate it, contact the Checkout support team.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProjectIsDeactivatedImpl implements ProjectIsDeactivated, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + ProjectIsDeactivatedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = PROJECT_DEACTIVATED; + } + + /** + * create empty instance + */ + public ProjectIsDeactivatedImpl() { + this.code = PROJECT_DEACTIVATED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Project {projectKey} is deactivated.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the project object with the key property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProjectIsDeactivatedImpl that = (ProjectIsDeactivatedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public ProjectIsDeactivated copyDeep() { + return ProjectIsDeactivated.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeError.java new file mode 100644 index 00000000000..2c7ed90a938 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when there was an error removing the Discount Code.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RemoveDiscountCodeError removeDiscountCodeError = RemoveDiscountCodeError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("remove_discount_code_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveDiscountCodeErrorImpl.class) +public interface RemoveDiscountCodeError extends ResponseMessage { + + /** + * discriminator value for RemoveDiscountCodeError + */ + String REMOVE_DISCOUNT_CODE_ERROR = "remove_discount_code_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Error removing discount code.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the error object.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Error removing discount code.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the error object.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of RemoveDiscountCodeError + */ + public static RemoveDiscountCodeError of() { + return new RemoveDiscountCodeErrorImpl(); + } + + /** + * factory method to create a shallow copy RemoveDiscountCodeError + * @param template instance to be copied + * @return copy instance + */ + public static RemoveDiscountCodeError of(final RemoveDiscountCodeError template) { + RemoveDiscountCodeErrorImpl instance = new RemoveDiscountCodeErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public RemoveDiscountCodeError copyDeep(); + + /** + * factory method to create a deep copy of RemoveDiscountCodeError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveDiscountCodeError deepCopy(@Nullable final RemoveDiscountCodeError template) { + if (template == null) { + return null; + } + RemoveDiscountCodeErrorImpl instance = new RemoveDiscountCodeErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for RemoveDiscountCodeError + * @return builder + */ + public static RemoveDiscountCodeErrorBuilder builder() { + return RemoveDiscountCodeErrorBuilder.of(); + } + + /** + * create builder for RemoveDiscountCodeError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveDiscountCodeErrorBuilder builder(final RemoveDiscountCodeError template) { + return RemoveDiscountCodeErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveDiscountCodeError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorBuilder.java new file mode 100644 index 00000000000..d6b32c561e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RemoveDiscountCodeErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RemoveDiscountCodeError removeDiscountCodeError = RemoveDiscountCodeError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveDiscountCodeErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public RemoveDiscountCodeErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Error removing discount code.

+ * @param message value to be set + * @return Builder + */ + + public RemoveDiscountCodeErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public RemoveDiscountCodeErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the error object.

+ * @param payload value to be set + * @return Builder + */ + + public RemoveDiscountCodeErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error removing discount code.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the error object.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds RemoveDiscountCodeError with checking for non-null required values + * @return RemoveDiscountCodeError + */ + public RemoveDiscountCodeError build() { + Objects.requireNonNull(severity, RemoveDiscountCodeError.class + ": severity is missing"); + Objects.requireNonNull(message, RemoveDiscountCodeError.class + ": message is missing"); + Objects.requireNonNull(correlationId, RemoveDiscountCodeError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, RemoveDiscountCodeError.class + ": payload is missing"); + return new RemoveDiscountCodeErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds RemoveDiscountCodeError without checking for non-null required values + * @return RemoveDiscountCodeError + */ + public RemoveDiscountCodeError buildUnchecked() { + return new RemoveDiscountCodeErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of RemoveDiscountCodeErrorBuilder + * @return builder + */ + public static RemoveDiscountCodeErrorBuilder of() { + return new RemoveDiscountCodeErrorBuilder(); + } + + /** + * create builder for RemoveDiscountCodeError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveDiscountCodeErrorBuilder of(final RemoveDiscountCodeError template) { + RemoveDiscountCodeErrorBuilder builder = new RemoveDiscountCodeErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorImpl.java new file mode 100644 index 00000000000..f1ff2a8f67d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when there was an error removing the Discount Code.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveDiscountCodeErrorImpl implements RemoveDiscountCodeError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + RemoveDiscountCodeErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = REMOVE_DISCOUNT_CODE_ERROR; + } + + /** + * create empty instance + */ + public RemoveDiscountCodeErrorImpl() { + this.code = REMOVE_DISCOUNT_CODE_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error removing discount code.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the error object.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveDiscountCodeErrorImpl that = (RemoveDiscountCodeErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public RemoveDiscountCodeError copyDeep() { + return RemoveDiscountCodeError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ResponseMessage.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ResponseMessage.java new file mode 100644 index 00000000000..96d756e5d30 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ResponseMessage.java @@ -0,0 +1,95 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * ResponseMessage + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ResponseMessage responseMessage = ResponseMessage.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ResponseMessage extends Message { + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + public ResponseMessage copyDeep(); + + /** + * factory method to create a deep copy of ResponseMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ResponseMessage deepCopy(@Nullable final ResponseMessage template) { + if (template == null) { + return null; + } + + if (!(template instanceof ResponseMessageImpl)) { + return template.copyDeep(); + } + ResponseMessageImpl instance = new ResponseMessageImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withResponseMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ResponseMessageImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ResponseMessageImpl.java new file mode 100644 index 00000000000..a0d1c54c341 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ResponseMessageImpl.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ResponseMessage + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ResponseMessageImpl implements ResponseMessage, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + ResponseMessageImpl(@JsonProperty("code") final String code, @JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.code = code; + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + } + + /** + * create empty instance + */ + public ResponseMessageImpl() { + } + + /** + *

Message code for the event.

+ */ + + public String getCode() { + return this.code; + } + + /** + *

Severity level of the event. Can be info, warn, or error.

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Human-readable description of the event.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ResponseMessageImpl that = (ResponseMessageImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public ResponseMessage copyDeep() { + return ResponseMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressError.java new file mode 100644 index 00000000000..677ba5ca09d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the Cart cannot be updated with the shipping address.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SetShippingAddressError setShippingAddressError = SetShippingAddressError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("set_shipping_address_error") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetShippingAddressErrorImpl.class) +public interface SetShippingAddressError extends ResponseMessage { + + /** + * discriminator value for SetShippingAddressError + */ + String SET_SHIPPING_ADDRESS_ERROR = "set_shipping_address_error"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Error setting shipping address.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the errors array of objects, with the related code and message properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Error setting shipping address.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the errors array of objects, with the related code and message properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of SetShippingAddressError + */ + public static SetShippingAddressError of() { + return new SetShippingAddressErrorImpl(); + } + + /** + * factory method to create a shallow copy SetShippingAddressError + * @param template instance to be copied + * @return copy instance + */ + public static SetShippingAddressError of(final SetShippingAddressError template) { + SetShippingAddressErrorImpl instance = new SetShippingAddressErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public SetShippingAddressError copyDeep(); + + /** + * factory method to create a deep copy of SetShippingAddressError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetShippingAddressError deepCopy(@Nullable final SetShippingAddressError template) { + if (template == null) { + return null; + } + SetShippingAddressErrorImpl instance = new SetShippingAddressErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for SetShippingAddressError + * @return builder + */ + public static SetShippingAddressErrorBuilder builder() { + return SetShippingAddressErrorBuilder.of(); + } + + /** + * create builder for SetShippingAddressError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingAddressErrorBuilder builder(final SetShippingAddressError template) { + return SetShippingAddressErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetShippingAddressError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorBuilder.java new file mode 100644 index 00000000000..7e10f104c0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetShippingAddressErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SetShippingAddressError setShippingAddressError = SetShippingAddressError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetShippingAddressErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public SetShippingAddressErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Error setting shipping address.

+ * @param message value to be set + * @return Builder + */ + + public SetShippingAddressErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public SetShippingAddressErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the errors array of objects, with the related code and message properties.

+ * @param payload value to be set + * @return Builder + */ + + public SetShippingAddressErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error setting shipping address.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the errors array of objects, with the related code and message properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds SetShippingAddressError with checking for non-null required values + * @return SetShippingAddressError + */ + public SetShippingAddressError build() { + Objects.requireNonNull(severity, SetShippingAddressError.class + ": severity is missing"); + Objects.requireNonNull(message, SetShippingAddressError.class + ": message is missing"); + Objects.requireNonNull(correlationId, SetShippingAddressError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, SetShippingAddressError.class + ": payload is missing"); + return new SetShippingAddressErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds SetShippingAddressError without checking for non-null required values + * @return SetShippingAddressError + */ + public SetShippingAddressError buildUnchecked() { + return new SetShippingAddressErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of SetShippingAddressErrorBuilder + * @return builder + */ + public static SetShippingAddressErrorBuilder of() { + return new SetShippingAddressErrorBuilder(); + } + + /** + * create builder for SetShippingAddressError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingAddressErrorBuilder of(final SetShippingAddressError template) { + SetShippingAddressErrorBuilder builder = new SetShippingAddressErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorImpl.java new file mode 100644 index 00000000000..0f8990a47a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the Cart cannot be updated with the shipping address.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetShippingAddressErrorImpl implements SetShippingAddressError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + SetShippingAddressErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = SET_SHIPPING_ADDRESS_ERROR; + } + + /** + * create empty instance + */ + public SetShippingAddressErrorImpl() { + this.code = SET_SHIPPING_ADDRESS_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Error setting shipping address.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the errors array of objects, with the related code and message properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetShippingAddressErrorImpl that = (SetShippingAddressErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public SetShippingAddressError copyDeep() { + return SetShippingAddressError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingError.java new file mode 100644 index 00000000000..cb28a707de0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingError.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the shipping address is missing for the given Cart.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingAddressMissingError shippingAddressMissingError = ShippingAddressMissingError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("shipping_address_missing") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingAddressMissingErrorImpl.class) +public interface ShippingAddressMissingError extends ResponseMessage { + + /** + * discriminator value for ShippingAddressMissingError + */ + String SHIPPING_ADDRESS_MISSING = "shipping_address_missing"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

The shippingAddress field is missing for cart {cartId}.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

The shippingAddress field is missing for cart {cartId}.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of ShippingAddressMissingError + */ + public static ShippingAddressMissingError of() { + return new ShippingAddressMissingErrorImpl(); + } + + /** + * factory method to create a shallow copy ShippingAddressMissingError + * @param template instance to be copied + * @return copy instance + */ + public static ShippingAddressMissingError of(final ShippingAddressMissingError template) { + ShippingAddressMissingErrorImpl instance = new ShippingAddressMissingErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public ShippingAddressMissingError copyDeep(); + + /** + * factory method to create a deep copy of ShippingAddressMissingError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShippingAddressMissingError deepCopy(@Nullable final ShippingAddressMissingError template) { + if (template == null) { + return null; + } + ShippingAddressMissingErrorImpl instance = new ShippingAddressMissingErrorImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for ShippingAddressMissingError + * @return builder + */ + public static ShippingAddressMissingErrorBuilder builder() { + return ShippingAddressMissingErrorBuilder.of(); + } + + /** + * create builder for ShippingAddressMissingError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingAddressMissingErrorBuilder builder(final ShippingAddressMissingError template) { + return ShippingAddressMissingErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShippingAddressMissingError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorBuilder.java new file mode 100644 index 00000000000..fe1782128e2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingAddressMissingErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingAddressMissingError shippingAddressMissingError = ShippingAddressMissingError.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingAddressMissingErrorBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public ShippingAddressMissingErrorBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

The shippingAddress field is missing for cart {cartId}.

+ * @param message value to be set + * @return Builder + */ + + public ShippingAddressMissingErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ShippingAddressMissingErrorBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cart object with the id property.

+ * @param payload value to be set + * @return Builder + */ + + public ShippingAddressMissingErrorBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

The shippingAddress field is missing for cart {cartId}.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds ShippingAddressMissingError with checking for non-null required values + * @return ShippingAddressMissingError + */ + public ShippingAddressMissingError build() { + Objects.requireNonNull(severity, ShippingAddressMissingError.class + ": severity is missing"); + Objects.requireNonNull(message, ShippingAddressMissingError.class + ": message is missing"); + Objects.requireNonNull(correlationId, ShippingAddressMissingError.class + ": correlationId is missing"); + Objects.requireNonNull(payload, ShippingAddressMissingError.class + ": payload is missing"); + return new ShippingAddressMissingErrorImpl(severity, message, correlationId, payload); + } + + /** + * builds ShippingAddressMissingError without checking for non-null required values + * @return ShippingAddressMissingError + */ + public ShippingAddressMissingError buildUnchecked() { + return new ShippingAddressMissingErrorImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of ShippingAddressMissingErrorBuilder + * @return builder + */ + public static ShippingAddressMissingErrorBuilder of() { + return new ShippingAddressMissingErrorBuilder(); + } + + /** + * create builder for ShippingAddressMissingError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingAddressMissingErrorBuilder of(final ShippingAddressMissingError template) { + ShippingAddressMissingErrorBuilder builder = new ShippingAddressMissingErrorBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorImpl.java new file mode 100644 index 00000000000..c408e0ba773 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the shipping address is missing for the given Cart.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingAddressMissingErrorImpl implements ShippingAddressMissingError, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingAddressMissingErrorImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = SHIPPING_ADDRESS_MISSING; + } + + /** + * create empty instance + */ + public ShippingAddressMissingErrorImpl() { + this.code = SHIPPING_ADDRESS_MISSING; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

The shippingAddress field is missing for cart {cartId}.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingAddressMissingErrorImpl that = (ShippingAddressMissingErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public ShippingAddressMissingError copyDeep() { + return ShippingAddressMissingError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCart.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCart.java new file mode 100644 index 00000000000..0667e5b3fa8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCart.java @@ -0,0 +1,174 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the selected Shipping Method does not match the Cart anymore.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingMethodDoesNotMatchCart shippingMethodDoesNotMatchCart = ShippingMethodDoesNotMatchCart.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("shipping_method_does_not_match_cart") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingMethodDoesNotMatchCartImpl.class) +public interface ShippingMethodDoesNotMatchCart extends Message { + + /** + * discriminator value for ShippingMethodDoesNotMatchCart + */ + String SHIPPING_METHOD_DOES_NOT_MATCH_CART = "shipping_method_does_not_match_cart"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Selected shipping method no longer matches cart.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Selected shipping method no longer matches cart.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + * factory method + * @return instance of ShippingMethodDoesNotMatchCart + */ + public static ShippingMethodDoesNotMatchCart of() { + return new ShippingMethodDoesNotMatchCartImpl(); + } + + /** + * factory method to create a shallow copy ShippingMethodDoesNotMatchCart + * @param template instance to be copied + * @return copy instance + */ + public static ShippingMethodDoesNotMatchCart of(final ShippingMethodDoesNotMatchCart template) { + ShippingMethodDoesNotMatchCartImpl instance = new ShippingMethodDoesNotMatchCartImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + public ShippingMethodDoesNotMatchCart copyDeep(); + + /** + * factory method to create a deep copy of ShippingMethodDoesNotMatchCart + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShippingMethodDoesNotMatchCart deepCopy(@Nullable final ShippingMethodDoesNotMatchCart template) { + if (template == null) { + return null; + } + ShippingMethodDoesNotMatchCartImpl instance = new ShippingMethodDoesNotMatchCartImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + return instance; + } + + /** + * builder factory method for ShippingMethodDoesNotMatchCart + * @return builder + */ + public static ShippingMethodDoesNotMatchCartBuilder builder() { + return ShippingMethodDoesNotMatchCartBuilder.of(); + } + + /** + * create builder for ShippingMethodDoesNotMatchCart instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodDoesNotMatchCartBuilder builder(final ShippingMethodDoesNotMatchCart template) { + return ShippingMethodDoesNotMatchCartBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShippingMethodDoesNotMatchCart(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartBuilder.java new file mode 100644 index 00000000000..36976f276f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingMethodDoesNotMatchCartBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingMethodDoesNotMatchCart shippingMethodDoesNotMatchCart = ShippingMethodDoesNotMatchCart.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodDoesNotMatchCartBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public ShippingMethodDoesNotMatchCartBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Selected shipping method no longer matches cart.

+ * @param message value to be set + * @return Builder + */ + + public ShippingMethodDoesNotMatchCartBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ShippingMethodDoesNotMatchCartBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Selected shipping method no longer matches cart.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + * builds ShippingMethodDoesNotMatchCart with checking for non-null required values + * @return ShippingMethodDoesNotMatchCart + */ + public ShippingMethodDoesNotMatchCart build() { + Objects.requireNonNull(severity, ShippingMethodDoesNotMatchCart.class + ": severity is missing"); + Objects.requireNonNull(message, ShippingMethodDoesNotMatchCart.class + ": message is missing"); + Objects.requireNonNull(correlationId, ShippingMethodDoesNotMatchCart.class + ": correlationId is missing"); + return new ShippingMethodDoesNotMatchCartImpl(severity, message, correlationId); + } + + /** + * builds ShippingMethodDoesNotMatchCart without checking for non-null required values + * @return ShippingMethodDoesNotMatchCart + */ + public ShippingMethodDoesNotMatchCart buildUnchecked() { + return new ShippingMethodDoesNotMatchCartImpl(severity, message, correlationId); + } + + /** + * factory method for an instance of ShippingMethodDoesNotMatchCartBuilder + * @return builder + */ + public static ShippingMethodDoesNotMatchCartBuilder of() { + return new ShippingMethodDoesNotMatchCartBuilder(); + } + + /** + * create builder for ShippingMethodDoesNotMatchCart instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodDoesNotMatchCartBuilder of(final ShippingMethodDoesNotMatchCart template) { + ShippingMethodDoesNotMatchCartBuilder builder = new ShippingMethodDoesNotMatchCartBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartImpl.java new file mode 100644 index 00000000000..c4ca38a511c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the selected Shipping Method does not match the Cart anymore.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodDoesNotMatchCartImpl implements ShippingMethodDoesNotMatchCart, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingMethodDoesNotMatchCartImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.code = SHIPPING_METHOD_DOES_NOT_MATCH_CART; + } + + /** + * create empty instance + */ + public ShippingMethodDoesNotMatchCartImpl() { + this.code = SHIPPING_METHOD_DOES_NOT_MATCH_CART; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Selected shipping method no longer matches cart.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingMethodDoesNotMatchCartImpl that = (ShippingMethodDoesNotMatchCartImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .build(); + } + + @Override + public ShippingMethodDoesNotMatchCart copyDeep() { + return ShippingMethodDoesNotMatchCart.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelected.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelected.java new file mode 100644 index 00000000000..d728b59978f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelected.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer selects a Shipping Method that is different from the default option.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingMethodSelected shippingMethodSelected = ShippingMethodSelected.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("shipping_method_selected") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingMethodSelectedImpl.class) +public interface ShippingMethodSelected extends ResponseMessage { + + /** + * discriminator value for ShippingMethodSelected + */ + String SHIPPING_METHOD_SELECTED = "shipping_method_selected"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Shipping Method selected.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the method object with the name and id properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Shipping Method selected.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the method object with the name and id properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of ShippingMethodSelected + */ + public static ShippingMethodSelected of() { + return new ShippingMethodSelectedImpl(); + } + + /** + * factory method to create a shallow copy ShippingMethodSelected + * @param template instance to be copied + * @return copy instance + */ + public static ShippingMethodSelected of(final ShippingMethodSelected template) { + ShippingMethodSelectedImpl instance = new ShippingMethodSelectedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public ShippingMethodSelected copyDeep(); + + /** + * factory method to create a deep copy of ShippingMethodSelected + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShippingMethodSelected deepCopy(@Nullable final ShippingMethodSelected template) { + if (template == null) { + return null; + } + ShippingMethodSelectedImpl instance = new ShippingMethodSelectedImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for ShippingMethodSelected + * @return builder + */ + public static ShippingMethodSelectedBuilder builder() { + return ShippingMethodSelectedBuilder.of(); + } + + /** + * create builder for ShippingMethodSelected instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodSelectedBuilder builder(final ShippingMethodSelected template) { + return ShippingMethodSelectedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShippingMethodSelected(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedBuilder.java new file mode 100644 index 00000000000..4f74b4c16cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingMethodSelectedBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingMethodSelected shippingMethodSelected = ShippingMethodSelected.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodSelectedBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public ShippingMethodSelectedBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Shipping Method selected.

+ * @param message value to be set + * @return Builder + */ + + public ShippingMethodSelectedBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ShippingMethodSelectedBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the method object with the name and id properties.

+ * @param payload value to be set + * @return Builder + */ + + public ShippingMethodSelectedBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Shipping Method selected.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the method object with the name and id properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds ShippingMethodSelected with checking for non-null required values + * @return ShippingMethodSelected + */ + public ShippingMethodSelected build() { + Objects.requireNonNull(severity, ShippingMethodSelected.class + ": severity is missing"); + Objects.requireNonNull(message, ShippingMethodSelected.class + ": message is missing"); + Objects.requireNonNull(correlationId, ShippingMethodSelected.class + ": correlationId is missing"); + Objects.requireNonNull(payload, ShippingMethodSelected.class + ": payload is missing"); + return new ShippingMethodSelectedImpl(severity, message, correlationId, payload); + } + + /** + * builds ShippingMethodSelected without checking for non-null required values + * @return ShippingMethodSelected + */ + public ShippingMethodSelected buildUnchecked() { + return new ShippingMethodSelectedImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of ShippingMethodSelectedBuilder + * @return builder + */ + public static ShippingMethodSelectedBuilder of() { + return new ShippingMethodSelectedBuilder(); + } + + /** + * create builder for ShippingMethodSelected instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodSelectedBuilder of(final ShippingMethodSelected template) { + ShippingMethodSelectedBuilder builder = new ShippingMethodSelectedBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedImpl.java new file mode 100644 index 00000000000..dc97815a011 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer selects a Shipping Method that is different from the default option.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodSelectedImpl implements ShippingMethodSelected, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingMethodSelectedImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = SHIPPING_METHOD_SELECTED; + } + + /** + * create empty instance + */ + public ShippingMethodSelectedImpl() { + this.code = SHIPPING_METHOD_SELECTED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Shipping Method selected.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the method object with the name and id properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingMethodSelectedImpl that = (ShippingMethodSelectedImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public ShippingMethodSelected copyDeep() { + return ShippingMethodSelected.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmation.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmation.java new file mode 100644 index 00000000000..5ccae2d0429 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmation.java @@ -0,0 +1,196 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the customer selects a Shipping Method and moves to the next step of the checkout process.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingMethodSelectionConfirmation shippingMethodSelectionConfirmation = ShippingMethodSelectionConfirmation.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("shipping_method_selection_confirmation") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingMethodSelectionConfirmationImpl.class) +public interface ShippingMethodSelectionConfirmation extends ResponseMessage { + + /** + * discriminator value for ShippingMethodSelectionConfirmation + */ + String SHIPPING_METHOD_SELECTION_CONFIRMATION = "shipping_method_selection_confirmation"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`info`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Shipping Method selection confirmed.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the method object with the name and id properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`info`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Shipping Method selection confirmed.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the method object with the name and id properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of ShippingMethodSelectionConfirmation + */ + public static ShippingMethodSelectionConfirmation of() { + return new ShippingMethodSelectionConfirmationImpl(); + } + + /** + * factory method to create a shallow copy ShippingMethodSelectionConfirmation + * @param template instance to be copied + * @return copy instance + */ + public static ShippingMethodSelectionConfirmation of(final ShippingMethodSelectionConfirmation template) { + ShippingMethodSelectionConfirmationImpl instance = new ShippingMethodSelectionConfirmationImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public ShippingMethodSelectionConfirmation copyDeep(); + + /** + * factory method to create a deep copy of ShippingMethodSelectionConfirmation + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShippingMethodSelectionConfirmation deepCopy( + @Nullable final ShippingMethodSelectionConfirmation template) { + if (template == null) { + return null; + } + ShippingMethodSelectionConfirmationImpl instance = new ShippingMethodSelectionConfirmationImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for ShippingMethodSelectionConfirmation + * @return builder + */ + public static ShippingMethodSelectionConfirmationBuilder builder() { + return ShippingMethodSelectionConfirmationBuilder.of(); + } + + /** + * create builder for ShippingMethodSelectionConfirmation instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodSelectionConfirmationBuilder builder( + final ShippingMethodSelectionConfirmation template) { + return ShippingMethodSelectionConfirmationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShippingMethodSelectionConfirmation(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationBuilder.java new file mode 100644 index 00000000000..0d2c93decf5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingMethodSelectionConfirmationBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShippingMethodSelectionConfirmation shippingMethodSelectionConfirmation = ShippingMethodSelectionConfirmation.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodSelectionConfirmationBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`info`

+ * @param severity value to be set + * @return Builder + */ + + public ShippingMethodSelectionConfirmationBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Shipping Method selection confirmed.

+ * @param message value to be set + * @return Builder + */ + + public ShippingMethodSelectionConfirmationBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public ShippingMethodSelectionConfirmationBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the method object with the name and id properties.

+ * @param payload value to be set + * @return Builder + */ + + public ShippingMethodSelectionConfirmationBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`info`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Shipping Method selection confirmed.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the method object with the name and id properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds ShippingMethodSelectionConfirmation with checking for non-null required values + * @return ShippingMethodSelectionConfirmation + */ + public ShippingMethodSelectionConfirmation build() { + Objects.requireNonNull(severity, ShippingMethodSelectionConfirmation.class + ": severity is missing"); + Objects.requireNonNull(message, ShippingMethodSelectionConfirmation.class + ": message is missing"); + Objects.requireNonNull(correlationId, ShippingMethodSelectionConfirmation.class + ": correlationId is missing"); + Objects.requireNonNull(payload, ShippingMethodSelectionConfirmation.class + ": payload is missing"); + return new ShippingMethodSelectionConfirmationImpl(severity, message, correlationId, payload); + } + + /** + * builds ShippingMethodSelectionConfirmation without checking for non-null required values + * @return ShippingMethodSelectionConfirmation + */ + public ShippingMethodSelectionConfirmation buildUnchecked() { + return new ShippingMethodSelectionConfirmationImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of ShippingMethodSelectionConfirmationBuilder + * @return builder + */ + public static ShippingMethodSelectionConfirmationBuilder of() { + return new ShippingMethodSelectionConfirmationBuilder(); + } + + /** + * create builder for ShippingMethodSelectionConfirmation instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodSelectionConfirmationBuilder of(final ShippingMethodSelectionConfirmation template) { + ShippingMethodSelectionConfirmationBuilder builder = new ShippingMethodSelectionConfirmationBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationImpl.java new file mode 100644 index 00000000000..5d775e7c17c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the customer selects a Shipping Method and moves to the next step of the checkout process.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodSelectionConfirmationImpl implements ShippingMethodSelectionConfirmation, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingMethodSelectionConfirmationImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = SHIPPING_METHOD_SELECTION_CONFIRMATION; + } + + /** + * create empty instance + */ + public ShippingMethodSelectionConfirmationImpl() { + this.code = SHIPPING_METHOD_SELECTION_CONFIRMATION; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`info`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Shipping Method selection confirmed.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the method object with the name and id properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingMethodSelectionConfirmationImpl that = (ShippingMethodSelectionConfirmationImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public ShippingMethodSelectionConfirmation copyDeep() { + return ShippingMethodSelectionConfirmation.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocale.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocale.java new file mode 100644 index 00000000000..2ef2c19f29e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocale.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the provided locale is not available for localization. The localization falls back to English.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UnavailableLocale unavailableLocale = UnavailableLocale.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("unavailable_locale") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = UnavailableLocaleImpl.class) +public interface UnavailableLocale extends ResponseMessage { + + /** + * discriminator value for UnavailableLocale + */ + String UNAVAILABLE_LOCALE = "unavailable_locale"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`warn`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

The provided locale {locale} is not available for translated definitions.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the locale and the fallback properties.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`warn`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

The provided locale {locale} is not available for translated definitions.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the locale and the fallback properties.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of UnavailableLocale + */ + public static UnavailableLocale of() { + return new UnavailableLocaleImpl(); + } + + /** + * factory method to create a shallow copy UnavailableLocale + * @param template instance to be copied + * @return copy instance + */ + public static UnavailableLocale of(final UnavailableLocale template) { + UnavailableLocaleImpl instance = new UnavailableLocaleImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public UnavailableLocale copyDeep(); + + /** + * factory method to create a deep copy of UnavailableLocale + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static UnavailableLocale deepCopy(@Nullable final UnavailableLocale template) { + if (template == null) { + return null; + } + UnavailableLocaleImpl instance = new UnavailableLocaleImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for UnavailableLocale + * @return builder + */ + public static UnavailableLocaleBuilder builder() { + return UnavailableLocaleBuilder.of(); + } + + /** + * create builder for UnavailableLocale instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UnavailableLocaleBuilder builder(final UnavailableLocale template) { + return UnavailableLocaleBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withUnavailableLocale(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleBuilder.java new file mode 100644 index 00000000000..f80e3a40045 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * UnavailableLocaleBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UnavailableLocale unavailableLocale = UnavailableLocale.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UnavailableLocaleBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`warn`

+ * @param severity value to be set + * @return Builder + */ + + public UnavailableLocaleBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

The provided locale {locale} is not available for translated definitions.

+ * @param message value to be set + * @return Builder + */ + + public UnavailableLocaleBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public UnavailableLocaleBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the locale and the fallback properties.

+ * @param payload value to be set + * @return Builder + */ + + public UnavailableLocaleBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`warn`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

The provided locale {locale} is not available for translated definitions.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the locale and the fallback properties.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds UnavailableLocale with checking for non-null required values + * @return UnavailableLocale + */ + public UnavailableLocale build() { + Objects.requireNonNull(severity, UnavailableLocale.class + ": severity is missing"); + Objects.requireNonNull(message, UnavailableLocale.class + ": message is missing"); + Objects.requireNonNull(correlationId, UnavailableLocale.class + ": correlationId is missing"); + Objects.requireNonNull(payload, UnavailableLocale.class + ": payload is missing"); + return new UnavailableLocaleImpl(severity, message, correlationId, payload); + } + + /** + * builds UnavailableLocale without checking for non-null required values + * @return UnavailableLocale + */ + public UnavailableLocale buildUnchecked() { + return new UnavailableLocaleImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of UnavailableLocaleBuilder + * @return builder + */ + public static UnavailableLocaleBuilder of() { + return new UnavailableLocaleBuilder(); + } + + /** + * create builder for UnavailableLocale instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UnavailableLocaleBuilder of(final UnavailableLocale template) { + UnavailableLocaleBuilder builder = new UnavailableLocaleBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleImpl.java new file mode 100644 index 00000000000..772d603d67f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the provided locale is not available for localization. The localization falls back to English.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UnavailableLocaleImpl implements UnavailableLocale, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + UnavailableLocaleImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = UNAVAILABLE_LOCALE; + } + + /** + * create empty instance + */ + public UnavailableLocaleImpl() { + this.code = UNAVAILABLE_LOCALE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`warn`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

The provided locale {locale} is not available for translated definitions.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the locale and the fallback properties.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + UnavailableLocaleImpl that = (UnavailableLocaleImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public UnavailableLocale copyDeep() { + return UnavailableLocale.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountry.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountry.java new file mode 100644 index 00000000000..c4a44cdc0b3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountry.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when the country of the shipping address and/or billing address associated with the Cart does not match the countries set for the Application.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UnsupportedCountry unsupportedCountry = UnsupportedCountry.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("unsupported_country") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = UnsupportedCountryImpl.class) +public interface UnsupportedCountry extends ResponseMessage { + + /** + * discriminator value for UnsupportedCountry + */ + String UNSUPPORTED_COUNTRY = "unsupported_country"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`error`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Cart {cartId} has unsupported country.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains the cart object with the id property, shippingCountry, billingCountry, and the supportedCountries array.

+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`error`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Cart {cartId} has unsupported country.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains the cart object with the id property, shippingCountry, billingCountry, and the supportedCountries array.

+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of UnsupportedCountry + */ + public static UnsupportedCountry of() { + return new UnsupportedCountryImpl(); + } + + /** + * factory method to create a shallow copy UnsupportedCountry + * @param template instance to be copied + * @return copy instance + */ + public static UnsupportedCountry of(final UnsupportedCountry template) { + UnsupportedCountryImpl instance = new UnsupportedCountryImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public UnsupportedCountry copyDeep(); + + /** + * factory method to create a deep copy of UnsupportedCountry + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static UnsupportedCountry deepCopy(@Nullable final UnsupportedCountry template) { + if (template == null) { + return null; + } + UnsupportedCountryImpl instance = new UnsupportedCountryImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for UnsupportedCountry + * @return builder + */ + public static UnsupportedCountryBuilder builder() { + return UnsupportedCountryBuilder.of(); + } + + /** + * create builder for UnsupportedCountry instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UnsupportedCountryBuilder builder(final UnsupportedCountry template) { + return UnsupportedCountryBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withUnsupportedCountry(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryBuilder.java new file mode 100644 index 00000000000..3795a6409b3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * UnsupportedCountryBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UnsupportedCountry unsupportedCountry = UnsupportedCountry.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UnsupportedCountryBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`error`

+ * @param severity value to be set + * @return Builder + */ + + public UnsupportedCountryBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Cart {cartId} has unsupported country.

+ * @param message value to be set + * @return Builder + */ + + public UnsupportedCountryBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public UnsupportedCountryBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains the cart object with the id property, shippingCountry, billingCountry, and the supportedCountries array.

+ * @param payload value to be set + * @return Builder + */ + + public UnsupportedCountryBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`error`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart {cartId} has unsupported country.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property, shippingCountry, billingCountry, and the supportedCountries array.

+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds UnsupportedCountry with checking for non-null required values + * @return UnsupportedCountry + */ + public UnsupportedCountry build() { + Objects.requireNonNull(severity, UnsupportedCountry.class + ": severity is missing"); + Objects.requireNonNull(message, UnsupportedCountry.class + ": message is missing"); + Objects.requireNonNull(correlationId, UnsupportedCountry.class + ": correlationId is missing"); + Objects.requireNonNull(payload, UnsupportedCountry.class + ": payload is missing"); + return new UnsupportedCountryImpl(severity, message, correlationId, payload); + } + + /** + * builds UnsupportedCountry without checking for non-null required values + * @return UnsupportedCountry + */ + public UnsupportedCountry buildUnchecked() { + return new UnsupportedCountryImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of UnsupportedCountryBuilder + * @return builder + */ + public static UnsupportedCountryBuilder of() { + return new UnsupportedCountryBuilder(); + } + + /** + * create builder for UnsupportedCountry instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UnsupportedCountryBuilder of(final UnsupportedCountry template) { + UnsupportedCountryBuilder builder = new UnsupportedCountryBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryImpl.java new file mode 100644 index 00000000000..fed0c83bd13 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when the country of the shipping address and/or billing address associated with the Cart does not match the countries set for the Application.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UnsupportedCountryImpl implements UnsupportedCountry, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + UnsupportedCountryImpl(@JsonProperty("severity") final String severity, + @JsonProperty("message") final String message, @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = UNSUPPORTED_COUNTRY; + } + + /** + * create empty instance + */ + public UnsupportedCountryImpl() { + this.code = UNSUPPORTED_COUNTRY; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`error`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Cart {cartId} has unsupported country.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains the cart object with the id property, shippingCountry, billingCountry, and the supportedCountries array.

+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + UnsupportedCountryImpl that = (UnsupportedCountryImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public UnsupportedCountry copyDeep() { + return UnsupportedCountry.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFields.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFields.java new file mode 100644 index 00000000000..c3c1c673507 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFields.java @@ -0,0 +1,202 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated when some fields provided in the Checkout initialization request are invalid and have been updated to match our schema. An array of updates will be provided with a sequence of edits used to transform an invalid value into a valid one.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UpdatedFields updatedFields = UpdatedFields.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("updated_fields") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = UpdatedFieldsImpl.class) +public interface UpdatedFields extends ResponseMessage { + + /** + * discriminator value for UpdatedFields + */ + String UPDATED_FIELDS = "updated_fields"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

`warn`

+ * @return severity + */ + @NotNull + @JsonProperty("severity") + public String getSeverity(); + + /** + *

Some fields are invalid and have been updated.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + @NotNull + @JsonProperty("correlationId") + public String getCorrelationId(); + + /** + *

Contains two arrays:

+ *
    + *
  • invalidFields contains a list of invalid fields with the related schema, path, value and message properties.
  • + *
  • updatedFields contains the updated fields with its related type, path and value properties, where type can be update|insert|delete.
  • + *
+ * @return payload + */ + @NotNull + @Valid + @JsonProperty("payload") + public Object getPayload(); + + /** + *

`warn`

+ * @param severity value to be set + */ + + public void setSeverity(final String severity); + + /** + *

Some fields are invalid and have been updated.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + */ + + public void setCorrelationId(final String correlationId); + + /** + *

Contains two arrays:

+ *
    + *
  • invalidFields contains a list of invalid fields with the related schema, path, value and message properties.
  • + *
  • updatedFields contains the updated fields with its related type, path and value properties, where type can be update|insert|delete.
  • + *
+ * @param payload value to be set + */ + + public void setPayload(final Object payload); + + /** + * factory method + * @return instance of UpdatedFields + */ + public static UpdatedFields of() { + return new UpdatedFieldsImpl(); + } + + /** + * factory method to create a shallow copy UpdatedFields + * @param template instance to be copied + * @return copy instance + */ + public static UpdatedFields of(final UpdatedFields template) { + UpdatedFieldsImpl instance = new UpdatedFieldsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + public UpdatedFields copyDeep(); + + /** + * factory method to create a deep copy of UpdatedFields + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static UpdatedFields deepCopy(@Nullable final UpdatedFields template) { + if (template == null) { + return null; + } + UpdatedFieldsImpl instance = new UpdatedFieldsImpl(); + instance.setSeverity(template.getSeverity()); + instance.setMessage(template.getMessage()); + instance.setCorrelationId(template.getCorrelationId()); + instance.setPayload(template.getPayload()); + return instance; + } + + /** + * builder factory method for UpdatedFields + * @return builder + */ + public static UpdatedFieldsBuilder builder() { + return UpdatedFieldsBuilder.of(); + } + + /** + * create builder for UpdatedFields instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UpdatedFieldsBuilder builder(final UpdatedFields template) { + return UpdatedFieldsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withUpdatedFields(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsBuilder.java new file mode 100644 index 00000000000..39201eec693 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsBuilder.java @@ -0,0 +1,165 @@ + +package com.commercetools.checkout.models.responses; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * UpdatedFieldsBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UpdatedFields updatedFields = UpdatedFields.builder()
+ *             .severity("{severity}")
+ *             .message("{message}")
+ *             .correlationId("{correlationId}")
+ *             .payload(payloadBuilder -> payloadBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UpdatedFieldsBuilder implements Builder { + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + *

`warn`

+ * @param severity value to be set + * @return Builder + */ + + public UpdatedFieldsBuilder severity(final String severity) { + this.severity = severity; + return this; + } + + /** + *

Some fields are invalid and have been updated.

+ * @param message value to be set + * @return Builder + */ + + public UpdatedFieldsBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Unique identifier of the event.

+ * @param correlationId value to be set + * @return Builder + */ + + public UpdatedFieldsBuilder correlationId(final String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + *

Contains two arrays:

+ *
    + *
  • invalidFields contains a list of invalid fields with the related schema, path, value and message properties.
  • + *
  • updatedFields contains the updated fields with its related type, path and value properties, where type can be update|insert|delete.
  • + *
+ * @param payload value to be set + * @return Builder + */ + + public UpdatedFieldsBuilder payload(final java.lang.Object payload) { + this.payload = payload; + return this; + } + + /** + *

`warn`

+ * @return severity + */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Some fields are invalid and have been updated.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ * @return correlationId + */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains two arrays:

+ *
    + *
  • invalidFields contains a list of invalid fields with the related schema, path, value and message properties.
  • + *
  • updatedFields contains the updated fields with its related type, path and value properties, where type can be update|insert|delete.
  • + *
+ * @return payload + */ + + public java.lang.Object getPayload() { + return this.payload; + } + + /** + * builds UpdatedFields with checking for non-null required values + * @return UpdatedFields + */ + public UpdatedFields build() { + Objects.requireNonNull(severity, UpdatedFields.class + ": severity is missing"); + Objects.requireNonNull(message, UpdatedFields.class + ": message is missing"); + Objects.requireNonNull(correlationId, UpdatedFields.class + ": correlationId is missing"); + Objects.requireNonNull(payload, UpdatedFields.class + ": payload is missing"); + return new UpdatedFieldsImpl(severity, message, correlationId, payload); + } + + /** + * builds UpdatedFields without checking for non-null required values + * @return UpdatedFields + */ + public UpdatedFields buildUnchecked() { + return new UpdatedFieldsImpl(severity, message, correlationId, payload); + } + + /** + * factory method for an instance of UpdatedFieldsBuilder + * @return builder + */ + public static UpdatedFieldsBuilder of() { + return new UpdatedFieldsBuilder(); + } + + /** + * create builder for UpdatedFields instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UpdatedFieldsBuilder of(final UpdatedFields template) { + UpdatedFieldsBuilder builder = new UpdatedFieldsBuilder(); + builder.severity = template.getSeverity(); + builder.message = template.getMessage(); + builder.correlationId = template.getCorrelationId(); + builder.payload = template.getPayload(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsImpl.java new file mode 100644 index 00000000000..9e307cd9ede --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsImpl.java @@ -0,0 +1,163 @@ + +package com.commercetools.checkout.models.responses; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated when some fields provided in the Checkout initialization request are invalid and have been updated to match our schema. An array of updates will be provided with a sequence of edits used to transform an invalid value into a valid one.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UpdatedFieldsImpl implements UpdatedFields, ModelBase { + + private String code; + + private String severity; + + private String message; + + private String correlationId; + + private java.lang.Object payload; + + /** + * create instance with all properties + */ + @JsonCreator + UpdatedFieldsImpl(@JsonProperty("severity") final String severity, @JsonProperty("message") final String message, + @JsonProperty("correlationId") final String correlationId, + @JsonProperty("payload") final java.lang.Object payload) { + this.severity = severity; + this.message = message; + this.correlationId = correlationId; + this.payload = payload; + this.code = UPDATED_FIELDS; + } + + /** + * create empty instance + */ + public UpdatedFieldsImpl() { + this.code = UPDATED_FIELDS; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

`warn`

+ */ + + public String getSeverity() { + return this.severity; + } + + /** + *

Some fields are invalid and have been updated.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Unique identifier of the event.

+ */ + + public String getCorrelationId() { + return this.correlationId; + } + + /** + *

Contains two arrays:

+ *
    + *
  • invalidFields contains a list of invalid fields with the related schema, path, value and message properties.
  • + *
  • updatedFields contains the updated fields with its related type, path and value properties, where type can be update|insert|delete.
  • + *
+ */ + + public java.lang.Object getPayload() { + return this.payload; + } + + public void setSeverity(final String severity) { + this.severity = severity; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setCorrelationId(final String correlationId) { + this.correlationId = correlationId; + } + + public void setPayload(final java.lang.Object payload) { + this.payload = payload; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + UpdatedFieldsImpl that = (UpdatedFieldsImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .append(code, that.code) + .append(severity, that.severity) + .append(message, that.message) + .append(correlationId, that.correlationId) + .append(payload, that.payload) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(severity) + .append(message) + .append(correlationId) + .append(payload) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("severity", severity) + .append("message", message) + .append("correlationId", correlationId) + .append("payload", payload) + .build(); + } + + @Override + public UpdatedFields copyDeep() { + return UpdatedFields.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/Transaction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/Transaction.java new file mode 100644 index 00000000000..38191c188fc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/Transaction.java @@ -0,0 +1,306 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.application.ApplicationResourceIdentifier; +import com.commercetools.checkout.models.cart.CartReference; +import com.commercetools.checkout.models.cart.OrderReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Information for the request to the Connector to initiate the payment for a specific Cart.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     Transaction transaction = Transaction.builder()
+ *             .id("{id}")
+ *             .version(1)
+ *             .application(applicationBuilder -> applicationBuilder)
+ *             .plusTransactionItems(transactionItemsBuilder -> transactionItemsBuilder)
+ *             .transactionStatus(transactionStatusBuilder -> transactionStatusBuilder)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TransactionImpl.class) +public interface Transaction { + + /** + *

Unique identifier of the Transaction.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the Transaction.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Current version of the Transaction.

+ * @return version + */ + @NotNull + @JsonProperty("version") + public Integer getVersion(); + + /** + *

Application for which the payment must be executed.

+ * @return application + */ + @NotNull + @Valid + @JsonProperty("application") + public ApplicationResourceIdentifier getApplication(); + + /** + *

Transaction Item associated with the Transaction.

+ * @return transactionItems + */ + @NotNull + @Valid + @JsonProperty("transactionItems") + public List getTransactionItems(); + + /** + *

Reference to the Cart for which the payment must be executed.

+ * @return cart + */ + @Valid + @JsonProperty("cart") + public CartReference getCart(); + + /** + *

Status of the Transaction.

+ * @return transactionStatus + */ + @NotNull + @Valid + @JsonProperty("transactionStatus") + public TransactionStatus getTransactionStatus(); + + /** + *

Reference to the Order created from the Cart when the Transaction is completed.

+ * @return order + */ + @Valid + @JsonProperty("order") + public OrderReference getOrder(); + + /** + *

Date and time (UTC) the Transaction was initially created.

+ * @return createdAt + */ + @NotNull + @JsonProperty("createdAt") + public ZonedDateTime getCreatedAt(); + + /** + *

Date and time (UTC) the Transaction was last updated.

+ * @return lastModifiedAt + */ + @NotNull + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

Unique identifier of the Transaction.

+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *

User-defined unique identifier of the Transaction.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

Current version of the Transaction.

+ * @param version value to be set + */ + + public void setVersion(final Integer version); + + /** + *

Application for which the payment must be executed.

+ * @param application value to be set + */ + + public void setApplication(final ApplicationResourceIdentifier application); + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems values to be set + */ + + @JsonIgnore + public void setTransactionItems(final TransactionItem... transactionItems); + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems values to be set + */ + + public void setTransactionItems(final List transactionItems); + + /** + *

Reference to the Cart for which the payment must be executed.

+ * @param cart value to be set + */ + + public void setCart(final CartReference cart); + + /** + *

Status of the Transaction.

+ * @param transactionStatus value to be set + */ + + public void setTransactionStatus(final TransactionStatus transactionStatus); + + /** + *

Reference to the Order created from the Cart when the Transaction is completed.

+ * @param order value to be set + */ + + public void setOrder(final OrderReference order); + + /** + *

Date and time (UTC) the Transaction was initially created.

+ * @param createdAt value to be set + */ + + public void setCreatedAt(final ZonedDateTime createdAt); + + /** + *

Date and time (UTC) the Transaction was last updated.

+ * @param lastModifiedAt value to be set + */ + + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + + /** + * factory method + * @return instance of Transaction + */ + public static Transaction of() { + return new TransactionImpl(); + } + + /** + * factory method to create a shallow copy Transaction + * @param template instance to be copied + * @return copy instance + */ + public static Transaction of(final Transaction template) { + TransactionImpl instance = new TransactionImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setVersion(template.getVersion()); + instance.setApplication(template.getApplication()); + instance.setTransactionItems(template.getTransactionItems()); + instance.setCart(template.getCart()); + instance.setTransactionStatus(template.getTransactionStatus()); + instance.setOrder(template.getOrder()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + return instance; + } + + public Transaction copyDeep(); + + /** + * factory method to create a deep copy of Transaction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Transaction deepCopy(@Nullable final Transaction template) { + if (template == null) { + return null; + } + TransactionImpl instance = new TransactionImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setVersion(template.getVersion()); + instance.setApplication(com.commercetools.checkout.models.application.ApplicationResourceIdentifier + .deepCopy(template.getApplication())); + instance.setTransactionItems(Optional.ofNullable(template.getTransactionItems()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.transaction.TransactionItem::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCart(com.commercetools.checkout.models.cart.CartReference.deepCopy(template.getCart())); + instance.setTransactionStatus( + com.commercetools.checkout.models.transaction.TransactionStatus.deepCopy(template.getTransactionStatus())); + instance.setOrder(com.commercetools.checkout.models.cart.OrderReference.deepCopy(template.getOrder())); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + return instance; + } + + /** + * builder factory method for Transaction + * @return builder + */ + public static TransactionBuilder builder() { + return TransactionBuilder.of(); + } + + /** + * create builder for Transaction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionBuilder builder(final Transaction template) { + return TransactionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTransaction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionBuilder.java new file mode 100644 index 00000000000..2e191a01826 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionBuilder.java @@ -0,0 +1,498 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TransactionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     Transaction transaction = Transaction.builder()
+ *             .id("{id}")
+ *             .version(1)
+ *             .application(applicationBuilder -> applicationBuilder)
+ *             .plusTransactionItems(transactionItemsBuilder -> transactionItemsBuilder)
+ *             .transactionStatus(transactionStatusBuilder -> transactionStatusBuilder)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionBuilder implements Builder { + + private String id; + + @Nullable + private String key; + + private Integer version; + + private com.commercetools.checkout.models.application.ApplicationResourceIdentifier application; + + private java.util.List transactionItems; + + @Nullable + private com.commercetools.checkout.models.cart.CartReference cart; + + private com.commercetools.checkout.models.transaction.TransactionStatus transactionStatus; + + @Nullable + private com.commercetools.checkout.models.cart.OrderReference order; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + /** + *

Unique identifier of the Transaction.

+ * @param id value to be set + * @return Builder + */ + + public TransactionBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

User-defined unique identifier of the Transaction.

+ * @param key value to be set + * @return Builder + */ + + public TransactionBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

Current version of the Transaction.

+ * @param version value to be set + * @return Builder + */ + + public TransactionBuilder version(final Integer version) { + this.version = version; + return this; + } + + /** + *

Application for which the payment must be executed.

+ * @param builder function to build the application value + * @return Builder + */ + + public TransactionBuilder application( + Function builder) { + this.application = builder + .apply(com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

Application for which the payment must be executed.

+ * @param builder function to build the application value + * @return Builder + */ + + public TransactionBuilder withApplication( + Function builder) { + this.application = builder + .apply(com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Application for which the payment must be executed.

+ * @param application value to be set + * @return Builder + */ + + public TransactionBuilder application( + final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application) { + this.application = application; + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems value to be set + * @return Builder + */ + + public TransactionBuilder transactionItems( + final com.commercetools.checkout.models.transaction.TransactionItem... transactionItems) { + this.transactionItems = new ArrayList<>(Arrays.asList(transactionItems)); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems value to be set + * @return Builder + */ + + public TransactionBuilder transactionItems( + final java.util.List transactionItems) { + this.transactionItems = transactionItems; + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems value to be set + * @return Builder + */ + + public TransactionBuilder plusTransactionItems( + final com.commercetools.checkout.models.transaction.TransactionItem... transactionItems) { + if (this.transactionItems == null) { + this.transactionItems = new ArrayList<>(); + } + this.transactionItems.addAll(Arrays.asList(transactionItems)); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionBuilder plusTransactionItems( + Function builder) { + if (this.transactionItems == null) { + this.transactionItems = new ArrayList<>(); + } + this.transactionItems + .add(builder.apply(com.commercetools.checkout.models.transaction.TransactionItemBuilder.of()).build()); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionBuilder withTransactionItems( + Function builder) { + this.transactionItems = new ArrayList<>(); + this.transactionItems + .add(builder.apply(com.commercetools.checkout.models.transaction.TransactionItemBuilder.of()).build()); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionBuilder addTransactionItems( + Function builder) { + return plusTransactionItems( + builder.apply(com.commercetools.checkout.models.transaction.TransactionItemBuilder.of())); + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionBuilder setTransactionItems( + Function builder) { + return transactionItems( + builder.apply(com.commercetools.checkout.models.transaction.TransactionItemBuilder.of())); + } + + /** + *

Reference to the Cart for which the payment must be executed.

+ * @param builder function to build the cart value + * @return Builder + */ + + public TransactionBuilder cart( + Function builder) { + this.cart = builder.apply(com.commercetools.checkout.models.cart.CartReferenceBuilder.of()).build(); + return this; + } + + /** + *

Reference to the Cart for which the payment must be executed.

+ * @param builder function to build the cart value + * @return Builder + */ + + public TransactionBuilder withCart( + Function builder) { + this.cart = builder.apply(com.commercetools.checkout.models.cart.CartReferenceBuilder.of()); + return this; + } + + /** + *

Reference to the Cart for which the payment must be executed.

+ * @param cart value to be set + * @return Builder + */ + + public TransactionBuilder cart(@Nullable final com.commercetools.checkout.models.cart.CartReference cart) { + this.cart = cart; + return this; + } + + /** + *

Status of the Transaction.

+ * @param builder function to build the transactionStatus value + * @return Builder + */ + + public TransactionBuilder transactionStatus( + Function builder) { + this.transactionStatus = builder + .apply(com.commercetools.checkout.models.transaction.TransactionStatusBuilder.of()) + .build(); + return this; + } + + /** + *

Status of the Transaction.

+ * @param builder function to build the transactionStatus value + * @return Builder + */ + + public TransactionBuilder withTransactionStatus( + Function builder) { + this.transactionStatus = builder + .apply(com.commercetools.checkout.models.transaction.TransactionStatusBuilder.of()); + return this; + } + + /** + *

Status of the Transaction.

+ * @param transactionStatus value to be set + * @return Builder + */ + + public TransactionBuilder transactionStatus( + final com.commercetools.checkout.models.transaction.TransactionStatus transactionStatus) { + this.transactionStatus = transactionStatus; + return this; + } + + /** + *

Reference to the Order created from the Cart when the Transaction is completed.

+ * @param builder function to build the order value + * @return Builder + */ + + public TransactionBuilder order( + Function builder) { + this.order = builder.apply(com.commercetools.checkout.models.cart.OrderReferenceBuilder.of()).build(); + return this; + } + + /** + *

Reference to the Order created from the Cart when the Transaction is completed.

+ * @param builder function to build the order value + * @return Builder + */ + + public TransactionBuilder withOrder( + Function builder) { + this.order = builder.apply(com.commercetools.checkout.models.cart.OrderReferenceBuilder.of()); + return this; + } + + /** + *

Reference to the Order created from the Cart when the Transaction is completed.

+ * @param order value to be set + * @return Builder + */ + + public TransactionBuilder order(@Nullable final com.commercetools.checkout.models.cart.OrderReference order) { + this.order = order; + return this; + } + + /** + *

Date and time (UTC) the Transaction was initially created.

+ * @param createdAt value to be set + * @return Builder + */ + + public TransactionBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Date and time (UTC) the Transaction was last updated.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public TransactionBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

Unique identifier of the Transaction.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the Transaction.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

Current version of the Transaction.

+ * @return version + */ + + public Integer getVersion() { + return this.version; + } + + /** + *

Application for which the payment must be executed.

+ * @return application + */ + + public com.commercetools.checkout.models.application.ApplicationResourceIdentifier getApplication() { + return this.application; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @return transactionItems + */ + + public java.util.List getTransactionItems() { + return this.transactionItems; + } + + /** + *

Reference to the Cart for which the payment must be executed.

+ * @return cart + */ + + @Nullable + public com.commercetools.checkout.models.cart.CartReference getCart() { + return this.cart; + } + + /** + *

Status of the Transaction.

+ * @return transactionStatus + */ + + public com.commercetools.checkout.models.transaction.TransactionStatus getTransactionStatus() { + return this.transactionStatus; + } + + /** + *

Reference to the Order created from the Cart when the Transaction is completed.

+ * @return order + */ + + @Nullable + public com.commercetools.checkout.models.cart.OrderReference getOrder() { + return this.order; + } + + /** + *

Date and time (UTC) the Transaction was initially created.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Date and time (UTC) the Transaction was last updated.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + * builds Transaction with checking for non-null required values + * @return Transaction + */ + public Transaction build() { + Objects.requireNonNull(id, Transaction.class + ": id is missing"); + Objects.requireNonNull(version, Transaction.class + ": version is missing"); + Objects.requireNonNull(application, Transaction.class + ": application is missing"); + Objects.requireNonNull(transactionItems, Transaction.class + ": transactionItems is missing"); + Objects.requireNonNull(transactionStatus, Transaction.class + ": transactionStatus is missing"); + Objects.requireNonNull(createdAt, Transaction.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, Transaction.class + ": lastModifiedAt is missing"); + return new TransactionImpl(id, key, version, application, transactionItems, cart, transactionStatus, order, + createdAt, lastModifiedAt); + } + + /** + * builds Transaction without checking for non-null required values + * @return Transaction + */ + public Transaction buildUnchecked() { + return new TransactionImpl(id, key, version, application, transactionItems, cart, transactionStatus, order, + createdAt, lastModifiedAt); + } + + /** + * factory method for an instance of TransactionBuilder + * @return builder + */ + public static TransactionBuilder of() { + return new TransactionBuilder(); + } + + /** + * create builder for Transaction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionBuilder of(final Transaction template) { + TransactionBuilder builder = new TransactionBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + builder.version = template.getVersion(); + builder.application = template.getApplication(); + builder.transactionItems = template.getTransactionItems(); + builder.cart = template.getCart(); + builder.transactionStatus = template.getTransactionStatus(); + builder.order = template.getOrder(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraft.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraft.java new file mode 100644 index 00000000000..418b0cee8e7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraft.java @@ -0,0 +1,197 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.application.ApplicationResourceIdentifier; +import com.commercetools.checkout.models.cart.CartResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * TransactionDraft + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionDraft transactionDraft = TransactionDraft.builder()
+ *             .application(applicationBuilder -> applicationBuilder)
+ *             .plusTransactionItems(transactionItemsBuilder -> transactionItemsBuilder)
+ *             .cart(cartBuilder -> cartBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TransactionDraftImpl.class) +public interface TransactionDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

User-defined unique identifier of the Transaction.

+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

Application for which the payment is executed.

+ * @return application + */ + @NotNull + @Valid + @JsonProperty("application") + public ApplicationResourceIdentifier getApplication(); + + /** + *

Transaction Item associated with the Transaction.

+ * @return transactionItems + */ + @NotNull + @Valid + @JsonProperty("transactionItems") + public List getTransactionItems(); + + /** + *

Cart for which the payment must be executed.

+ * @return cart + */ + @NotNull + @Valid + @JsonProperty("cart") + public CartResourceIdentifier getCart(); + + /** + *

User-defined unique identifier of the Transaction.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

Application for which the payment is executed.

+ * @param application value to be set + */ + + public void setApplication(final ApplicationResourceIdentifier application); + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems values to be set + */ + + @JsonIgnore + public void setTransactionItems(final TransactionItemDraft... transactionItems); + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems values to be set + */ + + public void setTransactionItems(final List transactionItems); + + /** + *

Cart for which the payment must be executed.

+ * @param cart value to be set + */ + + public void setCart(final CartResourceIdentifier cart); + + /** + * factory method + * @return instance of TransactionDraft + */ + public static TransactionDraft of() { + return new TransactionDraftImpl(); + } + + /** + * factory method to create a shallow copy TransactionDraft + * @param template instance to be copied + * @return copy instance + */ + public static TransactionDraft of(final TransactionDraft template) { + TransactionDraftImpl instance = new TransactionDraftImpl(); + instance.setKey(template.getKey()); + instance.setApplication(template.getApplication()); + instance.setTransactionItems(template.getTransactionItems()); + instance.setCart(template.getCart()); + return instance; + } + + public TransactionDraft copyDeep(); + + /** + * factory method to create a deep copy of TransactionDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TransactionDraft deepCopy(@Nullable final TransactionDraft template) { + if (template == null) { + return null; + } + TransactionDraftImpl instance = new TransactionDraftImpl(); + instance.setKey(template.getKey()); + instance.setApplication(com.commercetools.checkout.models.application.ApplicationResourceIdentifier + .deepCopy(template.getApplication())); + instance.setTransactionItems(Optional.ofNullable(template.getTransactionItems()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.transaction.TransactionItemDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCart(com.commercetools.checkout.models.cart.CartResourceIdentifier.deepCopy(template.getCart())); + return instance; + } + + /** + * builder factory method for TransactionDraft + * @return builder + */ + public static TransactionDraftBuilder builder() { + return TransactionDraftBuilder.of(); + } + + /** + * create builder for TransactionDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionDraftBuilder builder(final TransactionDraft template) { + return TransactionDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTransactionDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftBuilder.java new file mode 100644 index 00000000000..6c1f7e21955 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftBuilder.java @@ -0,0 +1,294 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TransactionDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionDraft transactionDraft = TransactionDraft.builder()
+ *             .application(applicationBuilder -> applicationBuilder)
+ *             .plusTransactionItems(transactionItemsBuilder -> transactionItemsBuilder)
+ *             .cart(cartBuilder -> cartBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionDraftBuilder implements Builder { + + @Nullable + private String key; + + private com.commercetools.checkout.models.application.ApplicationResourceIdentifier application; + + private java.util.List transactionItems; + + private com.commercetools.checkout.models.cart.CartResourceIdentifier cart; + + /** + *

User-defined unique identifier of the Transaction.

+ * @param key value to be set + * @return Builder + */ + + public TransactionDraftBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

Application for which the payment is executed.

+ * @param builder function to build the application value + * @return Builder + */ + + public TransactionDraftBuilder application( + Function builder) { + this.application = builder + .apply(com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

Application for which the payment is executed.

+ * @param builder function to build the application value + * @return Builder + */ + + public TransactionDraftBuilder withApplication( + Function builder) { + this.application = builder + .apply(com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Application for which the payment is executed.

+ * @param application value to be set + * @return Builder + */ + + public TransactionDraftBuilder application( + final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application) { + this.application = application; + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems value to be set + * @return Builder + */ + + public TransactionDraftBuilder transactionItems( + final com.commercetools.checkout.models.transaction.TransactionItemDraft... transactionItems) { + this.transactionItems = new ArrayList<>(Arrays.asList(transactionItems)); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems value to be set + * @return Builder + */ + + public TransactionDraftBuilder transactionItems( + final java.util.List transactionItems) { + this.transactionItems = transactionItems; + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param transactionItems value to be set + * @return Builder + */ + + public TransactionDraftBuilder plusTransactionItems( + final com.commercetools.checkout.models.transaction.TransactionItemDraft... transactionItems) { + if (this.transactionItems == null) { + this.transactionItems = new ArrayList<>(); + } + this.transactionItems.addAll(Arrays.asList(transactionItems)); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionDraftBuilder plusTransactionItems( + Function builder) { + if (this.transactionItems == null) { + this.transactionItems = new ArrayList<>(); + } + this.transactionItems.add( + builder.apply(com.commercetools.checkout.models.transaction.TransactionItemDraftBuilder.of()).build()); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionDraftBuilder withTransactionItems( + Function builder) { + this.transactionItems = new ArrayList<>(); + this.transactionItems.add( + builder.apply(com.commercetools.checkout.models.transaction.TransactionItemDraftBuilder.of()).build()); + return this; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionDraftBuilder addTransactionItems( + Function builder) { + return plusTransactionItems( + builder.apply(com.commercetools.checkout.models.transaction.TransactionItemDraftBuilder.of())); + } + + /** + *

Transaction Item associated with the Transaction.

+ * @param builder function to build the transactionItems value + * @return Builder + */ + + public TransactionDraftBuilder setTransactionItems( + Function builder) { + return transactionItems( + builder.apply(com.commercetools.checkout.models.transaction.TransactionItemDraftBuilder.of())); + } + + /** + *

Cart for which the payment must be executed.

+ * @param builder function to build the cart value + * @return Builder + */ + + public TransactionDraftBuilder cart( + Function builder) { + this.cart = builder.apply(com.commercetools.checkout.models.cart.CartResourceIdentifierBuilder.of()).build(); + return this; + } + + /** + *

Cart for which the payment must be executed.

+ * @param builder function to build the cart value + * @return Builder + */ + + public TransactionDraftBuilder withCart( + Function builder) { + this.cart = builder.apply(com.commercetools.checkout.models.cart.CartResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Cart for which the payment must be executed.

+ * @param cart value to be set + * @return Builder + */ + + public TransactionDraftBuilder cart(final com.commercetools.checkout.models.cart.CartResourceIdentifier cart) { + this.cart = cart; + return this; + } + + /** + *

User-defined unique identifier of the Transaction.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

Application for which the payment is executed.

+ * @return application + */ + + public com.commercetools.checkout.models.application.ApplicationResourceIdentifier getApplication() { + return this.application; + } + + /** + *

Transaction Item associated with the Transaction.

+ * @return transactionItems + */ + + public java.util.List getTransactionItems() { + return this.transactionItems; + } + + /** + *

Cart for which the payment must be executed.

+ * @return cart + */ + + public com.commercetools.checkout.models.cart.CartResourceIdentifier getCart() { + return this.cart; + } + + /** + * builds TransactionDraft with checking for non-null required values + * @return TransactionDraft + */ + public TransactionDraft build() { + Objects.requireNonNull(application, TransactionDraft.class + ": application is missing"); + Objects.requireNonNull(transactionItems, TransactionDraft.class + ": transactionItems is missing"); + Objects.requireNonNull(cart, TransactionDraft.class + ": cart is missing"); + return new TransactionDraftImpl(key, application, transactionItems, cart); + } + + /** + * builds TransactionDraft without checking for non-null required values + * @return TransactionDraft + */ + public TransactionDraft buildUnchecked() { + return new TransactionDraftImpl(key, application, transactionItems, cart); + } + + /** + * factory method for an instance of TransactionDraftBuilder + * @return builder + */ + public static TransactionDraftBuilder of() { + return new TransactionDraftBuilder(); + } + + /** + * create builder for TransactionDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionDraftBuilder of(final TransactionDraft template) { + TransactionDraftBuilder builder = new TransactionDraftBuilder(); + builder.key = template.getKey(); + builder.application = template.getApplication(); + builder.transactionItems = template.getTransactionItems(); + builder.cart = template.getCart(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftImpl.java new file mode 100644 index 00000000000..56f8c00ffc9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftImpl.java @@ -0,0 +1,151 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * TransactionDraft + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionDraftImpl implements TransactionDraft, ModelBase { + + private String key; + + private com.commercetools.checkout.models.application.ApplicationResourceIdentifier application; + + private java.util.List transactionItems; + + private com.commercetools.checkout.models.cart.CartResourceIdentifier cart; + + /** + * create instance with all properties + */ + @JsonCreator + TransactionDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("application") final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application, + @JsonProperty("transactionItems") final java.util.List transactionItems, + @JsonProperty("cart") final com.commercetools.checkout.models.cart.CartResourceIdentifier cart) { + this.key = key; + this.application = application; + this.transactionItems = transactionItems; + this.cart = cart; + } + + /** + * create empty instance + */ + public TransactionDraftImpl() { + } + + /** + *

User-defined unique identifier of the Transaction.

+ */ + + public String getKey() { + return this.key; + } + + /** + *

Application for which the payment is executed.

+ */ + + public com.commercetools.checkout.models.application.ApplicationResourceIdentifier getApplication() { + return this.application; + } + + /** + *

Transaction Item associated with the Transaction.

+ */ + + public java.util.List getTransactionItems() { + return this.transactionItems; + } + + /** + *

Cart for which the payment must be executed.

+ */ + + public com.commercetools.checkout.models.cart.CartResourceIdentifier getCart() { + return this.cart; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setApplication( + final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application) { + this.application = application; + } + + public void setTransactionItems( + final com.commercetools.checkout.models.transaction.TransactionItemDraft... transactionItems) { + this.transactionItems = new ArrayList<>(Arrays.asList(transactionItems)); + } + + public void setTransactionItems( + final java.util.List transactionItems) { + this.transactionItems = transactionItems; + } + + public void setCart(final com.commercetools.checkout.models.cart.CartResourceIdentifier cart) { + this.cart = cart; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TransactionDraftImpl that = (TransactionDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(application, that.application) + .append(transactionItems, that.transactionItems) + .append(cart, that.cart) + .append(key, that.key) + .append(application, that.application) + .append(transactionItems, that.transactionItems) + .append(cart, that.cart) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(application) + .append(transactionItems) + .append(cart) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("application", application) + .append("transactionItems", transactionItems) + .append("cart", cart) + .build(); + } + + @Override + public TransactionDraft copyDeep() { + return TransactionDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionError.java new file mode 100644 index 00000000000..e88295ad87f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionError.java @@ -0,0 +1,142 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

A single error on the Transaction. Multiple errors may be included in the Transaction Status.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionError transactionError = TransactionError.builder()
+ *             .code("{code}")
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TransactionErrorImpl.class) +public interface TransactionError { + + /** + *

Error identifier.

+ * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Plain text description of the cause of the error.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Error identifier.

+ * @param code value to be set + */ + + public void setCode(final String code); + + /** + *

Plain text description of the cause of the error.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of TransactionError + */ + public static TransactionError of() { + return new TransactionErrorImpl(); + } + + /** + * factory method to create a shallow copy TransactionError + * @param template instance to be copied + * @return copy instance + */ + public static TransactionError of(final TransactionError template) { + TransactionErrorImpl instance = new TransactionErrorImpl(); + instance.setCode(template.getCode()); + instance.setMessage(template.getMessage()); + return instance; + } + + public TransactionError copyDeep(); + + /** + * factory method to create a deep copy of TransactionError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TransactionError deepCopy(@Nullable final TransactionError template) { + if (template == null) { + return null; + } + TransactionErrorImpl instance = new TransactionErrorImpl(); + instance.setCode(template.getCode()); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for TransactionError + * @return builder + */ + public static TransactionErrorBuilder builder() { + return TransactionErrorBuilder.of(); + } + + /** + * create builder for TransactionError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionErrorBuilder builder(final TransactionError template) { + return TransactionErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTransactionError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorBuilder.java new file mode 100644 index 00000000000..cb3c56f715e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TransactionErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionError transactionError = TransactionError.builder()
+ *             .code("{code}")
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionErrorBuilder implements Builder { + + private String code; + + private String message; + + /** + *

Error identifier.

+ * @param code value to be set + * @return Builder + */ + + public TransactionErrorBuilder code(final String code) { + this.code = code; + return this; + } + + /** + *

Plain text description of the cause of the error.

+ * @param message value to be set + * @return Builder + */ + + public TransactionErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Error identifier.

+ * @return code + */ + + public String getCode() { + return this.code; + } + + /** + *

Plain text description of the cause of the error.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds TransactionError with checking for non-null required values + * @return TransactionError + */ + public TransactionError build() { + Objects.requireNonNull(code, TransactionError.class + ": code is missing"); + Objects.requireNonNull(message, TransactionError.class + ": message is missing"); + return new TransactionErrorImpl(code, message); + } + + /** + * builds TransactionError without checking for non-null required values + * @return TransactionError + */ + public TransactionError buildUnchecked() { + return new TransactionErrorImpl(code, message); + } + + /** + * factory method for an instance of TransactionErrorBuilder + * @return builder + */ + public static TransactionErrorBuilder of() { + return new TransactionErrorBuilder(); + } + + /** + * create builder for TransactionError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionErrorBuilder of(final TransactionError template) { + TransactionErrorBuilder builder = new TransactionErrorBuilder(); + builder.code = template.getCode(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorImpl.java new file mode 100644 index 00000000000..bff0e6987e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

A single error on the Transaction. Multiple errors may be included in the Transaction Status.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionErrorImpl implements TransactionError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + TransactionErrorImpl(@JsonProperty("code") final String code, @JsonProperty("message") final String message) { + this.code = code; + this.message = message; + } + + /** + * create empty instance + */ + public TransactionErrorImpl() { + } + + /** + *

Error identifier.

+ */ + + public String getCode() { + return this.code; + } + + /** + *

Plain text description of the cause of the error.

+ */ + + public String getMessage() { + return this.message; + } + + public void setCode(final String code) { + this.code = code; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TransactionErrorImpl that = (TransactionErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public TransactionError copyDeep() { + return TransactionError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionImpl.java new file mode 100644 index 00000000000..81ed06f3348 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionImpl.java @@ -0,0 +1,271 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Information for the request to the Connector to initiate the payment for a specific Cart.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionImpl implements Transaction, ModelBase { + + private String id; + + private String key; + + private Integer version; + + private com.commercetools.checkout.models.application.ApplicationResourceIdentifier application; + + private java.util.List transactionItems; + + private com.commercetools.checkout.models.cart.CartReference cart; + + private com.commercetools.checkout.models.transaction.TransactionStatus transactionStatus; + + private com.commercetools.checkout.models.cart.OrderReference order; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + /** + * create instance with all properties + */ + @JsonCreator + TransactionImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("version") final Integer version, + @JsonProperty("application") final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application, + @JsonProperty("transactionItems") final java.util.List transactionItems, + @JsonProperty("cart") final com.commercetools.checkout.models.cart.CartReference cart, + @JsonProperty("transactionStatus") final com.commercetools.checkout.models.transaction.TransactionStatus transactionStatus, + @JsonProperty("order") final com.commercetools.checkout.models.cart.OrderReference order, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt) { + this.id = id; + this.key = key; + this.version = version; + this.application = application; + this.transactionItems = transactionItems; + this.cart = cart; + this.transactionStatus = transactionStatus; + this.order = order; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + } + + /** + * create empty instance + */ + public TransactionImpl() { + } + + /** + *

Unique identifier of the Transaction.

+ */ + + public String getId() { + return this.id; + } + + /** + *

User-defined unique identifier of the Transaction.

+ */ + + public String getKey() { + return this.key; + } + + /** + *

Current version of the Transaction.

+ */ + + public Integer getVersion() { + return this.version; + } + + /** + *

Application for which the payment must be executed.

+ */ + + public com.commercetools.checkout.models.application.ApplicationResourceIdentifier getApplication() { + return this.application; + } + + /** + *

Transaction Item associated with the Transaction.

+ */ + + public java.util.List getTransactionItems() { + return this.transactionItems; + } + + /** + *

Reference to the Cart for which the payment must be executed.

+ */ + + public com.commercetools.checkout.models.cart.CartReference getCart() { + return this.cart; + } + + /** + *

Status of the Transaction.

+ */ + + public com.commercetools.checkout.models.transaction.TransactionStatus getTransactionStatus() { + return this.transactionStatus; + } + + /** + *

Reference to the Order created from the Cart when the Transaction is completed.

+ */ + + public com.commercetools.checkout.models.cart.OrderReference getOrder() { + return this.order; + } + + /** + *

Date and time (UTC) the Transaction was initially created.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Date and time (UTC) the Transaction was last updated.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setVersion(final Integer version) { + this.version = version; + } + + public void setApplication( + final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application) { + this.application = application; + } + + public void setTransactionItems( + final com.commercetools.checkout.models.transaction.TransactionItem... transactionItems) { + this.transactionItems = new ArrayList<>(Arrays.asList(transactionItems)); + } + + public void setTransactionItems( + final java.util.List transactionItems) { + this.transactionItems = transactionItems; + } + + public void setCart(final com.commercetools.checkout.models.cart.CartReference cart) { + this.cart = cart; + } + + public void setTransactionStatus( + final com.commercetools.checkout.models.transaction.TransactionStatus transactionStatus) { + this.transactionStatus = transactionStatus; + } + + public void setOrder(final com.commercetools.checkout.models.cart.OrderReference order) { + this.order = order; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TransactionImpl that = (TransactionImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(key, that.key) + .append(version, that.version) + .append(application, that.application) + .append(transactionItems, that.transactionItems) + .append(cart, that.cart) + .append(transactionStatus, that.transactionStatus) + .append(order, that.order) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(id, that.id) + .append(key, that.key) + .append(version, that.version) + .append(application, that.application) + .append(transactionItems, that.transactionItems) + .append(cart, that.cart) + .append(transactionStatus, that.transactionStatus) + .append(order, that.order) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(key) + .append(version) + .append(application) + .append(transactionItems) + .append(cart) + .append(transactionStatus) + .append(order) + .append(createdAt) + .append(lastModifiedAt) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) + .append("version", version) + .append("application", application) + .append("transactionItems", transactionItems) + .append("cart", cart) + .append("transactionStatus", transactionStatus) + .append("order", order) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .build(); + } + + @Override + public Transaction copyDeep() { + return Transaction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItem.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItem.java new file mode 100644 index 00000000000..5ef8281e1cf --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItem.java @@ -0,0 +1,164 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Amount; +import com.commercetools.checkout.models.payment.PaymentReference; +import com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Payment information related to the Transaction.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionItem transactionItem = TransactionItem.builder()
+ *             .paymentIntegration(paymentIntegrationBuilder -> paymentIntegrationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TransactionItemImpl.class) +public interface TransactionItem { + + /** + *

Reference to the Payment associated with the Transaction Item.

+ * @return payment + */ + @Valid + @JsonProperty("payment") + public PaymentReference getPayment(); + + /** + *

Reference to the Payment Integration to use to execute the payment.

+ * @return paymentIntegration + */ + @NotNull + @Valid + @JsonProperty("paymentIntegration") + public PaymentIntegrationReference getPaymentIntegration(); + + /** + *

Money value of the Transaction Item.

+ * @return amount + */ + @Valid + @JsonProperty("amount") + public Amount getAmount(); + + /** + *

Reference to the Payment associated with the Transaction Item.

+ * @param payment value to be set + */ + + public void setPayment(final PaymentReference payment); + + /** + *

Reference to the Payment Integration to use to execute the payment.

+ * @param paymentIntegration value to be set + */ + + public void setPaymentIntegration(final PaymentIntegrationReference paymentIntegration); + + /** + *

Money value of the Transaction Item.

+ * @param amount value to be set + */ + + public void setAmount(final Amount amount); + + /** + * factory method + * @return instance of TransactionItem + */ + public static TransactionItem of() { + return new TransactionItemImpl(); + } + + /** + * factory method to create a shallow copy TransactionItem + * @param template instance to be copied + * @return copy instance + */ + public static TransactionItem of(final TransactionItem template) { + TransactionItemImpl instance = new TransactionItemImpl(); + instance.setPayment(template.getPayment()); + instance.setPaymentIntegration(template.getPaymentIntegration()); + instance.setAmount(template.getAmount()); + return instance; + } + + public TransactionItem copyDeep(); + + /** + * factory method to create a deep copy of TransactionItem + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TransactionItem deepCopy(@Nullable final TransactionItem template) { + if (template == null) { + return null; + } + TransactionItemImpl instance = new TransactionItemImpl(); + instance.setPayment(com.commercetools.checkout.models.payment.PaymentReference.deepCopy(template.getPayment())); + instance.setPaymentIntegration(com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference + .deepCopy(template.getPaymentIntegration())); + instance.setAmount(com.commercetools.checkout.models.common.Amount.deepCopy(template.getAmount())); + return instance; + } + + /** + * builder factory method for TransactionItem + * @return builder + */ + public static TransactionItemBuilder builder() { + return TransactionItemBuilder.of(); + } + + /** + * create builder for TransactionItem instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionItemBuilder builder(final TransactionItem template) { + return TransactionItemBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTransactionItem(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemBuilder.java new file mode 100644 index 00000000000..1e019937aa9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemBuilder.java @@ -0,0 +1,212 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TransactionItemBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionItem transactionItem = TransactionItem.builder()
+ *             .paymentIntegration(paymentIntegrationBuilder -> paymentIntegrationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionItemBuilder implements Builder { + + @Nullable + private com.commercetools.checkout.models.payment.PaymentReference payment; + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference paymentIntegration; + + @Nullable + private com.commercetools.checkout.models.common.Amount amount; + + /** + *

Reference to the Payment associated with the Transaction Item.

+ * @param builder function to build the payment value + * @return Builder + */ + + public TransactionItemBuilder payment( + Function builder) { + this.payment = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()).build(); + return this; + } + + /** + *

Reference to the Payment associated with the Transaction Item.

+ * @param builder function to build the payment value + * @return Builder + */ + + public TransactionItemBuilder withPayment( + Function builder) { + this.payment = builder.apply(com.commercetools.checkout.models.payment.PaymentReferenceBuilder.of()); + return this; + } + + /** + *

Reference to the Payment associated with the Transaction Item.

+ * @param payment value to be set + * @return Builder + */ + + public TransactionItemBuilder payment( + @Nullable final com.commercetools.checkout.models.payment.PaymentReference payment) { + this.payment = payment; + return this; + } + + /** + *

Reference to the Payment Integration to use to execute the payment.

+ * @param builder function to build the paymentIntegration value + * @return Builder + */ + + public TransactionItemBuilder paymentIntegration( + Function builder) { + this.paymentIntegration = builder + .apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

Reference to the Payment Integration to use to execute the payment.

+ * @param builder function to build the paymentIntegration value + * @return Builder + */ + + public TransactionItemBuilder withPaymentIntegration( + Function builder) { + this.paymentIntegration = builder + .apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceBuilder.of()); + return this; + } + + /** + *

Reference to the Payment Integration to use to execute the payment.

+ * @param paymentIntegration value to be set + * @return Builder + */ + + public TransactionItemBuilder paymentIntegration( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference paymentIntegration) { + this.paymentIntegration = paymentIntegration; + return this; + } + + /** + *

Money value of the Transaction Item.

+ * @param builder function to build the amount value + * @return Builder + */ + + public TransactionItemBuilder amount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()).build(); + return this; + } + + /** + *

Money value of the Transaction Item.

+ * @param builder function to build the amount value + * @return Builder + */ + + public TransactionItemBuilder withAmount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()); + return this; + } + + /** + *

Money value of the Transaction Item.

+ * @param amount value to be set + * @return Builder + */ + + public TransactionItemBuilder amount(@Nullable final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + return this; + } + + /** + *

Reference to the Payment associated with the Transaction Item.

+ * @return payment + */ + + @Nullable + public com.commercetools.checkout.models.payment.PaymentReference getPayment() { + return this.payment; + } + + /** + *

Reference to the Payment Integration to use to execute the payment.

+ * @return paymentIntegration + */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference getPaymentIntegration() { + return this.paymentIntegration; + } + + /** + *

Money value of the Transaction Item.

+ * @return amount + */ + + @Nullable + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + /** + * builds TransactionItem with checking for non-null required values + * @return TransactionItem + */ + public TransactionItem build() { + Objects.requireNonNull(paymentIntegration, TransactionItem.class + ": paymentIntegration is missing"); + return new TransactionItemImpl(payment, paymentIntegration, amount); + } + + /** + * builds TransactionItem without checking for non-null required values + * @return TransactionItem + */ + public TransactionItem buildUnchecked() { + return new TransactionItemImpl(payment, paymentIntegration, amount); + } + + /** + * factory method for an instance of TransactionItemBuilder + * @return builder + */ + public static TransactionItemBuilder of() { + return new TransactionItemBuilder(); + } + + /** + * create builder for TransactionItem instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionItemBuilder of(final TransactionItem template) { + TransactionItemBuilder builder = new TransactionItemBuilder(); + builder.payment = template.getPayment(); + builder.paymentIntegration = template.getPaymentIntegration(); + builder.amount = template.getAmount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraft.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraft.java new file mode 100644 index 00000000000..ec2ccec6c69 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraft.java @@ -0,0 +1,147 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Amount; +import com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * TransactionItemDraft + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionItemDraft transactionItemDraft = TransactionItemDraft.builder()
+ *             .paymentIntegration(paymentIntegrationBuilder -> paymentIntegrationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TransactionItemDraftImpl.class) +public interface TransactionItemDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

Resource Identifier of the Payment Integration to use to execute the payment.

+ * @return paymentIntegration + */ + @NotNull + @Valid + @JsonProperty("paymentIntegration") + public PaymentIntegrationResourceIdentifier getPaymentIntegration(); + + /** + *

Money value of the Transaction Item.

+ * @return amount + */ + @Valid + @JsonProperty("amount") + public Amount getAmount(); + + /** + *

Resource Identifier of the Payment Integration to use to execute the payment.

+ * @param paymentIntegration value to be set + */ + + public void setPaymentIntegration(final PaymentIntegrationResourceIdentifier paymentIntegration); + + /** + *

Money value of the Transaction Item.

+ * @param amount value to be set + */ + + public void setAmount(final Amount amount); + + /** + * factory method + * @return instance of TransactionItemDraft + */ + public static TransactionItemDraft of() { + return new TransactionItemDraftImpl(); + } + + /** + * factory method to create a shallow copy TransactionItemDraft + * @param template instance to be copied + * @return copy instance + */ + public static TransactionItemDraft of(final TransactionItemDraft template) { + TransactionItemDraftImpl instance = new TransactionItemDraftImpl(); + instance.setPaymentIntegration(template.getPaymentIntegration()); + instance.setAmount(template.getAmount()); + return instance; + } + + public TransactionItemDraft copyDeep(); + + /** + * factory method to create a deep copy of TransactionItemDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TransactionItemDraft deepCopy(@Nullable final TransactionItemDraft template) { + if (template == null) { + return null; + } + TransactionItemDraftImpl instance = new TransactionItemDraftImpl(); + instance.setPaymentIntegration( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier + .deepCopy(template.getPaymentIntegration())); + instance.setAmount(com.commercetools.checkout.models.common.Amount.deepCopy(template.getAmount())); + return instance; + } + + /** + * builder factory method for TransactionItemDraft + * @return builder + */ + public static TransactionItemDraftBuilder builder() { + return TransactionItemDraftBuilder.of(); + } + + /** + * create builder for TransactionItemDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionItemDraftBuilder builder(final TransactionItemDraft template) { + return TransactionItemDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTransactionItemDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftBuilder.java new file mode 100644 index 00000000000..177b5dfaa72 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftBuilder.java @@ -0,0 +1,163 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TransactionItemDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionItemDraft transactionItemDraft = TransactionItemDraft.builder()
+ *             .paymentIntegration(paymentIntegrationBuilder -> paymentIntegrationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionItemDraftBuilder implements Builder { + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier paymentIntegration; + + @Nullable + private com.commercetools.checkout.models.common.Amount amount; + + /** + *

Resource Identifier of the Payment Integration to use to execute the payment.

+ * @param builder function to build the paymentIntegration value + * @return Builder + */ + + public TransactionItemDraftBuilder paymentIntegration( + Function builder) { + this.paymentIntegration = builder + .apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierBuilder + .of()) + .build(); + return this; + } + + /** + *

Resource Identifier of the Payment Integration to use to execute the payment.

+ * @param builder function to build the paymentIntegration value + * @return Builder + */ + + public TransactionItemDraftBuilder withPaymentIntegration( + Function builder) { + this.paymentIntegration = builder.apply( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Resource Identifier of the Payment Integration to use to execute the payment.

+ * @param paymentIntegration value to be set + * @return Builder + */ + + public TransactionItemDraftBuilder paymentIntegration( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier paymentIntegration) { + this.paymentIntegration = paymentIntegration; + return this; + } + + /** + *

Money value of the Transaction Item.

+ * @param builder function to build the amount value + * @return Builder + */ + + public TransactionItemDraftBuilder amount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()).build(); + return this; + } + + /** + *

Money value of the Transaction Item.

+ * @param builder function to build the amount value + * @return Builder + */ + + public TransactionItemDraftBuilder withAmount( + Function builder) { + this.amount = builder.apply(com.commercetools.checkout.models.common.AmountBuilder.of()); + return this; + } + + /** + *

Money value of the Transaction Item.

+ * @param amount value to be set + * @return Builder + */ + + public TransactionItemDraftBuilder amount(@Nullable final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + return this; + } + + /** + *

Resource Identifier of the Payment Integration to use to execute the payment.

+ * @return paymentIntegration + */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier getPaymentIntegration() { + return this.paymentIntegration; + } + + /** + *

Money value of the Transaction Item.

+ * @return amount + */ + + @Nullable + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + /** + * builds TransactionItemDraft with checking for non-null required values + * @return TransactionItemDraft + */ + public TransactionItemDraft build() { + Objects.requireNonNull(paymentIntegration, TransactionItemDraft.class + ": paymentIntegration is missing"); + return new TransactionItemDraftImpl(paymentIntegration, amount); + } + + /** + * builds TransactionItemDraft without checking for non-null required values + * @return TransactionItemDraft + */ + public TransactionItemDraft buildUnchecked() { + return new TransactionItemDraftImpl(paymentIntegration, amount); + } + + /** + * factory method for an instance of TransactionItemDraftBuilder + * @return builder + */ + public static TransactionItemDraftBuilder of() { + return new TransactionItemDraftBuilder(); + } + + /** + * create builder for TransactionItemDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionItemDraftBuilder of(final TransactionItemDraft template) { + TransactionItemDraftBuilder builder = new TransactionItemDraftBuilder(); + builder.paymentIntegration = template.getPaymentIntegration(); + builder.amount = template.getAmount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftImpl.java new file mode 100644 index 00000000000..f75aac3c6e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftImpl.java @@ -0,0 +1,105 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * TransactionItemDraft + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionItemDraftImpl implements TransactionItemDraft, ModelBase { + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier paymentIntegration; + + private com.commercetools.checkout.models.common.Amount amount; + + /** + * create instance with all properties + */ + @JsonCreator + TransactionItemDraftImpl( + @JsonProperty("paymentIntegration") final com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier paymentIntegration, + @JsonProperty("amount") final com.commercetools.checkout.models.common.Amount amount) { + this.paymentIntegration = paymentIntegration; + this.amount = amount; + } + + /** + * create empty instance + */ + public TransactionItemDraftImpl() { + } + + /** + *

Resource Identifier of the Payment Integration to use to execute the payment.

+ */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier getPaymentIntegration() { + return this.paymentIntegration; + } + + /** + *

Money value of the Transaction Item.

+ */ + + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + public void setPaymentIntegration( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifier paymentIntegration) { + this.paymentIntegration = paymentIntegration; + } + + public void setAmount(final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TransactionItemDraftImpl that = (TransactionItemDraftImpl) o; + + return new EqualsBuilder().append(paymentIntegration, that.paymentIntegration) + .append(amount, that.amount) + .append(paymentIntegration, that.paymentIntegration) + .append(amount, that.amount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(paymentIntegration).append(amount).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) + .append("paymentIntegration", paymentIntegration) + .append("amount", amount) + .build(); + } + + @Override + public TransactionItemDraft copyDeep() { + return TransactionItemDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java new file mode 100644 index 00000000000..4edbe40d894 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java @@ -0,0 +1,123 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Payment information related to the Transaction.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionItemImpl implements TransactionItem, ModelBase { + + private com.commercetools.checkout.models.payment.PaymentReference payment; + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference paymentIntegration; + + private com.commercetools.checkout.models.common.Amount amount; + + /** + * create instance with all properties + */ + @JsonCreator + TransactionItemImpl( + @JsonProperty("payment") final com.commercetools.checkout.models.payment.PaymentReference payment, + @JsonProperty("paymentIntegration") final com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference paymentIntegration, + @JsonProperty("amount") final com.commercetools.checkout.models.common.Amount amount) { + this.payment = payment; + this.paymentIntegration = paymentIntegration; + this.amount = amount; + } + + /** + * create empty instance + */ + public TransactionItemImpl() { + } + + /** + *

Reference to the Payment associated with the Transaction Item.

+ */ + + public com.commercetools.checkout.models.payment.PaymentReference getPayment() { + return this.payment; + } + + /** + *

Reference to the Payment Integration to use to execute the payment.

+ */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference getPaymentIntegration() { + return this.paymentIntegration; + } + + /** + *

Money value of the Transaction Item.

+ */ + + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + + public void setPayment(final com.commercetools.checkout.models.payment.PaymentReference payment) { + this.payment = payment; + } + + public void setPaymentIntegration( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference paymentIntegration) { + this.paymentIntegration = paymentIntegration; + } + + public void setAmount(final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TransactionItemImpl that = (TransactionItemImpl) o; + + return new EqualsBuilder().append(payment, that.payment) + .append(paymentIntegration, that.paymentIntegration) + .append(amount, that.amount) + .append(payment, that.payment) + .append(paymentIntegration, that.paymentIntegration) + .append(amount, that.amount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(payment).append(paymentIntegration).append(amount).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("payment", payment) + .append("paymentIntegration", paymentIntegration) + .append("amount", amount) + .build(); + } + + @Override + public TransactionItem copyDeep() { + return TransactionItem.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionState.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionState.java new file mode 100644 index 00000000000..02c31f8a8fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionState.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

The state of the Transaction.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface TransactionState extends JsonEnum { + + /** +

The Transaction has started. The Connector is requesting the PSP or gift card management system to execute the payment for the Cart.

*/ + TransactionState INITIAL = TransactionStateEnum.INITIAL; + /** +

The Transaction is in progress. The PSP or gift card management system is processing the payment.

*/ + TransactionState PENDING = TransactionStateEnum.PENDING; + /** +

The Transaction completed successfully. The PSP or gift card management system processed the payment and Checkout created an Order from the Cart.

*/ + TransactionState COMPLETED = TransactionStateEnum.COMPLETED; + /** +

The Transaction failed.

*/ + TransactionState FAILED = TransactionStateEnum.FAILED; + + /** + * possible values of TransactionState + */ + enum TransactionStateEnum implements TransactionState { + /** + * Initial + */ + INITIAL("Initial"), + + /** + * Pending + */ + PENDING("Pending"), + + /** + * Completed + */ + COMPLETED("Completed"), + + /** + * Failed + */ + FAILED("Failed"); + private final String jsonName; + + private TransactionStateEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of TransactionState + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static TransactionState findEnum(String value) { + return findEnumViaJsonName(value).orElse(new TransactionState() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static TransactionState[] values() { + return TransactionStateEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatus.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatus.java new file mode 100644 index 00000000000..3bec1adf537 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatus.java @@ -0,0 +1,155 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

The state of the Transaction and the related errors in case of a failed Transaction.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionStatus transactionStatus = TransactionStatus.builder()
+ *             .state(TransactionState.INITIAL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TransactionStatusImpl.class) +public interface TransactionStatus { + + /** + *

State of the Transaction.

+ * @return state + */ + @NotNull + @JsonProperty("state") + public TransactionState getState(); + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @return errors + */ + @Valid + @JsonProperty("errors") + public List getErrors(); + + /** + *

State of the Transaction.

+ * @param state value to be set + */ + + public void setState(final TransactionState state); + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param errors values to be set + */ + + @JsonIgnore + public void setErrors(final TransactionError... errors); + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param errors values to be set + */ + + public void setErrors(final List errors); + + /** + * factory method + * @return instance of TransactionStatus + */ + public static TransactionStatus of() { + return new TransactionStatusImpl(); + } + + /** + * factory method to create a shallow copy TransactionStatus + * @param template instance to be copied + * @return copy instance + */ + public static TransactionStatus of(final TransactionStatus template) { + TransactionStatusImpl instance = new TransactionStatusImpl(); + instance.setState(template.getState()); + instance.setErrors(template.getErrors()); + return instance; + } + + public TransactionStatus copyDeep(); + + /** + * factory method to create a deep copy of TransactionStatus + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TransactionStatus deepCopy(@Nullable final TransactionStatus template) { + if (template == null) { + return null; + } + TransactionStatusImpl instance = new TransactionStatusImpl(); + instance.setState(template.getState()); + instance.setErrors(Optional.ofNullable(template.getErrors()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.transaction.TransactionError::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for TransactionStatus + * @return builder + */ + public static TransactionStatusBuilder builder() { + return TransactionStatusBuilder.of(); + } + + /** + * create builder for TransactionStatus instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionStatusBuilder builder(final TransactionStatus template) { + return TransactionStatusBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTransactionStatus(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusBuilder.java new file mode 100644 index 00000000000..e4b82b8c61e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusBuilder.java @@ -0,0 +1,190 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TransactionStatusBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     TransactionStatus transactionStatus = TransactionStatus.builder()
+ *             .state(TransactionState.INITIAL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionStatusBuilder implements Builder { + + private com.commercetools.checkout.models.transaction.TransactionState state; + + @Nullable + private java.util.List errors; + + /** + *

State of the Transaction.

+ * @param state value to be set + * @return Builder + */ + + public TransactionStatusBuilder state(final com.commercetools.checkout.models.transaction.TransactionState state) { + this.state = state; + return this; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param errors value to be set + * @return Builder + */ + + public TransactionStatusBuilder errors( + @Nullable final com.commercetools.checkout.models.transaction.TransactionError... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + return this; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param errors value to be set + * @return Builder + */ + + public TransactionStatusBuilder errors( + @Nullable final java.util.List errors) { + this.errors = errors; + return this; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param errors value to be set + * @return Builder + */ + + public TransactionStatusBuilder plusErrors( + @Nullable final com.commercetools.checkout.models.transaction.TransactionError... errors) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.addAll(Arrays.asList(errors)); + return this; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param builder function to build the errors value + * @return Builder + */ + + public TransactionStatusBuilder plusErrors( + Function builder) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors + .add(builder.apply(com.commercetools.checkout.models.transaction.TransactionErrorBuilder.of()).build()); + return this; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param builder function to build the errors value + * @return Builder + */ + + public TransactionStatusBuilder withErrors( + Function builder) { + this.errors = new ArrayList<>(); + this.errors + .add(builder.apply(com.commercetools.checkout.models.transaction.TransactionErrorBuilder.of()).build()); + return this; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param builder function to build the errors value + * @return Builder + */ + + public TransactionStatusBuilder addErrors( + Function builder) { + return plusErrors(builder.apply(com.commercetools.checkout.models.transaction.TransactionErrorBuilder.of())); + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @param builder function to build the errors value + * @return Builder + */ + + public TransactionStatusBuilder setErrors( + Function builder) { + return errors(builder.apply(com.commercetools.checkout.models.transaction.TransactionErrorBuilder.of())); + } + + /** + *

State of the Transaction.

+ * @return state + */ + + public com.commercetools.checkout.models.transaction.TransactionState getState() { + return this.state; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ * @return errors + */ + + @Nullable + public java.util.List getErrors() { + return this.errors; + } + + /** + * builds TransactionStatus with checking for non-null required values + * @return TransactionStatus + */ + public TransactionStatus build() { + Objects.requireNonNull(state, TransactionStatus.class + ": state is missing"); + return new TransactionStatusImpl(state, errors); + } + + /** + * builds TransactionStatus without checking for non-null required values + * @return TransactionStatus + */ + public TransactionStatus buildUnchecked() { + return new TransactionStatusImpl(state, errors); + } + + /** + * factory method for an instance of TransactionStatusBuilder + * @return builder + */ + public static TransactionStatusBuilder of() { + return new TransactionStatusBuilder(); + } + + /** + * create builder for TransactionStatus instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TransactionStatusBuilder of(final TransactionStatus template) { + TransactionStatusBuilder builder = new TransactionStatusBuilder(); + builder.state = template.getState(); + builder.errors = template.getErrors(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusImpl.java new file mode 100644 index 00000000000..9187fee5b48 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusImpl.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

The state of the Transaction and the related errors in case of a failed Transaction.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TransactionStatusImpl implements TransactionStatus, ModelBase { + + private com.commercetools.checkout.models.transaction.TransactionState state; + + private java.util.List errors; + + /** + * create instance with all properties + */ + @JsonCreator + TransactionStatusImpl( + @JsonProperty("state") final com.commercetools.checkout.models.transaction.TransactionState state, + @JsonProperty("errors") final java.util.List errors) { + this.state = state; + this.errors = errors; + } + + /** + * create empty instance + */ + public TransactionStatusImpl() { + } + + /** + *

State of the Transaction.

+ */ + + public com.commercetools.checkout.models.transaction.TransactionState getState() { + return this.state; + } + + /** + *

Errors returned if the Transaction is in the Failed state.

+ */ + + public java.util.List getErrors() { + return this.errors; + } + + public void setState(final com.commercetools.checkout.models.transaction.TransactionState state) { + this.state = state; + } + + public void setErrors(final com.commercetools.checkout.models.transaction.TransactionError... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + } + + public void setErrors(final java.util.List errors) { + this.errors = errors; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TransactionStatusImpl that = (TransactionStatusImpl) o; + + return new EqualsBuilder().append(state, that.state) + .append(errors, that.errors) + .append(state, that.state) + .append(errors, that.errors) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(state).append(errors).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("state", state) + .append("errors", errors) + .build(); + } + + @Override + public TransactionStatus copyDeep() { + return TransactionStatus.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/CheckoutCorrelationIdProvider.java b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/CheckoutCorrelationIdProvider.java new file mode 100644 index 00000000000..c757806c2e2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/CheckoutCorrelationIdProvider.java @@ -0,0 +1,19 @@ + +package com.commercetools.checkout.client; + +import java.util.UUID; + +import io.vrap.rmf.base.client.http.CorrelationIdProvider; + +public class CheckoutCorrelationIdProvider implements CorrelationIdProvider { + private final String projectKey; + + public CheckoutCorrelationIdProvider(String projectKey) { + this.projectKey = projectKey; + } + + @Override + public String getCorrelationId() { + return projectKey + "/" + UUID.randomUUID(); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/ProjectApiRoot.java b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/ProjectApiRoot.java new file mode 100644 index 00000000000..3b55d61e62c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/ProjectApiRoot.java @@ -0,0 +1,56 @@ + +package com.commercetools.checkout.client; + +import java.io.Closeable; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.SerializerOnlyApiHttpClient; + +public class ProjectApiRoot implements Closeable, ProjectScopedApiRoot { + private final String projectKey; + private final ApiHttpClient apiHttpClient; + + private ProjectApiRoot(final String projectKey, final ApiHttpClient apiHttpClient) { + this.projectKey = projectKey; + this.apiHttpClient = apiHttpClient; + } + + public static ProjectApiRoot of(final String projectKey) { + return new ProjectApiRoot(projectKey, SerializerOnlyApiHttpClient.of()); + } + + public static ProjectApiRoot fromClient(final String projectKey, final ApiHttpClient apiHttpClient) { + return new ProjectApiRoot(projectKey, apiHttpClient); + } + + @Override + public ByProjectKeyRequestBuilder with() { + return ApiRoot.fromClient(apiHttpClient).withProjectKey(projectKey); + } + + @Override + public ByProjectKeyPaymentIntentsRequestBuilder paymentIntents() { + return with().paymentIntents(); + } + + @Override + public ByProjectKeyTransactionsRequestBuilder transactions() { + return with().transactions(); + } + + public ByProjectKeyRequestBuilder withProjectKey(final String projectKey) { + return ApiRoot.fromClient(apiHttpClient).withProjectKey(projectKey); + } + + @Override + public void close() { + if (apiHttpClient == null) { + return; + } + try { + apiHttpClient.close(); + } + catch (final Throwable ignored) { + } + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/ProjectScopedApiRoot.java b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/ProjectScopedApiRoot.java new file mode 100644 index 00000000000..3d87bb9ad30 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/client/ProjectScopedApiRoot.java @@ -0,0 +1,10 @@ + +package com.commercetools.checkout.client; + +public interface ProjectScopedApiRoot { + ByProjectKeyRequestBuilder with(); + + ByProjectKeyTransactionsRequestBuilder transactions(); + + ByProjectKeyPaymentIntentsRequestBuilder paymentIntents(); +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/defaultconfig/CheckoutApiRootBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/defaultconfig/CheckoutApiRootBuilder.java new file mode 100644 index 00000000000..384e502191b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/defaultconfig/CheckoutApiRootBuilder.java @@ -0,0 +1,497 @@ + +package com.commercetools.checkout.defaultconfig; + +import java.net.URI; +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ScheduledExecutorService; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.function.UnaryOperator; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.client.ApiRoot; +import com.commercetools.checkout.client.ByProjectKeyRequestBuilder; +import com.commercetools.checkout.client.CheckoutCorrelationIdProvider; +import com.commercetools.checkout.client.ProjectApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.error.HttpExceptionFactory; +import io.vrap.rmf.base.client.http.*; +import io.vrap.rmf.base.client.oauth2.ClientCredentials; +import io.vrap.rmf.base.client.oauth2.TokenSupplier; + +import org.slf4j.event.Level; + +import dev.failsafe.spi.Scheduler; + +public class CheckoutApiRootBuilder { + private final ClientBuilder builder; + + private CheckoutApiRootBuilder(ClientBuilder builder) { + this.builder = builder; + } + + public static CheckoutApiRootBuilder of() { + return new CheckoutApiRootBuilder(ClientBuilder.of()); + } + + public static CheckoutApiRootBuilder of(final VrapHttpClient httpClient) { + return new CheckoutApiRootBuilder(ClientBuilder.of(httpClient)); + } + + public static CheckoutApiRootBuilder of(final HandlerStack stack) { + return new CheckoutApiRootBuilder(ClientBuilder.of(stack)); + } + + public CheckoutApiRootBuilder withAuthCircuitBreaker() { + builder.withAuthCircuitBreaker(); + return this; + } + + public CheckoutApiRootBuilder withoutAuthCircuitBreaker() { + builder.withoutAuthCircuitBreaker(); + return this; + } + + public CheckoutApiRootBuilder withAuthRetries(final int authRetries) { + builder.withAuthRetries(authRetries); + return this; + } + + public CheckoutApiRootBuilder withHandlerStack(final HandlerStack stack) { + builder.withHandlerStack(stack); + return this; + } + + public CheckoutApiRootBuilder withHttpClient(final VrapHttpClient httpClient) { + builder.withHttpClient(httpClient); + return this; + } + + public CheckoutApiRootBuilder withSerializer(final ResponseSerializer serializer) { + builder.withSerializer(serializer); + return this; + } + + public CheckoutApiRootBuilder withSerializer(final Supplier serializer) { + builder.withSerializer(serializer); + return this; + } + + public CheckoutApiRootBuilder withHttpExceptionFactory(final HttpExceptionFactory factory) { + builder.withHttpExceptionFactory(factory); + return this; + } + + public CheckoutApiRootBuilder withHttpExceptionFactory( + final Function factory) { + builder.withHttpExceptionFactory(factory); + return this; + } + + public CheckoutApiRootBuilder withHttpExceptionFactory(final Supplier factory) { + builder.withHttpExceptionFactory(factory); + return this; + } + + public CheckoutApiRootBuilder defaultClient(final ClientCredentials credentials) { + return defaultClient(credentials, ServiceRegion.GCP_EUROPE_WEST1); + } + + public CheckoutApiRootBuilder defaultClient(final ClientCredentials credentials, + ServiceRegionConfig serviceRegion) { + builder.defaultClient(credentials, serviceRegion); + + return this; + } + + public CheckoutApiRootBuilder defaultClient(final ClientCredentials credentials, final String tokenEndpoint, + final String apiEndpoint) { + return this.defaultClient(URI.create(apiEndpoint)).withClientCredentialsFlow(credentials, tokenEndpoint); + } + + public CheckoutApiRootBuilder defaultClient(final String apiEndpoint, final ClientCredentials credentials, + final String tokenEndpoint) { + return this.defaultClient(URI.create(apiEndpoint)).withClientCredentialsFlow(credentials, tokenEndpoint); + } + + public CheckoutApiRootBuilder defaultClient(final String apiEndpoint) { + return this.defaultClient(URI.create(apiEndpoint)); + } + + public CheckoutApiRootBuilder defaultClient(final URI apiEndpoint) { + builder.defaultClient(apiEndpoint); + + return this; + } + + public CheckoutApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, + final String tokenEndpoint) { + builder.withClientCredentialsFlow(credentials, tokenEndpoint); + + return this; + } + + public CheckoutApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, + final String tokenEndpoint, final VrapHttpClient httpClient) { + builder.withClientCredentialsFlow(credentials, tokenEndpoint, httpClient); + + return this; + } + + public CheckoutApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, + final URI tokenEndpoint) { + builder.withClientCredentialsFlow(credentials, tokenEndpoint); + + return this; + } + + public CheckoutApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, + final URI tokenEndpoint, final VrapHttpClient httpClient) { + builder.withClientCredentialsFlow(credentials, tokenEndpoint, httpClient); + + return this; + } + + public CheckoutApiRootBuilder withStaticTokenFlow(final AuthenticationToken token) { + builder.withStaticTokenFlow(token); + + return this; + } + + public CheckoutApiRootBuilder withAnonymousSessionFlow(final ClientCredentials credentials, + final String tokenEndpoint) { + builder.withAnonymousSessionFlow(credentials, tokenEndpoint); + + return this; + } + + public CheckoutApiRootBuilder withAnonymousSessionFlow(final ClientCredentials credentials, + final String tokenEndpoint, final VrapHttpClient httpClient) { + builder.withAnonymousSessionFlow(credentials, tokenEndpoint, httpClient); + + return this; + } + + public CheckoutApiRootBuilder withGlobalCustomerPasswordFlow(final ClientCredentials credentials, + final String email, final String password, final String tokenEndpoint) { + builder.withGlobalCustomerPasswordFlow(credentials, email, password, tokenEndpoint); + + return this; + } + + public CheckoutApiRootBuilder withGlobalCustomerPasswordFlow(final ClientCredentials credentials, + final String email, final String password, final String tokenEndpoint, final VrapHttpClient httpClient) { + builder.withGlobalCustomerPasswordFlow(credentials, email, password, tokenEndpoint, httpClient); + + return this; + } + + public CheckoutApiRootBuilder addAcceptGZipMiddleware() { + builder.addAcceptGZipMiddleware(); + + return this; + } + + public CheckoutApiRootBuilder withErrorMiddleware() { + builder.withErrorMiddleware(); + + return this; + } + + public CheckoutApiRootBuilder withErrorMiddleware(final ErrorMiddleware errorMiddleware) { + builder.withErrorMiddleware(errorMiddleware); + + return this; + } + + public CheckoutApiRootBuilder withPolicies(final Function fn) { + return with(clientBuilder -> clientBuilder.withPolicies(fn)); + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withRetryMiddleware(Supplier retryMiddleware) { + builder.withRetryMiddleware(retryMiddleware); + + return this; + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withRetryMiddleware(RetryRequestMiddleware retryMiddleware) { + builder.withRetryMiddleware(retryMiddleware); + + return this; + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withRetryMiddleware(final int maxRetries) { + builder.withRetryMiddleware(maxRetries); + + return this; + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withRetryMiddleware(final int maxRetries, List statusCodes) { + builder.withRetryMiddleware(maxRetries, statusCodes); + + return this; + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withRetryMiddleware(final int maxRetries, List statusCodes, + final List> failures) { + builder.withRetryMiddleware(maxRetries, statusCodes, failures); + + return this; + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withRetryMiddleware(final int maxRetries, final long delay, final long maxDelay, + List statusCodes, final List> failures, + final FailsafeRetryPolicyBuilderOptions fn) { + builder.withRetryMiddleware(maxRetries, delay, maxDelay, statusCodes, failures, fn); + + return this; + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withRetryMiddleware(final int maxRetries, final long delay, final long maxDelay, + final FailsafeRetryPolicyBuilderOptions fn) { + builder.withRetryMiddleware(maxRetries, delay, maxDelay, fn); + + return this; + } + + public CheckoutApiRootBuilder withOAuthMiddleware(final Supplier oAuthMiddleware) { + builder.withOAuthMiddleware(oAuthMiddleware); + + return this; + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withQueueMiddleware(final Supplier queueMiddleware) { + return with(clientBuilder -> clientBuilder.withQueueMiddleware(queueMiddleware)); + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withQueueMiddleware(final QueueRequestMiddleware queueMiddleware) { + return with(clientBuilder -> clientBuilder.withQueueMiddleware(queueMiddleware)); + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withQueueMiddleware(final int maxRequests, final Duration maxWaitTime) { + return with(clientBuilder -> clientBuilder.withQueueMiddleware(maxRequests, maxWaitTime)); + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withQueueMiddleware(final Scheduler scheduler, final int maxRequests, + final Duration maxWaitTime) { + return with(clientBuilder -> clientBuilder.withQueueMiddleware(scheduler, maxRequests, maxWaitTime)); + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withQueueMiddleware(final ScheduledExecutorService executorService, + final int maxRequests, final Duration maxWaitTime) { + return with(clientBuilder -> clientBuilder.withQueueMiddleware(executorService, maxRequests, maxWaitTime)); + } + + /** + * @deprecated use {@link #withPolicies(Function)} instead + */ + @Deprecated + public CheckoutApiRootBuilder withQueueMiddleware(final ExecutorService executorService, final int maxRequests, + final Duration maxWaitTime) { + return with(clientBuilder -> clientBuilder.withQueueMiddleware(executorService, maxRequests, maxWaitTime)); + } + + public CheckoutApiRootBuilder withOAuthMiddleware(final OAuthMiddleware oAuthMiddleware) { + builder.withOAuthMiddleware(oAuthMiddleware); + + return this; + } + + public CheckoutApiRootBuilder withTokenSupplier(final TokenSupplier tokenSupplier) { + builder.withTokenSupplier(tokenSupplier); + + return this; + } + + public CheckoutApiRootBuilder withTokenSupplier(final Supplier tokenSupplier) { + builder.withTokenSupplier(tokenSupplier); + + return this; + } + + public CheckoutApiRootBuilder withInternalLoggerMiddleware( + final InternalLoggerMiddleware internalLoggerMiddleware) { + builder.withInternalLoggerMiddleware(internalLoggerMiddleware); + + return this; + } + + public CheckoutApiRootBuilder withInternalLoggerFactory(final InternalLoggerFactory internalLoggerFactory) { + builder.withInternalLoggerFactory(internalLoggerFactory); + + return this; + } + + public CheckoutApiRootBuilder withInternalLoggerFactory(final InternalLoggerFactory internalLoggerFactory, + final Level responseLogEvent, final Level deprecationLogEvent) { + builder.withInternalLoggerFactory(internalLoggerFactory, responseLogEvent, deprecationLogEvent); + + return this; + } + + public CheckoutApiRootBuilder withInternalLoggerFactory(final InternalLoggerFactory internalLoggerFactory, + final Level responseLogEvent, final Level deprecationLogEvent, final Level defaultExceptionLogEvent, + final Map, Level> exceptionLogEvents) { + builder.withInternalLoggerFactory(internalLoggerFactory, responseLogEvent, deprecationLogEvent, + defaultExceptionLogEvent, exceptionLogEvents); + + return this; + } + + public CheckoutApiRootBuilder withInternalLoggerFactory(final InternalLoggerFactory internalLoggerFactory, + final Level responseLogEvent, final Level deprecationLogEvent, final Level defaultExceptionLogEvent, + final Map, Level> exceptionLogEvents, + final ResponseLogFormatter responseLogFormatter, final ErrorLogFormatter errorLogFormatter) { + return with(clientBuilder -> clientBuilder.withInternalLoggerFactory(internalLoggerFactory, responseLogEvent, + deprecationLogEvent, defaultExceptionLogEvent, exceptionLogEvents, responseLogFormatter, + errorLogFormatter)); + } + + public CheckoutApiRootBuilder withApiBaseUrl(String apiBaseUrl) { + builder.withApiBaseUrl(apiBaseUrl); + + return this; + } + + public CheckoutApiRootBuilder withApiBaseUrl(final URI apiBaseUrl) { + builder.withApiBaseUrl(apiBaseUrl); + + return this; + } + + public CheckoutApiRootBuilder withUserAgentSupplier(final Supplier userAgentSupplier) { + builder.withUserAgentSupplier(userAgentSupplier); + + return this; + } + + public CheckoutApiRootBuilder addCorrelationIdProvider( + final @Nullable CorrelationIdProvider correlationIdProvider) { + return addCorrelationIdProvider(correlationIdProvider, true); + } + + private CheckoutApiRootBuilder addCorrelationIdProvider(final @Nullable CorrelationIdProvider correlationIdProvider, + final boolean replace) { + builder.addCorrelationIdProvider(correlationIdProvider, replace); + + return this; + } + + public CheckoutApiRootBuilder withMiddleware(final Middleware middleware, final Middleware... middlewares) { + builder.withMiddleware(middleware, middlewares); + + return this; + } + + public CheckoutApiRootBuilder addMiddleware(final Middleware middleware, final Middleware... middlewares) { + builder.addMiddleware(middleware, middlewares); + + return this; + } + + public CheckoutApiRootBuilder withMiddlewares(final List middlewares) { + builder.withMiddlewares(middlewares); + + return this; + } + + public CheckoutApiRootBuilder addMiddlewares(final List middlewares) { + builder.addMiddlewares(middlewares); + + return this; + } + + public CheckoutApiRootBuilder with(UnaryOperator builderUnaryOperator) { + builderUnaryOperator.apply(builder); + + return this; + } + + public ApiRoot build() { + return ApiRoot.fromClient(clientSupplier().get()); + } + + public ApiHttpClient buildClient() { + return clientSupplier().get(); + } + + public Supplier clientSupplier() { + return builder::build; + } + + /** + * @deprecated use {@link #build(String)} instead + */ + @Deprecated + public ByProjectKeyRequestBuilder buildForProject(final String projectKey) { + addCorrelationIdProvider(new CheckoutCorrelationIdProvider(projectKey), false); + return ApiRoot.fromClient(builder.build()).withProjectKey(projectKey); + } + + /** + * @deprecated use {@link #build(String)} instead + */ + @Deprecated + public ProjectApiRoot buildProjectRoot(final String projectKey) { + addCorrelationIdProvider(new CheckoutCorrelationIdProvider(projectKey), false); + return ProjectApiRoot.fromClient(projectKey, builder.build()); + } + + public ProjectApiRoot build(final String projectKey) { + addCorrelationIdProvider(new CheckoutCorrelationIdProvider(projectKey), false); + return ProjectApiRoot.fromClient(projectKey, builder.build()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/defaultconfig/ServiceRegion.java b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/defaultconfig/ServiceRegion.java new file mode 100644 index 00000000000..ace913e2000 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java/com/commercetools/checkout/defaultconfig/ServiceRegion.java @@ -0,0 +1,46 @@ + +package com.commercetools.checkout.defaultconfig; + +import io.vrap.rmf.base.client.ServiceRegionConfig; + +public enum ServiceRegion implements ServiceRegionConfig { + + GCP_EUROPE_WEST1(new RegionHosts("https://checkout.europe-west1.gcp.commercetools.com/", + "https://auth.europe-west1.gcp.commercetools.com")), + GCP_US_CENTRAL1(new RegionHosts("https://checkout.us-central1.gcp.commercetools.com/", + "https://auth.us-central1.gcp.commercetools.com")), + // AWS_US_EAST_2(new RegionHosts("https://checkout.us-east-2.aws.commercetools.com/", + // "https://auth.us-east-2.aws.commercetools.com")), + // AWS_EU_CENTRAL_1(new RegionHosts("https://checkout.eu-central-1.aws.commercetools.com/", + // "https://auth.eu-central-1.aws.commercetools.com")), + GCP_AUSTRALIA_SOUTHEAST1(new RegionHosts("https://checkout.australia-southeast1.gcp.commercetools.com/", + "https://auth.australia-southeast1.gcp.commercetools.com")),; + + public static class RegionHosts { + private final String apiUrl; + private final String authUrl; + + private RegionHosts(String apiUrl, String authUrl) { + this.apiUrl = apiUrl; + this.authUrl = authUrl; + } + } + + private final RegionHosts regionHosts; + + ServiceRegion(RegionHosts regionHosts) { + this.regionHosts = regionHosts; + } + + public String getApiUrl() { + return regionHosts.apiUrl; + } + + public String getAuthUrl() { + return regionHosts.authUrl; + } + + public String getOAuthTokenUrl() { + return regionHosts.authUrl + "/oauth/token"; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntentsByPaymentIdTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntentsByPaymentIdTest.java new file mode 100644 index 00000000000..0e5aba47301 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntentsByPaymentIdTest.java @@ -0,0 +1,72 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntentsByPaymentIdTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntents() + .withPaymentId("test_paymentId") + .post(com.commercetools.checkout.models.payment_intents.PaymentIntent.of()) + .createHttpRequest(), "post", "test_projectKey/payment-intents/test_paymentId", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntents() + .withPaymentId("test_paymentId") + .post(com.commercetools.checkout.models.payment_intents.PaymentIntent.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntentsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntentsTest.java new file mode 100644 index 00000000000..0712b55582f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntentsTest.java @@ -0,0 +1,27 @@ + +package com.commercetools.checkout.client.resource; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntentsTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTest.java new file mode 100644 index 00000000000..25bfddf944e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTest.java @@ -0,0 +1,27 @@ + +package com.commercetools.checkout.client.resource; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsByIdTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsByIdTest.java new file mode 100644 index 00000000000..6cb44df623e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsByIdTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsByIdTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey").transactions().withId("test_id").get().createHttpRequest(), + "get", "test_projectKey/transactions/test_id", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").transactions().withId("test_id").get(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsKeyByKeyTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsKeyByKeyTest.java new file mode 100644 index 00000000000..7ee3ec8a615 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsKeyByKeyTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsKeyByKeyTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey").transactions().withKey("test_key").get().createHttpRequest(), + "get", "test_projectKey/transactions/key=test_key", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").transactions().withKey("test_key").get(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsTest.java new file mode 100644 index 00000000000..66ea2d4dc54 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyTransactionsTest.java @@ -0,0 +1,70 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyTransactionsTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") + .transactions() + .post(com.commercetools.checkout.models.transaction.TransactionDraft.of()) + .createHttpRequest(), "post", "test_projectKey/transactions", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") + .transactions() + .post(com.commercetools.checkout.models.transaction.TransactionDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceTest.java new file mode 100644 index 00000000000..11c2147ea84 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationReferenceBuilder builder) { + ApplicationReference applicationReference = builder.buildUnchecked(); + Assertions.assertThat(applicationReference).isInstanceOf(ApplicationReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ApplicationReference.builder().id("id") } }; + } + + @Test + public void id() { + ApplicationReference value = ApplicationReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierTest.java new file mode 100644 index 00000000000..7c9e47e7278 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationResourceIdentifierBuilder builder) { + ApplicationResourceIdentifier applicationResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(applicationResourceIdentifier).isInstanceOf(ApplicationResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ApplicationResourceIdentifier.builder().id("id") }, + new Object[] { "key", ApplicationResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + ApplicationResourceIdentifier value = ApplicationResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + ApplicationResourceIdentifier value = ApplicationResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/CartReferenceTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/CartReferenceTest.java new file mode 100644 index 00000000000..40a3c54e9e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/CartReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.cart; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartReferenceBuilder builder) { + CartReference cartReference = builder.buildUnchecked(); + Assertions.assertThat(cartReference).isInstanceOf(CartReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", CartReference.builder().id("id") } }; + } + + @Test + public void id() { + CartReference value = CartReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierTest.java new file mode 100644 index 00000000000..d6fa505279a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.cart; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartResourceIdentifierBuilder builder) { + CartResourceIdentifier cartResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(cartResourceIdentifier).isInstanceOf(CartResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", CartResourceIdentifier.builder().id("id") }, + new Object[] { "key", CartResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + CartResourceIdentifier value = CartResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + CartResourceIdentifier value = CartResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/OrderReferenceTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/OrderReferenceTest.java new file mode 100644 index 00000000000..e0fe79092d3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/cart/OrderReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.cart; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderReferenceBuilder builder) { + OrderReference orderReference = builder.buildUnchecked(); + Assertions.assertThat(orderReference).isInstanceOf(OrderReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", OrderReference.builder().id("id") } }; + } + + @Test + public void id() { + OrderReference value = OrderReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/AmountTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/AmountTest.java new file mode 100644 index 00000000000..7783593365c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/AmountTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AmountTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AmountBuilder builder) { + Amount amount = builder.buildUnchecked(); + Assertions.assertThat(amount).isInstanceOf(Amount.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "centAmount", Amount.builder().centAmount(3) }, + new Object[] { "currencyCode", Amount.builder().currencyCode("currencyCode") } }; + } + + @Test + public void centAmount() { + Amount value = Amount.of(); + value.setCentAmount(3); + Assertions.assertThat(value.getCentAmount()).isEqualTo(3); + } + + @Test + public void currencyCode() { + Amount value = Amount.of(); + value.setCurrencyCode("currencyCode"); + Assertions.assertThat(value.getCurrencyCode()).isEqualTo("currencyCode"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorTest.java new file mode 100644 index 00000000000..2ed1b761bb2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ConnectorFailedErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ConnectorFailedErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ConnectorFailedErrorBuilder builder) { + ConnectorFailedError connectorFailedError = builder.buildUnchecked(); + Assertions.assertThat(connectorFailedError).isInstanceOf(ConnectorFailedError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", ConnectorFailedError.builder().message("message") } }; + } + + @Test + public void message() { + ConnectorFailedError value = ConnectorFailedError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/GeneralErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/GeneralErrorTest.java new file mode 100644 index 00000000000..b15ee0360c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/GeneralErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GeneralErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GeneralErrorBuilder builder) { + GeneralError generalError = builder.buildUnchecked(); + Assertions.assertThat(generalError).isInstanceOf(GeneralError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", GeneralError.builder().message("message") } }; + } + + @Test + public void message() { + GeneralError value = GeneralError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorTest.java new file mode 100644 index 00000000000..1ac1e25f450 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InvalidInputErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InvalidInputErrorBuilder builder) { + InvalidInputError invalidInputError = builder.buildUnchecked(); + Assertions.assertThat(invalidInputError).isInstanceOf(InvalidInputError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", InvalidInputError.builder().message("message") } }; + } + + @Test + public void message() { + InvalidInputError value = InvalidInputError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorTest.java new file mode 100644 index 00000000000..219487e856d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InvalidJsonInputErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InvalidJsonInputErrorBuilder builder) { + InvalidJsonInputError invalidJsonInputError = builder.buildUnchecked(); + Assertions.assertThat(invalidJsonInputError).isInstanceOf(InvalidJsonInputError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", InvalidJsonInputError.builder().message("message") }, + new Object[] { "detailedErrorMessage", + InvalidJsonInputError.builder().detailedErrorMessage("detailedErrorMessage") } }; + } + + @Test + public void message() { + InvalidJsonInputError value = InvalidJsonInputError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void detailedErrorMessage() { + InvalidJsonInputError value = InvalidJsonInputError.of(); + value.setDetailedErrorMessage("detailedErrorMessage"); + Assertions.assertThat(value.getDetailedErrorMessage()).isEqualTo("detailedErrorMessage"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorTest.java new file mode 100644 index 00000000000..1d2414c2ee1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MultipleActionsNotAllowedErrorTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MultipleActionsNotAllowedErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MultipleActionsNotAllowedErrorBuilder builder) { + MultipleActionsNotAllowedError multipleActionsNotAllowedError = builder.buildUnchecked(); + Assertions.assertThat(multipleActionsNotAllowedError).isInstanceOf(MultipleActionsNotAllowedError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "message", MultipleActionsNotAllowedError.builder().message("message") } }; + } + + @Test + public void message() { + MultipleActionsNotAllowedError value = MultipleActionsNotAllowedError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorTest.java new file mode 100644 index 00000000000..cd4314d97a8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/PaymentFailureErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentFailureErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentFailureErrorBuilder builder) { + PaymentFailureError paymentFailureError = builder.buildUnchecked(); + Assertions.assertThat(paymentFailureError).isInstanceOf(PaymentFailureError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", PaymentFailureError.builder().message("message") } }; + } + + @Test + public void message() { + PaymentFailureError value = PaymentFailureError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorTest.java new file mode 100644 index 00000000000..deeb5eba7a0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/RequiredFieldErrorTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RequiredFieldErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RequiredFieldErrorBuilder builder) { + RequiredFieldError requiredFieldError = builder.buildUnchecked(); + Assertions.assertThat(requiredFieldError).isInstanceOf(RequiredFieldError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", RequiredFieldError.builder().message("message") }, + new Object[] { "field", RequiredFieldError.builder().field("field") } }; + } + + @Test + public void message() { + RequiredFieldError value = RequiredFieldError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void field() { + RequiredFieldError value = RequiredFieldError.of(); + value.setField("field"); + Assertions.assertThat(value.getField()).isEqualTo("field"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorTest.java new file mode 100644 index 00000000000..be4feebd0a1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ResourceNotFoundErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ResourceNotFoundErrorBuilder builder) { + ResourceNotFoundError resourceNotFoundError = builder.buildUnchecked(); + Assertions.assertThat(resourceNotFoundError).isInstanceOf(ResourceNotFoundError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", ResourceNotFoundError.builder().message("message") } }; + } + + @Test + public void message() { + ResourceNotFoundError value = ResourceNotFoundError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierTest.java new file mode 100644 index 00000000000..6df3802f7a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderResourceIdentifierBuilder builder) { + OrderResourceIdentifier orderResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(orderResourceIdentifier).isInstanceOf(OrderResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", OrderResourceIdentifier.builder().id("id") }, + new Object[] { "key", OrderResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + OrderResourceIdentifier value = OrderResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + OrderResourceIdentifier value = OrderResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceTest.java new file mode 100644 index 00000000000..8cbb70f126d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment/PaymentReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.payment; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentReferenceBuilder builder) { + PaymentReference paymentReference = builder.buildUnchecked(); + Assertions.assertThat(paymentReference).isInstanceOf(PaymentReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", PaymentReference.builder().id("id") } }; + } + + @Test + public void id() { + PaymentReference value = PaymentReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierTest.java new file mode 100644 index 00000000000..604f5abc551 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.payment; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentResourceIdentifierBuilder builder) { + PaymentResourceIdentifier paymentResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(paymentResourceIdentifier).isInstanceOf(PaymentResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", PaymentResourceIdentifier.builder().id("id") }, + new Object[] { "key", PaymentResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + PaymentResourceIdentifier value = PaymentResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + PaymentResourceIdentifier value = PaymentResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceTest.java new file mode 100644 index 00000000000..f444f17565c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationReferenceBuilder builder) { + PaymentIntegrationReference paymentIntegrationReference = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationReference).isInstanceOf(PaymentIntegrationReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", PaymentIntegrationReference.builder().id("id") } }; + } + + @Test + public void id() { + PaymentIntegrationReference value = PaymentIntegrationReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierTest.java new file mode 100644 index 00000000000..6864aa176bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationResourceIdentifierBuilder builder) { + PaymentIntegrationResourceIdentifier paymentIntegrationResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationResourceIdentifier) + .isInstanceOf(PaymentIntegrationResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", PaymentIntegrationResourceIdentifier.builder().id("id") }, + new Object[] { "key", PaymentIntegrationResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + PaymentIntegrationResourceIdentifier value = PaymentIntegrationResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + PaymentIntegrationResourceIdentifier value = PaymentIntegrationResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionTest.java new file mode 100644 index 00000000000..eb3e63a85cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCancelActionTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.checkout.models.payment_intents; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntentCancelActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntentCancelActionBuilder builder) { + PaymentIntentCancelAction paymentIntentCancelAction = builder.buildUnchecked(); + Assertions.assertThat(paymentIntentCancelAction).isInstanceOf(PaymentIntentCancelAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "merchantReference", + PaymentIntentCancelAction.builder().merchantReference("merchantReference") } }; + } + + @Test + public void merchantReference() { + PaymentIntentCancelAction value = PaymentIntentCancelAction.of(); + value.setMerchantReference("merchantReference"); + Assertions.assertThat(value.getMerchantReference()).isEqualTo("merchantReference"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionTest.java new file mode 100644 index 00000000000..3999656d391 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentCaptureActionTest.java @@ -0,0 +1,40 @@ + +package com.commercetools.checkout.models.payment_intents; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntentCaptureActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntentCaptureActionBuilder builder) { + PaymentIntentCaptureAction paymentIntentCaptureAction = builder.buildUnchecked(); + Assertions.assertThat(paymentIntentCaptureAction).isInstanceOf(PaymentIntentCaptureAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "amount", + PaymentIntentCaptureAction.builder() + .amount(new com.commercetools.checkout.models.common.AmountImpl()) }, + new Object[] { "merchantReference", + PaymentIntentCaptureAction.builder().merchantReference("merchantReference") } }; + } + + @Test + public void amount() { + PaymentIntentCaptureAction value = PaymentIntentCaptureAction.of(); + value.setAmount(new com.commercetools.checkout.models.common.AmountImpl()); + Assertions.assertThat(value.getAmount()).isEqualTo(new com.commercetools.checkout.models.common.AmountImpl()); + } + + @Test + public void merchantReference() { + PaymentIntentCaptureAction value = PaymentIntentCaptureAction.of(); + value.setMerchantReference("merchantReference"); + Assertions.assertThat(value.getMerchantReference()).isEqualTo("merchantReference"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionTest.java new file mode 100644 index 00000000000..f80d1ceeb3f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentRefundActionTest.java @@ -0,0 +1,48 @@ + +package com.commercetools.checkout.models.payment_intents; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntentRefundActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntentRefundActionBuilder builder) { + PaymentIntentRefundAction paymentIntentRefundAction = builder.buildUnchecked(); + Assertions.assertThat(paymentIntentRefundAction).isInstanceOf(PaymentIntentRefundAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "amount", + PaymentIntentRefundAction.builder() + .amount(new com.commercetools.checkout.models.common.AmountImpl()) }, + new Object[] { "transactionId", PaymentIntentRefundAction.builder().transactionId("transactionId") }, + new Object[] { "merchantReference", + PaymentIntentRefundAction.builder().merchantReference("merchantReference") } }; + } + + @Test + public void amount() { + PaymentIntentRefundAction value = PaymentIntentRefundAction.of(); + value.setAmount(new com.commercetools.checkout.models.common.AmountImpl()); + Assertions.assertThat(value.getAmount()).isEqualTo(new com.commercetools.checkout.models.common.AmountImpl()); + } + + @Test + public void transactionId() { + PaymentIntentRefundAction value = PaymentIntentRefundAction.of(); + value.setTransactionId("transactionId"); + Assertions.assertThat(value.getTransactionId()).isEqualTo("transactionId"); + } + + @Test + public void merchantReference() { + PaymentIntentRefundAction value = PaymentIntentRefundAction.of(); + value.setMerchantReference("merchantReference"); + Assertions.assertThat(value.getMerchantReference()).isEqualTo("merchantReference"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionTest.java new file mode 100644 index 00000000000..25f9eb73656 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentReverseActionTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.checkout.models.payment_intents; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntentReverseActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntentReverseActionBuilder builder) { + PaymentIntentReverseAction paymentIntentReverseAction = builder.buildUnchecked(); + Assertions.assertThat(paymentIntentReverseAction).isInstanceOf(PaymentIntentReverseAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "merchantReference", + PaymentIntentReverseAction.builder().merchantReference("merchantReference") } }; + } + + @Test + public void merchantReference() { + PaymentIntentReverseAction value = PaymentIntentReverseAction.of(); + value.setMerchantReference("merchantReference"); + Assertions.assertThat(value.getMerchantReference()).isEqualTo("merchantReference"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentTest.java new file mode 100644 index 00000000000..51e85ad5dff --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_intents/PaymentIntentTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.payment_intents; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntentTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntentBuilder builder) { + PaymentIntent paymentIntent = builder.buildUnchecked(); + Assertions.assertThat(paymentIntent).isInstanceOf(PaymentIntent.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "actions", + PaymentIntent.builder() + .actions(Collections.singletonList( + new com.commercetools.checkout.models.payment_intents.PaymentIntentActionImpl())) } }; + } + + @Test + public void actions() { + PaymentIntent value = PaymentIntent.of(); + value.setActions( + Collections.singletonList(new com.commercetools.checkout.models.payment_intents.PaymentIntentActionImpl())); + Assertions.assertThat(value.getActions()) + .isEqualTo(Collections.singletonList( + new com.commercetools.checkout.models.payment_intents.PaymentIntentActionImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorTest.java new file mode 100644 index 00000000000..a9adf680f9d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/AddDiscountCodeErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AddDiscountCodeErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AddDiscountCodeErrorBuilder builder) { + AddDiscountCodeError addDiscountCodeError = builder.buildUnchecked(); + Assertions.assertThat(addDiscountCodeError).isInstanceOf(AddDiscountCodeError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", AddDiscountCodeError.builder().severity("severity") }, + new Object[] { "message", AddDiscountCodeError.builder().message("message") }, + new Object[] { "correlationId", AddDiscountCodeError.builder().correlationId("correlationId") }, + new Object[] { "payload", AddDiscountCodeError.builder().payload("payload") } }; + } + + @Test + public void severity() { + AddDiscountCodeError value = AddDiscountCodeError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + AddDiscountCodeError value = AddDiscountCodeError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + AddDiscountCodeError value = AddDiscountCodeError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + AddDiscountCodeError value = AddDiscountCodeError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedTest.java new file mode 100644 index 00000000000..3d97573afeb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ApplicationDeactivatedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationDeactivatedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationDeactivatedBuilder builder) { + ApplicationDeactivated applicationDeactivated = builder.buildUnchecked(); + Assertions.assertThat(applicationDeactivated).isInstanceOf(ApplicationDeactivated.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", ApplicationDeactivated.builder().severity("severity") }, + new Object[] { "message", ApplicationDeactivated.builder().message("message") }, + new Object[] { "correlationId", ApplicationDeactivated.builder().correlationId("correlationId") }, + new Object[] { "payload", ApplicationDeactivated.builder().payload("payload") } }; + } + + @Test + public void severity() { + ApplicationDeactivated value = ApplicationDeactivated.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ApplicationDeactivated value = ApplicationDeactivated.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ApplicationDeactivated value = ApplicationDeactivated.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + ApplicationDeactivated value = ApplicationDeactivated.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/BadInputDataTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/BadInputDataTest.java new file mode 100644 index 00000000000..dbb87699cd6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/BadInputDataTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class BadInputDataTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, BadInputDataBuilder builder) { + BadInputData badInputData = builder.buildUnchecked(); + Assertions.assertThat(badInputData).isInstanceOf(BadInputData.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", BadInputData.builder().severity("severity") }, + new Object[] { "message", BadInputData.builder().message("message") }, + new Object[] { "correlationId", BadInputData.builder().correlationId("correlationId") }, + new Object[] { "payload", BadInputData.builder().payload("payload") } }; + } + + @Test + public void severity() { + BadInputData value = BadInputData.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + BadInputData value = BadInputData.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + BadInputData value = BadInputData.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + BadInputData value = BadInputData.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutTest.java new file mode 100644 index 00000000000..427b258c44e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartEmptiedDuringCheckoutTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartEmptiedDuringCheckoutTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartEmptiedDuringCheckoutBuilder builder) { + CartEmptiedDuringCheckout cartEmptiedDuringCheckout = builder.buildUnchecked(); + Assertions.assertThat(cartEmptiedDuringCheckout).isInstanceOf(CartEmptiedDuringCheckout.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CartEmptiedDuringCheckout.builder().severity("severity") }, + new Object[] { "message", CartEmptiedDuringCheckout.builder().message("message") }, + new Object[] { "correlationId", CartEmptiedDuringCheckout.builder().correlationId("correlationId") }, + new Object[] { "payload", CartEmptiedDuringCheckout.builder().payload("payload") } }; + } + + @Test + public void severity() { + CartEmptiedDuringCheckout value = CartEmptiedDuringCheckout.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CartEmptiedDuringCheckout value = CartEmptiedDuringCheckout.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + CartEmptiedDuringCheckout value = CartEmptiedDuringCheckout.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + CartEmptiedDuringCheckout value = CartEmptiedDuringCheckout.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartEmptyTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartEmptyTest.java new file mode 100644 index 00000000000..3fad40b81f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartEmptyTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartEmptyTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartEmptyBuilder builder) { + CartEmpty cartEmpty = builder.buildUnchecked(); + Assertions.assertThat(cartEmpty).isInstanceOf(CartEmpty.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CartEmpty.builder().severity("severity") }, + new Object[] { "message", CartEmpty.builder().message("message") }, + new Object[] { "correlationId", CartEmpty.builder().correlationId("correlationId") }, + new Object[] { "payload", CartEmpty.builder().payload("payload") } }; + } + + @Test + public void severity() { + CartEmpty value = CartEmpty.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CartEmpty value = CartEmpty.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + CartEmpty value = CartEmpty.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + CartEmpty value = CartEmpty.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartNotFoundTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartNotFoundTest.java new file mode 100644 index 00000000000..9f422cb8f35 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartNotFoundTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartNotFoundTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartNotFoundBuilder builder) { + CartNotFound cartNotFound = builder.buildUnchecked(); + Assertions.assertThat(cartNotFound).isInstanceOf(CartNotFound.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CartNotFound.builder().severity("severity") }, + new Object[] { "message", CartNotFound.builder().message("message") }, + new Object[] { "correlationId", CartNotFound.builder().correlationId("correlationId") }, + new Object[] { "payload", CartNotFound.builder().payload("payload") } }; + } + + @Test + public void severity() { + CartNotFound value = CartNotFound.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CartNotFound value = CartNotFound.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + CartNotFound value = CartNotFound.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + CartNotFound value = CartNotFound.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentTest.java new file mode 100644 index 00000000000..1fc6bebc0d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartWithExistingPaymentTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartWithExistingPaymentBuilder builder) { + CartWithExistingPayment cartWithExistingPayment = builder.buildUnchecked(); + Assertions.assertThat(cartWithExistingPayment).isInstanceOf(CartWithExistingPayment.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CartWithExistingPayment.builder().severity("severity") }, + new Object[] { "message", CartWithExistingPayment.builder().message("message") }, + new Object[] { "correlationId", CartWithExistingPayment.builder().correlationId("correlationId") }, + new Object[] { "payload", CartWithExistingPayment.builder().payload("payload") } }; + } + + @Test + public void severity() { + CartWithExistingPayment value = CartWithExistingPayment.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CartWithExistingPayment value = CartWithExistingPayment.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + CartWithExistingPayment value = CartWithExistingPayment.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + CartWithExistingPayment value = CartWithExistingPayment.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledTest.java new file mode 100644 index 00000000000..efce1016f04 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutCancelledTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CheckoutCancelledTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CheckoutCancelledBuilder builder) { + CheckoutCancelled checkoutCancelled = builder.buildUnchecked(); + Assertions.assertThat(checkoutCancelled).isInstanceOf(CheckoutCancelled.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CheckoutCancelled.builder().severity("severity") }, + new Object[] { "message", CheckoutCancelled.builder().message("message") }, + new Object[] { "correlationId", CheckoutCancelled.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + CheckoutCancelled value = CheckoutCancelled.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CheckoutCancelled value = CheckoutCancelled.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + CheckoutCancelled value = CheckoutCancelled.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedTest.java new file mode 100644 index 00000000000..8324ca6f484 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutCompletedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CheckoutCompletedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CheckoutCompletedBuilder builder) { + CheckoutCompleted checkoutCompleted = builder.buildUnchecked(); + Assertions.assertThat(checkoutCompleted).isInstanceOf(CheckoutCompleted.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CheckoutCompleted.builder().severity("severity") }, + new Object[] { "message", CheckoutCompleted.builder().message("message") }, + new Object[] { "payload", CheckoutCompleted.builder().payload("payload") }, + new Object[] { "correlationId", CheckoutCompleted.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + CheckoutCompleted value = CheckoutCompleted.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CheckoutCompleted value = CheckoutCompleted.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void payload() { + CheckoutCompleted value = CheckoutCompleted.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } + + @Test + public void correlationId() { + CheckoutCompleted value = CheckoutCompleted.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedTest.java new file mode 100644 index 00000000000..45b57999a44 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutLoadedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CheckoutLoadedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CheckoutLoadedBuilder builder) { + CheckoutLoaded checkoutLoaded = builder.buildUnchecked(); + Assertions.assertThat(checkoutLoaded).isInstanceOf(CheckoutLoaded.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CheckoutLoaded.builder().severity("severity") }, + new Object[] { "message", CheckoutLoaded.builder().message("message") }, + new Object[] { "correlationId", CheckoutLoaded.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + CheckoutLoaded value = CheckoutLoaded.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CheckoutLoaded value = CheckoutLoaded.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + CheckoutLoaded value = CheckoutLoaded.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedTest.java new file mode 100644 index 00000000000..cb5e11e563d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/CheckoutStartedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CheckoutStartedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CheckoutStartedBuilder builder) { + CheckoutStarted checkoutStarted = builder.buildUnchecked(); + Assertions.assertThat(checkoutStarted).isInstanceOf(CheckoutStarted.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", CheckoutStarted.builder().severity("severity") }, + new Object[] { "message", CheckoutStarted.builder().message("message") }, + new Object[] { "correlationId", CheckoutStarted.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + CheckoutStarted value = CheckoutStarted.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + CheckoutStarted value = CheckoutStarted.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + CheckoutStarted value = CheckoutStarted.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorTest.java new file mode 100644 index 00000000000..787ce7976c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ConnectorErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ConnectorErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ConnectorErrorBuilder builder) { + ConnectorError connectorError = builder.buildUnchecked(); + Assertions.assertThat(connectorError).isInstanceOf(ConnectorError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", ConnectorError.builder().severity("severity") }, + new Object[] { "message", ConnectorError.builder().message("message") }, + new Object[] { "correlationId", ConnectorError.builder().correlationId("correlationId") }, + new Object[] { "payload", ConnectorError.builder().payload("payload") } }; + } + + @Test + public void severity() { + ConnectorError value = ConnectorError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ConnectorError value = ConnectorError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ConnectorError value = ConnectorError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + ConnectorError value = ConnectorError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsTest.java new file mode 100644 index 00000000000..1dac6ce2cb3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/DeprecatedFieldsTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DeprecatedFieldsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DeprecatedFieldsBuilder builder) { + DeprecatedFields deprecatedFields = builder.buildUnchecked(); + Assertions.assertThat(deprecatedFields).isInstanceOf(DeprecatedFields.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", DeprecatedFields.builder().severity("severity") }, + new Object[] { "message", DeprecatedFields.builder().message("message") }, + new Object[] { "correlationId", DeprecatedFields.builder().correlationId("correlationId") }, + new Object[] { "payload", DeprecatedFields.builder().payload("payload") } }; + } + + @Test + public void severity() { + DeprecatedFields value = DeprecatedFields.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + DeprecatedFields value = DeprecatedFields.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + DeprecatedFields value = DeprecatedFields.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + DeprecatedFields value = DeprecatedFields.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableTest.java new file mode 100644 index 00000000000..43d367a0ee2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/DiscountCodeNotApplicableTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DiscountCodeNotApplicableTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DiscountCodeNotApplicableBuilder builder) { + DiscountCodeNotApplicable discountCodeNotApplicable = builder.buildUnchecked(); + Assertions.assertThat(discountCodeNotApplicable).isInstanceOf(DiscountCodeNotApplicable.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", DiscountCodeNotApplicable.builder().severity("severity") }, + new Object[] { "message", DiscountCodeNotApplicable.builder().message("message") }, + new Object[] { "correlationId", DiscountCodeNotApplicable.builder().correlationId("correlationId") }, + new Object[] { "payload", DiscountCodeNotApplicable.builder().payload("payload") } }; + } + + @Test + public void severity() { + DiscountCodeNotApplicable value = DiscountCodeNotApplicable.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + DiscountCodeNotApplicable value = DiscountCodeNotApplicable.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + DiscountCodeNotApplicable value = DiscountCodeNotApplicable.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + DiscountCodeNotApplicable value = DiscountCodeNotApplicable.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsTest.java new file mode 100644 index 00000000000..cf56e8719f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ErrorLoadingAllPaymentIntegrationsTest.java @@ -0,0 +1,47 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ErrorLoadingAllPaymentIntegrationsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ErrorLoadingAllPaymentIntegrationsBuilder builder) { + ErrorLoadingAllPaymentIntegrations errorLoadingAllPaymentIntegrations = builder.buildUnchecked(); + Assertions.assertThat(errorLoadingAllPaymentIntegrations) + .isInstanceOf(ErrorLoadingAllPaymentIntegrations.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", ErrorLoadingAllPaymentIntegrations.builder().severity("severity") }, + new Object[] { "message", ErrorLoadingAllPaymentIntegrations.builder().message("message") }, + new Object[] { "correlationId", + ErrorLoadingAllPaymentIntegrations.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + ErrorLoadingAllPaymentIntegrations value = ErrorLoadingAllPaymentIntegrations.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ErrorLoadingAllPaymentIntegrations value = ErrorLoadingAllPaymentIntegrations.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ErrorLoadingAllPaymentIntegrations value = ErrorLoadingAllPaymentIntegrations.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionTest.java new file mode 100644 index 00000000000..857b1cae416 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ExpiredSessionTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ExpiredSessionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ExpiredSessionBuilder builder) { + ExpiredSession expiredSession = builder.buildUnchecked(); + Assertions.assertThat(expiredSession).isInstanceOf(ExpiredSession.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", ExpiredSession.builder().severity("severity") }, + new Object[] { "message", ExpiredSession.builder().message("message") }, + new Object[] { "correlationId", ExpiredSession.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + ExpiredSession value = ExpiredSession.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ExpiredSession value = ExpiredSession.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ExpiredSession value = ExpiredSession.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingTest.java new file mode 100644 index 00000000000..0546dcd2827 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ExternalTermsAndConditionsPendingTest.java @@ -0,0 +1,46 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ExternalTermsAndConditionsPendingTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ExternalTermsAndConditionsPendingBuilder builder) { + ExternalTermsAndConditionsPending externalTermsAndConditionsPending = builder.buildUnchecked(); + Assertions.assertThat(externalTermsAndConditionsPending).isInstanceOf(ExternalTermsAndConditionsPending.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", ExternalTermsAndConditionsPending.builder().severity("severity") }, + new Object[] { "message", ExternalTermsAndConditionsPending.builder().message("message") }, + new Object[] { "correlationId", + ExternalTermsAndConditionsPending.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + ExternalTermsAndConditionsPending value = ExternalTermsAndConditionsPending.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ExternalTermsAndConditionsPending value = ExternalTermsAndConditionsPending.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ExternalTermsAndConditionsPending value = ExternalTermsAndConditionsPending.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionTest.java new file mode 100644 index 00000000000..57791fb1711 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/FailedToRefreshSessionTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class FailedToRefreshSessionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, FailedToRefreshSessionBuilder builder) { + FailedToRefreshSession failedToRefreshSession = builder.buildUnchecked(); + Assertions.assertThat(failedToRefreshSession).isInstanceOf(FailedToRefreshSession.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", FailedToRefreshSession.builder().severity("severity") }, + new Object[] { "message", FailedToRefreshSession.builder().message("message") }, + new Object[] { "correlationId", FailedToRefreshSession.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + FailedToRefreshSession value = FailedToRefreshSession.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + FailedToRefreshSession value = FailedToRefreshSession.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + FailedToRefreshSession value = FailedToRefreshSession.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorTest.java new file mode 100644 index 00000000000..d9c6f45f781 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceErrorTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GiftCardBalanceErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GiftCardBalanceErrorBuilder builder) { + GiftCardBalanceError giftCardBalanceError = builder.buildUnchecked(); + Assertions.assertThat(giftCardBalanceError).isInstanceOf(GiftCardBalanceError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", GiftCardBalanceError.builder().severity("severity") }, + new Object[] { "message", GiftCardBalanceError.builder().message("message") }, + new Object[] { "correlationId", GiftCardBalanceError.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + GiftCardBalanceError value = GiftCardBalanceError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + GiftCardBalanceError value = GiftCardBalanceError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + GiftCardBalanceError value = GiftCardBalanceError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedTest.java new file mode 100644 index 00000000000..be2150a328c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceRemovedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GiftCardBalanceRemovedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GiftCardBalanceRemovedBuilder builder) { + GiftCardBalanceRemoved giftCardBalanceRemoved = builder.buildUnchecked(); + Assertions.assertThat(giftCardBalanceRemoved).isInstanceOf(GiftCardBalanceRemoved.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", GiftCardBalanceRemoved.builder().severity("severity") }, + new Object[] { "message", GiftCardBalanceRemoved.builder().message("message") }, + new Object[] { "correlationId", GiftCardBalanceRemoved.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + GiftCardBalanceRemoved value = GiftCardBalanceRemoved.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + GiftCardBalanceRemoved value = GiftCardBalanceRemoved.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + GiftCardBalanceRemoved value = GiftCardBalanceRemoved.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedTest.java new file mode 100644 index 00000000000..3a8454d55b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceStartedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GiftCardBalanceStartedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GiftCardBalanceStartedBuilder builder) { + GiftCardBalanceStarted giftCardBalanceStarted = builder.buildUnchecked(); + Assertions.assertThat(giftCardBalanceStarted).isInstanceOf(GiftCardBalanceStarted.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", GiftCardBalanceStarted.builder().severity("severity") }, + new Object[] { "message", GiftCardBalanceStarted.builder().message("message") }, + new Object[] { "correlationId", GiftCardBalanceStarted.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + GiftCardBalanceStarted value = GiftCardBalanceStarted.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + GiftCardBalanceStarted value = GiftCardBalanceStarted.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + GiftCardBalanceStarted value = GiftCardBalanceStarted.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessTest.java new file mode 100644 index 00000000000..ae00baaeece --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardBalanceSuccessTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GiftCardBalanceSuccessTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GiftCardBalanceSuccessBuilder builder) { + GiftCardBalanceSuccess giftCardBalanceSuccess = builder.buildUnchecked(); + Assertions.assertThat(giftCardBalanceSuccess).isInstanceOf(GiftCardBalanceSuccess.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", GiftCardBalanceSuccess.builder().severity("severity") }, + new Object[] { "message", GiftCardBalanceSuccess.builder().message("message") }, + new Object[] { "correlationId", GiftCardBalanceSuccess.builder().correlationId("correlationId") }, + new Object[] { "payload", GiftCardBalanceSuccess.builder().payload("payload") } }; + } + + @Test + public void severity() { + GiftCardBalanceSuccess value = GiftCardBalanceSuccess.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + GiftCardBalanceSuccess value = GiftCardBalanceSuccess.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + GiftCardBalanceSuccess value = GiftCardBalanceSuccess.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + GiftCardBalanceSuccess value = GiftCardBalanceSuccess.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorTest.java new file mode 100644 index 00000000000..65a8232aa20 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemErrorTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GiftCardRedeemErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GiftCardRedeemErrorBuilder builder) { + GiftCardRedeemError giftCardRedeemError = builder.buildUnchecked(); + Assertions.assertThat(giftCardRedeemError).isInstanceOf(GiftCardRedeemError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", GiftCardRedeemError.builder().severity("severity") }, + new Object[] { "message", GiftCardRedeemError.builder().message("message") }, + new Object[] { "correlationId", GiftCardRedeemError.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + GiftCardRedeemError value = GiftCardRedeemError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + GiftCardRedeemError value = GiftCardRedeemError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + GiftCardRedeemError value = GiftCardRedeemError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedTest.java new file mode 100644 index 00000000000..6c36300488f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemStartedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GiftCardRedeemStartedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GiftCardRedeemStartedBuilder builder) { + GiftCardRedeemStarted giftCardRedeemStarted = builder.buildUnchecked(); + Assertions.assertThat(giftCardRedeemStarted).isInstanceOf(GiftCardRedeemStarted.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", GiftCardRedeemStarted.builder().severity("severity") }, + new Object[] { "message", GiftCardRedeemStarted.builder().message("message") }, + new Object[] { "correlationId", GiftCardRedeemStarted.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + GiftCardRedeemStarted value = GiftCardRedeemStarted.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + GiftCardRedeemStarted value = GiftCardRedeemStarted.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + GiftCardRedeemStarted value = GiftCardRedeemStarted.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessTest.java new file mode 100644 index 00000000000..f691db19bb9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/GiftCardRedeemSuccessTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GiftCardRedeemSuccessTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GiftCardRedeemSuccessBuilder builder) { + GiftCardRedeemSuccess giftCardRedeemSuccess = builder.buildUnchecked(); + Assertions.assertThat(giftCardRedeemSuccess).isInstanceOf(GiftCardRedeemSuccess.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", GiftCardRedeemSuccess.builder().severity("severity") }, + new Object[] { "message", GiftCardRedeemSuccess.builder().message("message") }, + new Object[] { "correlationId", GiftCardRedeemSuccess.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + GiftCardRedeemSuccess value = GiftCardRedeemSuccess.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + GiftCardRedeemSuccess value = GiftCardRedeemSuccess.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + GiftCardRedeemSuccess value = GiftCardRedeemSuccess.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InitErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InitErrorTest.java new file mode 100644 index 00000000000..d18eeabd8e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InitErrorTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InitErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InitErrorBuilder builder) { + InitError initError = builder.buildUnchecked(); + Assertions.assertThat(initError).isInstanceOf(InitError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", InitError.builder().severity("severity") }, + new Object[] { "message", InitError.builder().message("message") }, + new Object[] { "correlationId", InitError.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + InitError value = InitError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + InitError value = InitError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + InitError value = InitError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InitTimeoutTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InitTimeoutTest.java new file mode 100644 index 00000000000..feadc37f1ab --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InitTimeoutTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InitTimeoutTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InitTimeoutBuilder builder) { + InitTimeout initTimeout = builder.buildUnchecked(); + Assertions.assertThat(initTimeout).isInstanceOf(InitTimeout.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", InitTimeout.builder().severity("severity") }, + new Object[] { "message", InitTimeout.builder().message("message") }, + new Object[] { "correlationId", InitTimeout.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + InitTimeout value = InitTimeout.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + InitTimeout value = InitTimeout.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + InitTimeout value = InitTimeout.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleTest.java new file mode 100644 index 00000000000..81bdbbbe512 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InvalidLocaleTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InvalidLocaleTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InvalidLocaleBuilder builder) { + InvalidLocale invalidLocale = builder.buildUnchecked(); + Assertions.assertThat(invalidLocale).isInstanceOf(InvalidLocale.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", InvalidLocale.builder().severity("severity") }, + new Object[] { "message", InvalidLocale.builder().message("message") }, + new Object[] { "correlationId", InvalidLocale.builder().correlationId("correlationId") }, + new Object[] { "payload", InvalidLocale.builder().payload("payload") } }; + } + + @Test + public void severity() { + InvalidLocale value = InvalidLocale.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + InvalidLocale value = InvalidLocale.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + InvalidLocale value = InvalidLocale.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + InvalidLocale value = InvalidLocale.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InvalidModeTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InvalidModeTest.java new file mode 100644 index 00000000000..f5bfc29eb93 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/InvalidModeTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InvalidModeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InvalidModeBuilder builder) { + InvalidMode invalidMode = builder.buildUnchecked(); + Assertions.assertThat(invalidMode).isInstanceOf(InvalidMode.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", InvalidMode.builder().severity("severity") }, + new Object[] { "message", InvalidMode.builder().message("message") }, + new Object[] { "correlationId", InvalidMode.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + InvalidMode value = InvalidMode.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + InvalidMode value = InvalidMode.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + InvalidMode value = InvalidMode.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersTest.java new file mode 100644 index 00000000000..dfe6dfb9166 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/MultipleVendorButtonContainersTest.java @@ -0,0 +1,45 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MultipleVendorButtonContainersTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MultipleVendorButtonContainersBuilder builder) { + MultipleVendorButtonContainers multipleVendorButtonContainers = builder.buildUnchecked(); + Assertions.assertThat(multipleVendorButtonContainers).isInstanceOf(MultipleVendorButtonContainers.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", MultipleVendorButtonContainers.builder().severity("severity") }, + new Object[] { "message", MultipleVendorButtonContainers.builder().message("message") }, new Object[] { + "correlationId", MultipleVendorButtonContainers.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + MultipleVendorButtonContainers value = MultipleVendorButtonContainers.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + MultipleVendorButtonContainers value = MultipleVendorButtonContainers.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + MultipleVendorButtonContainers value = MultipleVendorButtonContainers.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsTest.java new file mode 100644 index 00000000000..d705046334d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NoPaymentIntegrationsTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class NoPaymentIntegrationsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, NoPaymentIntegrationsBuilder builder) { + NoPaymentIntegrations noPaymentIntegrations = builder.buildUnchecked(); + Assertions.assertThat(noPaymentIntegrations).isInstanceOf(NoPaymentIntegrations.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", NoPaymentIntegrations.builder().severity("severity") }, + new Object[] { "message", NoPaymentIntegrations.builder().message("message") }, + new Object[] { "correlationId", NoPaymentIntegrations.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + NoPaymentIntegrations value = NoPaymentIntegrations.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + NoPaymentIntegrations value = NoPaymentIntegrations.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + NoPaymentIntegrations value = NoPaymentIntegrations.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsTest.java new file mode 100644 index 00000000000..8d7e979d99f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NoShippingMethodsTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class NoShippingMethodsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, NoShippingMethodsBuilder builder) { + NoShippingMethods noShippingMethods = builder.buildUnchecked(); + Assertions.assertThat(noShippingMethods).isInstanceOf(NoShippingMethods.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", NoShippingMethods.builder().severity("severity") }, + new Object[] { "message", NoShippingMethods.builder().message("message") }, + new Object[] { "correlationId", NoShippingMethods.builder().correlationId("correlationId") }, + new Object[] { "payload", NoShippingMethods.builder().payload("payload") } }; + } + + @Test + public void severity() { + NoShippingMethods value = NoShippingMethods.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + NoShippingMethods value = NoShippingMethods.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + NoShippingMethods value = NoShippingMethods.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + NoShippingMethods value = NoShippingMethods.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorTest.java new file mode 100644 index 00000000000..d88678232c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NonOrderableCartErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class NonOrderableCartErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, NonOrderableCartErrorBuilder builder) { + NonOrderableCartError nonOrderableCartError = builder.buildUnchecked(); + Assertions.assertThat(nonOrderableCartError).isInstanceOf(NonOrderableCartError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", NonOrderableCartError.builder().severity("severity") }, + new Object[] { "message", NonOrderableCartError.builder().message("message") }, + new Object[] { "correlationId", NonOrderableCartError.builder().correlationId("correlationId") }, + new Object[] { "payload", NonOrderableCartError.builder().payload("payload") } }; + } + + @Test + public void severity() { + NonOrderableCartError value = NonOrderableCartError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + NonOrderableCartError value = NonOrderableCartError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + NonOrderableCartError value = NonOrderableCartError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + NonOrderableCartError value = NonOrderableCartError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedTest.java new file mode 100644 index 00000000000..c80aa988bbe --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/NotApplicableDiscountCodeRemovedTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class NotApplicableDiscountCodeRemovedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, NotApplicableDiscountCodeRemovedBuilder builder) { + NotApplicableDiscountCodeRemoved notApplicableDiscountCodeRemoved = builder.buildUnchecked(); + Assertions.assertThat(notApplicableDiscountCodeRemoved).isInstanceOf(NotApplicableDiscountCodeRemoved.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", NotApplicableDiscountCodeRemoved.builder().severity("severity") }, + new Object[] { "message", NotApplicableDiscountCodeRemoved.builder().message("message") }, + new Object[] { "correlationId", + NotApplicableDiscountCodeRemoved.builder().correlationId("correlationId") }, + new Object[] { "payload", NotApplicableDiscountCodeRemoved.builder().payload("payload") } }; + } + + @Test + public void severity() { + NotApplicableDiscountCodeRemoved value = NotApplicableDiscountCodeRemoved.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + NotApplicableDiscountCodeRemoved value = NotApplicableDiscountCodeRemoved.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + NotApplicableDiscountCodeRemoved value = NotApplicableDiscountCodeRemoved.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + NotApplicableDiscountCodeRemoved value = NotApplicableDiscountCodeRemoved.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderCreatedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderCreatedTest.java new file mode 100644 index 00000000000..1c109644939 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderCreatedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderCreatedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderCreatedBuilder builder) { + OrderCreated orderCreated = builder.buildUnchecked(); + Assertions.assertThat(orderCreated).isInstanceOf(OrderCreated.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", OrderCreated.builder().severity("severity") }, + new Object[] { "message", OrderCreated.builder().message("message") }, + new Object[] { "correlationId", OrderCreated.builder().correlationId("correlationId") }, + new Object[] { "payload", OrderCreated.builder().payload("payload") } }; + } + + @Test + public void severity() { + OrderCreated value = OrderCreated.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + OrderCreated value = OrderCreated.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + OrderCreated value = OrderCreated.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + OrderCreated value = OrderCreated.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorTest.java new file mode 100644 index 00000000000..fe6077ead32 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderCreationErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderCreationErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderCreationErrorBuilder builder) { + OrderCreationError orderCreationError = builder.buildUnchecked(); + Assertions.assertThat(orderCreationError).isInstanceOf(OrderCreationError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", OrderCreationError.builder().severity("severity") }, + new Object[] { "message", OrderCreationError.builder().message("message") }, + new Object[] { "correlationId", OrderCreationError.builder().correlationId("correlationId") }, + new Object[] { "payload", OrderCreationError.builder().payload("payload") } }; + } + + @Test + public void severity() { + OrderCreationError value = OrderCreationError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + OrderCreationError value = OrderCreationError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + OrderCreationError value = OrderCreationError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + OrderCreationError value = OrderCreationError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorTest.java new file mode 100644 index 00000000000..56a7e4a793d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationRetryErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderVerificationRetryErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderVerificationRetryErrorBuilder builder) { + OrderVerificationRetryError orderVerificationRetryError = builder.buildUnchecked(); + Assertions.assertThat(orderVerificationRetryError).isInstanceOf(OrderVerificationRetryError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", OrderVerificationRetryError.builder().severity("severity") }, + new Object[] { "message", OrderVerificationRetryError.builder().message("message") }, + new Object[] { "correlationId", OrderVerificationRetryError.builder().correlationId("correlationId") }, + new Object[] { "payload", OrderVerificationRetryError.builder().payload("payload") } }; + } + + @Test + public void severity() { + OrderVerificationRetryError value = OrderVerificationRetryError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + OrderVerificationRetryError value = OrderVerificationRetryError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + OrderVerificationRetryError value = OrderVerificationRetryError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + OrderVerificationRetryError value = OrderVerificationRetryError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedTest.java new file mode 100644 index 00000000000..de531123c60 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationStartedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderVerificationStartedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderVerificationStartedBuilder builder) { + OrderVerificationStarted orderVerificationStarted = builder.buildUnchecked(); + Assertions.assertThat(orderVerificationStarted).isInstanceOf(OrderVerificationStarted.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", OrderVerificationStarted.builder().severity("severity") }, + new Object[] { "message", OrderVerificationStarted.builder().message("message") }, + new Object[] { "correlationId", OrderVerificationStarted.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + OrderVerificationStarted value = OrderVerificationStarted.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + OrderVerificationStarted value = OrderVerificationStarted.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + OrderVerificationStarted value = OrderVerificationStarted.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutTest.java new file mode 100644 index 00000000000..5b510e9822f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/OrderVerificationTimeoutTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderVerificationTimeoutTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderVerificationTimeoutBuilder builder) { + OrderVerificationTimeout orderVerificationTimeout = builder.buildUnchecked(); + Assertions.assertThat(orderVerificationTimeout).isInstanceOf(OrderVerificationTimeout.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", OrderVerificationTimeout.builder().severity("severity") }, + new Object[] { "message", OrderVerificationTimeout.builder().message("message") }, + new Object[] { "correlationId", OrderVerificationTimeout.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + OrderVerificationTimeout value = OrderVerificationTimeout.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + OrderVerificationTimeout value = OrderVerificationTimeout.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + OrderVerificationTimeout value = OrderVerificationTimeout.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledTest.java new file mode 100644 index 00000000000..f896b658501 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentCancelledTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentCancelledTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentCancelledBuilder builder) { + PaymentCancelled paymentCancelled = builder.buildUnchecked(); + Assertions.assertThat(paymentCancelled).isInstanceOf(PaymentCancelled.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentCancelled.builder().severity("severity") }, + new Object[] { "message", PaymentCancelled.builder().message("message") }, + new Object[] { "correlationId", PaymentCancelled.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentCancelled.builder() + .payload(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()) } }; + } + + @Test + public void severity() { + PaymentCancelled value = PaymentCancelled.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentCancelled value = PaymentCancelled.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentCancelled value = PaymentCancelled.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentCancelled value = PaymentCancelled.of(); + value.setPayload(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPayload()) + .isEqualTo(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentFailedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentFailedTest.java new file mode 100644 index 00000000000..253c6f70d14 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentFailedTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentFailedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentFailedBuilder builder) { + PaymentFailed paymentFailed = builder.buildUnchecked(); + Assertions.assertThat(paymentFailed).isInstanceOf(PaymentFailed.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentFailed.builder().severity("severity") }, + new Object[] { "message", PaymentFailed.builder().message("message") }, + new Object[] { "correlationId", PaymentFailed.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentFailed.builder() + .payload(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()) } }; + } + + @Test + public void severity() { + PaymentFailed value = PaymentFailed.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentFailed value = PaymentFailed.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentFailed value = PaymentFailed.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentFailed value = PaymentFailed.of(); + value.setPayload(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPayload()) + .isEqualTo(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedTest.java new file mode 100644 index 00000000000..1a43c18059c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationLoadedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationLoadedBuilder builder) { + PaymentIntegrationLoaded paymentIntegrationLoaded = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationLoaded).isInstanceOf(PaymentIntegrationLoaded.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentIntegrationLoaded.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationLoaded.builder().message("message") }, + new Object[] { "correlationId", PaymentIntegrationLoaded.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentIntegrationLoaded.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationLoaded value = PaymentIntegrationLoaded.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationLoaded value = PaymentIntegrationLoaded.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationLoaded value = PaymentIntegrationLoaded.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationLoaded value = PaymentIntegrationLoaded.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorTest.java new file mode 100644 index 00000000000..ccbe381069b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingErrorTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationLoadingErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationLoadingErrorBuilder builder) { + PaymentIntegrationLoadingError paymentIntegrationLoadingError = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationLoadingError).isInstanceOf(PaymentIntegrationLoadingError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", PaymentIntegrationLoadingError.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationLoadingError.builder().message("message") }, + new Object[] { "correlationId", + PaymentIntegrationLoadingError.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentIntegrationLoadingError.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationLoadingError value = PaymentIntegrationLoadingError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationLoadingError value = PaymentIntegrationLoadingError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationLoadingError value = PaymentIntegrationLoadingError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationLoadingError value = PaymentIntegrationLoadingError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingTest.java new file mode 100644 index 00000000000..4954b05f87c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationLoadingTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationLoadingTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationLoadingBuilder builder) { + PaymentIntegrationLoading paymentIntegrationLoading = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationLoading).isInstanceOf(PaymentIntegrationLoading.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentIntegrationLoading.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationLoading.builder().message("message") }, + new Object[] { "correlationId", PaymentIntegrationLoading.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentIntegrationLoading.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationLoading value = PaymentIntegrationLoading.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationLoading value = PaymentIntegrationLoading.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationLoading value = PaymentIntegrationLoading.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationLoading value = PaymentIntegrationLoading.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableTest.java new file mode 100644 index 00000000000..6f921ba0110 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationNotAvailableTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationNotAvailableTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationNotAvailableBuilder builder) { + PaymentIntegrationNotAvailable paymentIntegrationNotAvailable = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationNotAvailable).isInstanceOf(PaymentIntegrationNotAvailable.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", PaymentIntegrationNotAvailable.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationNotAvailable.builder().message("message") }, + new Object[] { "correlationId", + PaymentIntegrationNotAvailable.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentIntegrationNotAvailable.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationNotAvailable value = PaymentIntegrationNotAvailable.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationNotAvailable value = PaymentIntegrationNotAvailable.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationNotAvailable value = PaymentIntegrationNotAvailable.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationNotAvailable value = PaymentIntegrationNotAvailable.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedTest.java new file mode 100644 index 00000000000..b63741e0f40 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationSelectedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationSelectedBuilder builder) { + PaymentIntegrationSelected paymentIntegrationSelected = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationSelected).isInstanceOf(PaymentIntegrationSelected.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentIntegrationSelected.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationSelected.builder().message("message") }, + new Object[] { "correlationId", PaymentIntegrationSelected.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentIntegrationSelected.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationSelected value = PaymentIntegrationSelected.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationSelected value = PaymentIntegrationSelected.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationSelected value = PaymentIntegrationSelected.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationSelected value = PaymentIntegrationSelected.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedTest.java new file mode 100644 index 00000000000..1ad659ce4c7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationFailedTest.java @@ -0,0 +1,58 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationSelectionConfirmationFailedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationSelectionConfirmationFailedBuilder builder) { + PaymentIntegrationSelectionConfirmationFailed paymentIntegrationSelectionConfirmationFailed = builder + .buildUnchecked(); + Assertions.assertThat(paymentIntegrationSelectionConfirmationFailed) + .isInstanceOf(PaymentIntegrationSelectionConfirmationFailed.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", + PaymentIntegrationSelectionConfirmationFailed.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationSelectionConfirmationFailed.builder().message("message") }, + new Object[] { "correlationId", + PaymentIntegrationSelectionConfirmationFailed.builder().correlationId("correlationId") }, + new Object[] { "payload", + PaymentIntegrationSelectionConfirmationFailed.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationSelectionConfirmationFailed value = PaymentIntegrationSelectionConfirmationFailed.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationSelectionConfirmationFailed value = PaymentIntegrationSelectionConfirmationFailed.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationSelectionConfirmationFailed value = PaymentIntegrationSelectionConfirmationFailed.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationSelectionConfirmationFailed value = PaymentIntegrationSelectionConfirmationFailed.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationTest.java new file mode 100644 index 00000000000..aaef804d63d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationSelectionConfirmationTest.java @@ -0,0 +1,55 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationSelectionConfirmationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationSelectionConfirmationBuilder builder) { + PaymentIntegrationSelectionConfirmation paymentIntegrationSelectionConfirmation = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationSelectionConfirmation) + .isInstanceOf(PaymentIntegrationSelectionConfirmation.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", PaymentIntegrationSelectionConfirmation.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationSelectionConfirmation.builder().message("message") }, + new Object[] { "correlationId", + PaymentIntegrationSelectionConfirmation.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentIntegrationSelectionConfirmation.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationSelectionConfirmation value = PaymentIntegrationSelectionConfirmation.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationSelectionConfirmation value = PaymentIntegrationSelectionConfirmation.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationSelectionConfirmation value = PaymentIntegrationSelectionConfirmation.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationSelectionConfirmation value = PaymentIntegrationSelectionConfirmation.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedTest.java new file mode 100644 index 00000000000..2d657292b59 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentIntegrationsReceivedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationsReceivedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationsReceivedBuilder builder) { + PaymentIntegrationsReceived paymentIntegrationsReceived = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationsReceived).isInstanceOf(PaymentIntegrationsReceived.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentIntegrationsReceived.builder().severity("severity") }, + new Object[] { "message", PaymentIntegrationsReceived.builder().message("message") }, + new Object[] { "correlationId", PaymentIntegrationsReceived.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentIntegrationsReceived.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentIntegrationsReceived value = PaymentIntegrationsReceived.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentIntegrationsReceived value = PaymentIntegrationsReceived.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentIntegrationsReceived value = PaymentIntegrationsReceived.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentIntegrationsReceived value = PaymentIntegrationsReceived.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentStartedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentStartedTest.java new file mode 100644 index 00000000000..c69e009feaa --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentStartedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentStartedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentStartedBuilder builder) { + PaymentStarted paymentStarted = builder.buildUnchecked(); + Assertions.assertThat(paymentStarted).isInstanceOf(PaymentStarted.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentStarted.builder().severity("severity") }, + new Object[] { "message", PaymentStarted.builder().message("message") }, + new Object[] { "correlationId", PaymentStarted.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentStarted.builder().payload("payload") } }; + } + + @Test + public void severity() { + PaymentStarted value = PaymentStarted.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentStarted value = PaymentStarted.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentStarted value = PaymentStarted.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentStarted value = PaymentStarted.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedTest.java new file mode 100644 index 00000000000..098a0cce5a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationFailedTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentValidationFailedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentValidationFailedBuilder builder) { + PaymentValidationFailed paymentValidationFailed = builder.buildUnchecked(); + Assertions.assertThat(paymentValidationFailed).isInstanceOf(PaymentValidationFailed.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentValidationFailed.builder().severity("severity") }, + new Object[] { "message", PaymentValidationFailed.builder().message("message") }, + new Object[] { "correlationId", PaymentValidationFailed.builder().correlationId("correlationId") }, + new Object[] { "payload", PaymentValidationFailed.builder() + .payload(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()) } }; + } + + @Test + public void severity() { + PaymentValidationFailed value = PaymentValidationFailed.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentValidationFailed value = PaymentValidationFailed.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentValidationFailed value = PaymentValidationFailed.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + PaymentValidationFailed value = PaymentValidationFailed.of(); + value.setPayload(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPayload()) + .isEqualTo(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedTest.java new file mode 100644 index 00000000000..8fc4f6a14dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationPassedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentValidationPassedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentValidationPassedBuilder builder) { + PaymentValidationPassed paymentValidationPassed = builder.buildUnchecked(); + Assertions.assertThat(paymentValidationPassed).isInstanceOf(PaymentValidationPassed.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentValidationPassed.builder().severity("severity") }, + new Object[] { "message", PaymentValidationPassed.builder().message("message") }, + new Object[] { "correlationId", PaymentValidationPassed.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + PaymentValidationPassed value = PaymentValidationPassed.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentValidationPassed value = PaymentValidationPassed.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentValidationPassed value = PaymentValidationPassed.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedTest.java new file mode 100644 index 00000000000..13f6ef98385 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/PaymentValidationStartedTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentValidationStartedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentValidationStartedBuilder builder) { + PaymentValidationStarted paymentValidationStarted = builder.buildUnchecked(); + Assertions.assertThat(paymentValidationStarted).isInstanceOf(PaymentValidationStarted.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", PaymentValidationStarted.builder().severity("severity") }, + new Object[] { "message", PaymentValidationStarted.builder().message("message") }, + new Object[] { "correlationId", PaymentValidationStarted.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + PaymentValidationStarted value = PaymentValidationStarted.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + PaymentValidationStarted value = PaymentValidationStarted.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + PaymentValidationStarted value = PaymentValidationStarted.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedTest.java new file mode 100644 index 00000000000..d444ebb3b83 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ProjectIsDeactivatedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProjectIsDeactivatedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProjectIsDeactivatedBuilder builder) { + ProjectIsDeactivated projectIsDeactivated = builder.buildUnchecked(); + Assertions.assertThat(projectIsDeactivated).isInstanceOf(ProjectIsDeactivated.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", ProjectIsDeactivated.builder().severity("severity") }, + new Object[] { "message", ProjectIsDeactivated.builder().message("message") }, + new Object[] { "correlationId", ProjectIsDeactivated.builder().correlationId("correlationId") }, + new Object[] { "payload", ProjectIsDeactivated.builder().payload("payload") } }; + } + + @Test + public void severity() { + ProjectIsDeactivated value = ProjectIsDeactivated.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ProjectIsDeactivated value = ProjectIsDeactivated.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ProjectIsDeactivated value = ProjectIsDeactivated.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + ProjectIsDeactivated value = ProjectIsDeactivated.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorTest.java new file mode 100644 index 00000000000..b94713a940c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/RemoveDiscountCodeErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RemoveDiscountCodeErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RemoveDiscountCodeErrorBuilder builder) { + RemoveDiscountCodeError removeDiscountCodeError = builder.buildUnchecked(); + Assertions.assertThat(removeDiscountCodeError).isInstanceOf(RemoveDiscountCodeError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", RemoveDiscountCodeError.builder().severity("severity") }, + new Object[] { "message", RemoveDiscountCodeError.builder().message("message") }, + new Object[] { "correlationId", RemoveDiscountCodeError.builder().correlationId("correlationId") }, + new Object[] { "payload", RemoveDiscountCodeError.builder().payload("payload") } }; + } + + @Test + public void severity() { + RemoveDiscountCodeError value = RemoveDiscountCodeError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + RemoveDiscountCodeError value = RemoveDiscountCodeError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + RemoveDiscountCodeError value = RemoveDiscountCodeError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + RemoveDiscountCodeError value = RemoveDiscountCodeError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorTest.java new file mode 100644 index 00000000000..a83f5c5c6b7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/SetShippingAddressErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetShippingAddressErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetShippingAddressErrorBuilder builder) { + SetShippingAddressError setShippingAddressError = builder.buildUnchecked(); + Assertions.assertThat(setShippingAddressError).isInstanceOf(SetShippingAddressError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", SetShippingAddressError.builder().severity("severity") }, + new Object[] { "message", SetShippingAddressError.builder().message("message") }, + new Object[] { "correlationId", SetShippingAddressError.builder().correlationId("correlationId") }, + new Object[] { "payload", SetShippingAddressError.builder().payload("payload") } }; + } + + @Test + public void severity() { + SetShippingAddressError value = SetShippingAddressError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + SetShippingAddressError value = SetShippingAddressError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + SetShippingAddressError value = SetShippingAddressError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + SetShippingAddressError value = SetShippingAddressError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorTest.java new file mode 100644 index 00000000000..e3444a50ed5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingAddressMissingErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingAddressMissingErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingAddressMissingErrorBuilder builder) { + ShippingAddressMissingError shippingAddressMissingError = builder.buildUnchecked(); + Assertions.assertThat(shippingAddressMissingError).isInstanceOf(ShippingAddressMissingError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", ShippingAddressMissingError.builder().severity("severity") }, + new Object[] { "message", ShippingAddressMissingError.builder().message("message") }, + new Object[] { "correlationId", ShippingAddressMissingError.builder().correlationId("correlationId") }, + new Object[] { "payload", ShippingAddressMissingError.builder().payload("payload") } }; + } + + @Test + public void severity() { + ShippingAddressMissingError value = ShippingAddressMissingError.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ShippingAddressMissingError value = ShippingAddressMissingError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ShippingAddressMissingError value = ShippingAddressMissingError.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + ShippingAddressMissingError value = ShippingAddressMissingError.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartTest.java new file mode 100644 index 00000000000..b80d7f27e71 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodDoesNotMatchCartTest.java @@ -0,0 +1,45 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingMethodDoesNotMatchCartTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingMethodDoesNotMatchCartBuilder builder) { + ShippingMethodDoesNotMatchCart shippingMethodDoesNotMatchCart = builder.buildUnchecked(); + Assertions.assertThat(shippingMethodDoesNotMatchCart).isInstanceOf(ShippingMethodDoesNotMatchCart.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", ShippingMethodDoesNotMatchCart.builder().severity("severity") }, + new Object[] { "message", ShippingMethodDoesNotMatchCart.builder().message("message") }, new Object[] { + "correlationId", ShippingMethodDoesNotMatchCart.builder().correlationId("correlationId") } }; + } + + @Test + public void severity() { + ShippingMethodDoesNotMatchCart value = ShippingMethodDoesNotMatchCart.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ShippingMethodDoesNotMatchCart value = ShippingMethodDoesNotMatchCart.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ShippingMethodDoesNotMatchCart value = ShippingMethodDoesNotMatchCart.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedTest.java new file mode 100644 index 00000000000..9e51fd460e7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectedTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingMethodSelectedTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingMethodSelectedBuilder builder) { + ShippingMethodSelected shippingMethodSelected = builder.buildUnchecked(); + Assertions.assertThat(shippingMethodSelected).isInstanceOf(ShippingMethodSelected.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", ShippingMethodSelected.builder().severity("severity") }, + new Object[] { "message", ShippingMethodSelected.builder().message("message") }, + new Object[] { "correlationId", ShippingMethodSelected.builder().correlationId("correlationId") }, + new Object[] { "payload", ShippingMethodSelected.builder().payload("payload") } }; + } + + @Test + public void severity() { + ShippingMethodSelected value = ShippingMethodSelected.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ShippingMethodSelected value = ShippingMethodSelected.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ShippingMethodSelected value = ShippingMethodSelected.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + ShippingMethodSelected value = ShippingMethodSelected.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationTest.java new file mode 100644 index 00000000000..1d37959a7ae --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/ShippingMethodSelectionConfirmationTest.java @@ -0,0 +1,55 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingMethodSelectionConfirmationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingMethodSelectionConfirmationBuilder builder) { + ShippingMethodSelectionConfirmation shippingMethodSelectionConfirmation = builder.buildUnchecked(); + Assertions.assertThat(shippingMethodSelectionConfirmation) + .isInstanceOf(ShippingMethodSelectionConfirmation.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "severity", ShippingMethodSelectionConfirmation.builder().severity("severity") }, + new Object[] { "message", ShippingMethodSelectionConfirmation.builder().message("message") }, + new Object[] { "correlationId", + ShippingMethodSelectionConfirmation.builder().correlationId("correlationId") }, + new Object[] { "payload", ShippingMethodSelectionConfirmation.builder().payload("payload") } }; + } + + @Test + public void severity() { + ShippingMethodSelectionConfirmation value = ShippingMethodSelectionConfirmation.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + ShippingMethodSelectionConfirmation value = ShippingMethodSelectionConfirmation.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + ShippingMethodSelectionConfirmation value = ShippingMethodSelectionConfirmation.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + ShippingMethodSelectionConfirmation value = ShippingMethodSelectionConfirmation.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleTest.java new file mode 100644 index 00000000000..32b5aed84da --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UnavailableLocaleTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class UnavailableLocaleTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, UnavailableLocaleBuilder builder) { + UnavailableLocale unavailableLocale = builder.buildUnchecked(); + Assertions.assertThat(unavailableLocale).isInstanceOf(UnavailableLocale.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", UnavailableLocale.builder().severity("severity") }, + new Object[] { "message", UnavailableLocale.builder().message("message") }, + new Object[] { "correlationId", UnavailableLocale.builder().correlationId("correlationId") }, + new Object[] { "payload", UnavailableLocale.builder().payload("payload") } }; + } + + @Test + public void severity() { + UnavailableLocale value = UnavailableLocale.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + UnavailableLocale value = UnavailableLocale.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + UnavailableLocale value = UnavailableLocale.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + UnavailableLocale value = UnavailableLocale.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryTest.java new file mode 100644 index 00000000000..a6c57f72299 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UnsupportedCountryTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class UnsupportedCountryTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, UnsupportedCountryBuilder builder) { + UnsupportedCountry unsupportedCountry = builder.buildUnchecked(); + Assertions.assertThat(unsupportedCountry).isInstanceOf(UnsupportedCountry.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", UnsupportedCountry.builder().severity("severity") }, + new Object[] { "message", UnsupportedCountry.builder().message("message") }, + new Object[] { "correlationId", UnsupportedCountry.builder().correlationId("correlationId") }, + new Object[] { "payload", UnsupportedCountry.builder().payload("payload") } }; + } + + @Test + public void severity() { + UnsupportedCountry value = UnsupportedCountry.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + UnsupportedCountry value = UnsupportedCountry.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + UnsupportedCountry value = UnsupportedCountry.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + UnsupportedCountry value = UnsupportedCountry.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsTest.java new file mode 100644 index 00000000000..e1807203aab --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/responses/UpdatedFieldsTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.responses; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class UpdatedFieldsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, UpdatedFieldsBuilder builder) { + UpdatedFields updatedFields = builder.buildUnchecked(); + Assertions.assertThat(updatedFields).isInstanceOf(UpdatedFields.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "severity", UpdatedFields.builder().severity("severity") }, + new Object[] { "message", UpdatedFields.builder().message("message") }, + new Object[] { "correlationId", UpdatedFields.builder().correlationId("correlationId") }, + new Object[] { "payload", UpdatedFields.builder().payload("payload") } }; + } + + @Test + public void severity() { + UpdatedFields value = UpdatedFields.of(); + value.setSeverity("severity"); + Assertions.assertThat(value.getSeverity()).isEqualTo("severity"); + } + + @Test + public void message() { + UpdatedFields value = UpdatedFields.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void correlationId() { + UpdatedFields value = UpdatedFields.of(); + value.setCorrelationId("correlationId"); + Assertions.assertThat(value.getCorrelationId()).isEqualTo("correlationId"); + } + + @Test + public void payload() { + UpdatedFields value = UpdatedFields.of(); + value.setPayload("payload"); + Assertions.assertThat(value.getPayload()).isEqualTo("payload"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftTest.java new file mode 100644 index 00000000000..73cbb5fa185 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftTest.java @@ -0,0 +1,65 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TransactionDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TransactionDraftBuilder builder) { + TransactionDraft transactionDraft = builder.buildUnchecked(); + Assertions.assertThat(transactionDraft).isInstanceOf(TransactionDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", TransactionDraft.builder().key("key") }, + new Object[] { "application", TransactionDraft.builder() + .application( + new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()) }, + new Object[] { "transactionItems", + TransactionDraft.builder() + .transactionItems(Collections.singletonList( + new com.commercetools.checkout.models.transaction.TransactionItemDraftImpl())) }, + new Object[] { "cart", TransactionDraft.builder() + .cart(new com.commercetools.checkout.models.cart.CartResourceIdentifierImpl()) } }; + } + + @Test + public void key() { + TransactionDraft value = TransactionDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void application() { + TransactionDraft value = TransactionDraft.of(); + value.setApplication(new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()); + Assertions.assertThat(value.getApplication()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()); + } + + @Test + public void transactionItems() { + TransactionDraft value = TransactionDraft.of(); + value.setTransactionItems( + Collections.singletonList(new com.commercetools.checkout.models.transaction.TransactionItemDraftImpl())); + Assertions.assertThat(value.getTransactionItems()) + .isEqualTo(Collections + .singletonList(new com.commercetools.checkout.models.transaction.TransactionItemDraftImpl())); + } + + @Test + public void cart() { + TransactionDraft value = TransactionDraft.of(); + value.setCart(new com.commercetools.checkout.models.cart.CartResourceIdentifierImpl()); + Assertions.assertThat(value.getCart()) + .isEqualTo(new com.commercetools.checkout.models.cart.CartResourceIdentifierImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorTest.java new file mode 100644 index 00000000000..c74bf1ccc4a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionErrorTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.transaction; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TransactionErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TransactionErrorBuilder builder) { + TransactionError transactionError = builder.buildUnchecked(); + Assertions.assertThat(transactionError).isInstanceOf(TransactionError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "code", TransactionError.builder().code("code") }, + new Object[] { "message", TransactionError.builder().message("message") } }; + } + + @Test + public void code() { + TransactionError value = TransactionError.of(); + value.setCode("code"); + Assertions.assertThat(value.getCode()).isEqualTo("code"); + } + + @Test + public void message() { + TransactionError value = TransactionError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftTest.java new file mode 100644 index 00000000000..d9eb9afccb4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionItemDraftTest.java @@ -0,0 +1,42 @@ + +package com.commercetools.checkout.models.transaction; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TransactionItemDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TransactionItemDraftBuilder builder) { + TransactionItemDraft transactionItemDraft = builder.buildUnchecked(); + Assertions.assertThat(transactionItemDraft).isInstanceOf(TransactionItemDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "paymentIntegration", TransactionItemDraft.builder() + .paymentIntegration( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierImpl()) }, + new Object[] { "amount", TransactionItemDraft.builder() + .amount(new com.commercetools.checkout.models.common.AmountImpl()) } }; + } + + @Test + public void paymentIntegration() { + TransactionItemDraft value = TransactionItemDraft.of(); + value.setPaymentIntegration( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierImpl()); + Assertions.assertThat(value.getPaymentIntegration()) + .isEqualTo( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationResourceIdentifierImpl()); + } + + @Test + public void amount() { + TransactionItemDraft value = TransactionItemDraft.of(); + value.setAmount(new com.commercetools.checkout.models.common.AmountImpl()); + Assertions.assertThat(value.getAmount()).isEqualTo(new com.commercetools.checkout.models.common.AmountImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionItemTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionItemTest.java new file mode 100644 index 00000000000..137706e4848 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionItemTest.java @@ -0,0 +1,53 @@ + +package com.commercetools.checkout.models.transaction; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TransactionItemTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TransactionItemBuilder builder) { + TransactionItem transactionItem = builder.buildUnchecked(); + Assertions.assertThat(transactionItem).isInstanceOf(TransactionItem.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "payment", + TransactionItem.builder() + .payment(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()) }, + new Object[] { "paymentIntegration", TransactionItem.builder() + .paymentIntegration( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceImpl()) }, + new Object[] { "amount", + TransactionItem.builder().amount(new com.commercetools.checkout.models.common.AmountImpl()) } }; + } + + @Test + public void payment() { + TransactionItem value = TransactionItem.of(); + value.setPayment(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPayment()) + .isEqualTo(new com.commercetools.checkout.models.payment.PaymentReferenceImpl()); + } + + @Test + public void paymentIntegration() { + TransactionItem value = TransactionItem.of(); + value.setPaymentIntegration( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceImpl()); + Assertions.assertThat(value.getPaymentIntegration()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.PaymentIntegrationReferenceImpl()); + } + + @Test + public void amount() { + TransactionItem value = TransactionItem.of(); + value.setAmount(new com.commercetools.checkout.models.common.AmountImpl()); + Assertions.assertThat(value.getAmount()).isEqualTo(new com.commercetools.checkout.models.common.AmountImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusTest.java new file mode 100644 index 00000000000..73f9f5bc0d5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionStatusTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.checkout.models.transaction; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TransactionStatusTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TransactionStatusBuilder builder) { + TransactionStatus transactionStatus = builder.buildUnchecked(); + Assertions.assertThat(transactionStatus).isInstanceOf(TransactionStatus.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "state", + TransactionStatus.builder() + .state(com.commercetools.checkout.models.transaction.TransactionState + .findEnum("Initial")) }, + new Object[] { "errors", + TransactionStatus.builder() + .errors(Collections.singletonList( + new com.commercetools.checkout.models.transaction.TransactionErrorImpl())) } }; + } + + @Test + public void state() { + TransactionStatus value = TransactionStatus.of(); + value.setState(com.commercetools.checkout.models.transaction.TransactionState.findEnum("Initial")); + Assertions.assertThat(value.getState()) + .isEqualTo(com.commercetools.checkout.models.transaction.TransactionState.findEnum("Initial")); + } + + @Test + public void errors() { + TransactionStatus value = TransactionStatus.of(); + value.setErrors( + Collections.singletonList(new com.commercetools.checkout.models.transaction.TransactionErrorImpl())); + Assertions.assertThat(value.getErrors()) + .isEqualTo(Collections + .singletonList(new com.commercetools.checkout.models.transaction.TransactionErrorImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionTest.java new file mode 100644 index 00000000000..ee14c20a123 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionTest.java @@ -0,0 +1,119 @@ + +package com.commercetools.checkout.models.transaction; + +import java.time.ZonedDateTime; +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TransactionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TransactionBuilder builder) { + Transaction transaction = builder.buildUnchecked(); + Assertions.assertThat(transaction).isInstanceOf(Transaction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", Transaction.builder().id("id") }, + new Object[] { "key", Transaction.builder().key("key") }, + new Object[] { "version", Transaction.builder().version(2) }, + new Object[] { "application", Transaction.builder() + .application( + new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()) }, + new Object[] { "transactionItems", + Transaction.builder() + .transactionItems(Collections.singletonList( + new com.commercetools.checkout.models.transaction.TransactionItemImpl())) }, + new Object[] { "cart", + Transaction.builder().cart(new com.commercetools.checkout.models.cart.CartReferenceImpl()) }, + new Object[] { "transactionStatus", Transaction.builder() + .transactionStatus(new com.commercetools.checkout.models.transaction.TransactionStatusImpl()) }, + new Object[] { "order", + Transaction.builder().order(new com.commercetools.checkout.models.cart.OrderReferenceImpl()) }, + new Object[] { "createdAt", Transaction.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedAt", + Transaction.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + } + + @Test + public void id() { + Transaction value = Transaction.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + Transaction value = Transaction.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void version() { + Transaction value = Transaction.of(); + value.setVersion(2); + Assertions.assertThat(value.getVersion()).isEqualTo(2); + } + + @Test + public void application() { + Transaction value = Transaction.of(); + value.setApplication(new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()); + Assertions.assertThat(value.getApplication()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()); + } + + @Test + public void transactionItems() { + Transaction value = Transaction.of(); + value.setTransactionItems( + Collections.singletonList(new com.commercetools.checkout.models.transaction.TransactionItemImpl())); + Assertions.assertThat(value.getTransactionItems()) + .isEqualTo( + Collections.singletonList(new com.commercetools.checkout.models.transaction.TransactionItemImpl())); + } + + @Test + public void cart() { + Transaction value = Transaction.of(); + value.setCart(new com.commercetools.checkout.models.cart.CartReferenceImpl()); + Assertions.assertThat(value.getCart()) + .isEqualTo(new com.commercetools.checkout.models.cart.CartReferenceImpl()); + } + + @Test + public void transactionStatus() { + Transaction value = Transaction.of(); + value.setTransactionStatus(new com.commercetools.checkout.models.transaction.TransactionStatusImpl()); + Assertions.assertThat(value.getTransactionStatus()) + .isEqualTo(new com.commercetools.checkout.models.transaction.TransactionStatusImpl()); + } + + @Test + public void order() { + Transaction value = Transaction.of(); + value.setOrder(new com.commercetools.checkout.models.cart.OrderReferenceImpl()); + Assertions.assertThat(value.getOrder()) + .isEqualTo(new com.commercetools.checkout.models.cart.OrderReferenceImpl()); + } + + @Test + public void createdAt() { + Transaction value = Transaction.of(); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedAt() { + Transaction value = Transaction.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } +} diff --git a/licenses/commercetools-sdk-java-checkout/index.json b/licenses/commercetools-sdk-java-checkout/index.json new file mode 100644 index 00000000000..43fba559205 --- /dev/null +++ b/licenses/commercetools-sdk-java-checkout/index.json @@ -0,0 +1,190 @@ +{ + "dependencies": [ + { + "moduleName": "com.fasterxml.jackson.core:jackson-annotations", + "moduleVersion": "2.19.1", + "moduleUrls": [ + "https://github.com/FasterXML/jackson" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "com.fasterxml.jackson.core:jackson-core", + "moduleVersion": "2.19.1", + "moduleUrls": [ + "https://github.com/FasterXML/jackson-core" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "com.fasterxml.jackson.core:jackson-databind", + "moduleVersion": "2.19.1", + "moduleUrls": [ + "https://github.com/FasterXML/jackson" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "moduleVersion": "2.19.1", + "moduleUrls": [ + "https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "com.google.code.findbugs:jsr305", + "moduleVersion": "3.0.2", + "moduleUrls": [ + "http://findbugs.sourceforge.net/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "com.spotify:completable-futures", + "moduleVersion": "0.3.6", + "moduleUrls": [ + "https://spotify.github.io/completable-futures" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "dev.failsafe:failsafe", + "moduleVersion": "3.3.2", + "moduleLicenses": [ + { + "moduleLicense": null, + "moduleLicenseUrl": "http://apache.org/licenses/LICENSE-2.0" + }, + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "jakarta.validation:jakarta.validation-api", + "moduleVersion": "3.1.1", + "moduleUrls": [ + "https://beanvalidation.org", + "https://www.eclipse.org" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + }, + { + "moduleLicense": "Eclipse Public License - v 2.0", + "moduleLicenseUrl": "https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt" + }, + { + "moduleLicense": "GNU GENERAL PUBLIC LICENSE, Version 2 + Classpath Exception", + "moduleLicenseUrl": "https://openjdk.java.net/legal/gplv2+ce.html" + } + ] + }, + { + "moduleName": "org.apache.commons:commons-lang3", + "moduleVersion": "3.18.0", + "moduleUrls": [ + "https://commons.apache.org/proper/commons-lang/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "org.javassist:javassist", + "moduleVersion": "3.28.0-GA", + "moduleUrls": [ + "http://www.javassist.org/" + ], + "moduleLicenses": [ + { + "moduleLicense": null, + "moduleLicenseUrl": "http://www.mozilla.org/MPL/MPL-1.1.html, http://www.gnu.org/licenses/lgpl-2.1.html, http://www.apache.org/licenses/" + }, + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + }, + { + "moduleLicense": "GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1", + "moduleLicenseUrl": "https://www.gnu.org/licenses/lgpl-2.1" + }, + { + "moduleLicense": "Mozilla Public License Version 1.1", + "moduleLicenseUrl": "https://www.mozilla.org/en-US/MPL/1.1" + } + ] + }, + { + "moduleName": "org.reflections:reflections", + "moduleVersion": "0.10.2", + "moduleUrls": [ + "http://github.com/ronmamo/reflections" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + }, + { + "moduleLicense": "WTFPL", + "moduleLicenseUrl": "http://www.wtfpl.net/" + } + ] + }, + { + "moduleName": "org.slf4j:slf4j-api", + "moduleVersion": "2.0.17", + "moduleUrls": [ + "http://www.slf4j.org" + ], + "moduleLicenses": [ + { + "moduleLicense": null, + "moduleLicenseUrl": "https://opensource.org/license/mit" + }, + { + "moduleLicense": "MIT License", + "moduleLicenseUrl": "https://opensource.org/licenses/MIT" + } + ] + } + ] +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 2a189f771a8..62a72eacddb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -11,6 +11,7 @@ include 'commercetools:commercetools-monitoring-datadog' include 'commercetools:commercetools-graphql-api' include 'commercetools:commercetools-sdk-java-api' include 'commercetools:commercetools-sdk-java-importapi' +include 'commercetools:commercetools-sdk-java-checkout' include 'commercetools:commercetools-sdk-java-history' include 'commercetools:commercetools-sdk-compat-v1' include 'commercetools:commercetools-apachehttp-client'