diff --git a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls
index ef74aaaaeb6..48b75bfc46f 100644
--- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls
+++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls
@@ -10891,6 +10891,8 @@ type RecurringOrder implements Versioned {
customerRef: Reference
customer: Customer
customerEmail: String
+ storeRef: KeyReference
+ store: Store
id: String!
version: Long!
createdAt: DateTime!
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java
index c16fdddf7f6..31e0f36c962 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java
@@ -106,6 +106,7 @@ public interface Price extends com.commercetools.api.models.Customizable Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value. Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value. Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value. Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value. Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value. Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value. Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value. Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value. If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error. Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value. If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error. Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value. If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.value is 0.5, the value is rounded in favor of the customer with half-down rounding.value is 0.5, the value is rounded in favor of the customer with half-down rounding.value is 0.5, the value is rounded in favor of the customer with half-down rounding.value is 0.5, the value is rounded in favor of the customer with half-down rounding.value is 0.5, the value is rounded in favor of the customer with half-down rounding.value is 0.5, the value is rounded in favor of the customer with half-down rounding.value is 0.5, the value is rounded in favor of the customer with half-down rounding.
If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @param money value to be set * @return Builder @@ -38,6 +39,7 @@ public ProductDiscountValueAbsoluteDraftBuilder money(final com.commercetools.ap /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @param money value to be set * @return Builder @@ -51,6 +53,7 @@ public ProductDiscountValueAbsoluteDraftBuilder money( /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @param money value to be set * @return Builder @@ -67,6 +70,7 @@ public ProductDiscountValueAbsoluteDraftBuilder plusMoney( /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @param builder function to build the money value * @return Builder @@ -83,6 +87,7 @@ public ProductDiscountValueAbsoluteDraftBuilder plusMoney( /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @param builder function to build the money value * @return Builder @@ -97,6 +102,7 @@ public ProductDiscountValueAbsoluteDraftBuilder withMoney( /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @param builder function to build the money value * @return Builder @@ -109,6 +115,7 @@ public ProductDiscountValueAbsoluteDraftBuilder addMoney( /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @param builder function to build the money value * @return Builder @@ -121,6 +128,7 @@ public ProductDiscountValueAbsoluteDraftBuilder setMoney( /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
* @return money */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountValueAbsoluteDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountValueAbsoluteDraftImpl.java index b29486d54d3..b2e66055300 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountValueAbsoluteDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountValueAbsoluteDraftImpl.java @@ -53,6 +53,7 @@ public String getType() { /** *Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
+ *If the value exceeds the price of a Product Variant, the discounted price (of the Product Variant) will be a negative value.
*If the array is empty or has multiple values of the same currency, the API returns an InvalidOperation error.
*/ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchProjectionParams.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchProjectionParams.java index 8d482a5e01e..2197fe3fdc3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchProjectionParams.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchProjectionParams.java @@ -93,7 +93,7 @@ public interface ProductSearchProjectionParams { public Listkey of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses, but evaluating query expressions is restricted to the original product information.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses. However, you can only specify query expressions for the original product data, not for tailored data.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses, but evaluating query expressions is restricted to the original product information.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses. However, you can only specify query expressions for the original product data, not for tailored data.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses, but evaluating query expressions is restricted to the original product information.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses. However, you can only specify query expressions for the original product data, not for tailored data.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses, but evaluating query expressions is restricted to the original product information.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses. However, you can only specify query expressions for the original product data, not for tailored data.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses, but evaluating query expressions is restricted to the original product information.
key of an existing Store. If the Store has defined languages, countries, distributionChannels, or supplyChannels, they are used for projections based on locale, price, and inventory. For Projects with active Product Selections, the API does not take the availability of the Product in the specified Store into account. Product Tailoring modifies the product information returned in API responses. However, you can only specify query expressions for the original product data, not for tailored data.
Set if a matching ProductDiscount exists. If set, the API uses the discounted value for the Line Item price selection. When a relative discount is applied and the fraction part of the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.
If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
* @return discounted */ @Valid @@ -333,6 +334,7 @@ public interface StandalonePrice /** *Set if a matching ProductDiscount exists. If set, the API uses the discounted value for the Line Item price selection. When a relative discount is applied and the fraction part of the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.
If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
* @param discounted value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java index efe4c57c561..fdd3734b0c4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java @@ -447,6 +447,7 @@ public StandalonePriceBuilder setTiers( /** *Set if a matching ProductDiscount exists. If set, the API uses the discounted value for the Line Item price selection. When a relative discount is applied and the fraction part of the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.
If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
* @param builder function to build the discounted value * @return Builder */ @@ -459,6 +460,7 @@ public StandalonePriceBuilder discounted( /** *Set if a matching ProductDiscount exists. If set, the API uses the discounted value for the Line Item price selection. When a relative discount is applied and the fraction part of the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.
If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
* @param builder function to build the discounted value * @return Builder */ @@ -471,6 +473,7 @@ public StandalonePriceBuilder withDiscounted( /** *Set if a matching ProductDiscount exists. If set, the API uses the discounted value for the Line Item price selection. When a relative discount is applied and the fraction part of the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.
If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
* @param discounted value to be set * @return Builder */ @@ -750,6 +753,7 @@ public java.util.ListSet if a matching ProductDiscount exists. If set, the API uses the discounted value for the Line Item price selection. When a relative discount is applied and the fraction part of the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.
If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
* @return discounted */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java index d6644b23869..c1aabf0ef95 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java @@ -235,6 +235,7 @@ public java.util.ListSet if a matching ProductDiscount exists. If set, the API uses the discounted value for the Line Item price selection. When a relative discount is applied and the fraction part of the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.
If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
*/ public com.commercetools.api.models.common.DiscountedPrice getDiscounted() { 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 index 5ef8281e1cf..984746e52ef 100644 --- 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 @@ -35,6 +35,14 @@ @JsonDeserialize(as = TransactionItemImpl.class) public interface TransactionItem { + /** + *Money value of the Transaction Item.
+ * @return amount + */ + @Valid + @JsonProperty("amount") + public Amount getAmount(); + /** *Reference to the Payment associated with the Transaction Item.
* @return payment @@ -54,11 +62,10 @@ public interface TransactionItem { /** *Money value of the Transaction Item.
- * @return amount + * @param amount value to be set */ - @Valid - @JsonProperty("amount") - public Amount getAmount(); + + public void setAmount(final Amount amount); /** *Reference to the Payment associated with the Transaction Item.
@@ -74,13 +81,6 @@ public interface TransactionItem { 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 @@ -96,9 +96,9 @@ public static TransactionItem of() { */ public static TransactionItem of(final TransactionItem template) { TransactionItemImpl instance = new TransactionItemImpl(); + instance.setAmount(template.getAmount()); instance.setPayment(template.getPayment()); instance.setPaymentIntegration(template.getPaymentIntegration()); - instance.setAmount(template.getAmount()); return instance; } @@ -115,10 +115,10 @@ public static TransactionItem deepCopy(@Nullable final TransactionItem template) return null; } TransactionItemImpl instance = new TransactionItemImpl(); + instance.setAmount(com.commercetools.checkout.models.common.Amount.deepCopy(template.getAmount())); 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; } 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 index 1e019937aa9..01f4d56106a 100644 --- 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 @@ -24,13 +24,48 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TransactionItemBuilder implements BuilderMoney value of the Transaction Item.
+ * @param builder function to build the amount value + * @return Builder + */ + + public TransactionItemBuilder amount( + FunctionMoney value of the Transaction Item.
+ * @param builder function to build the amount value + * @return Builder + */ + + public TransactionItemBuilder withAmount( + FunctionMoney 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.
@@ -109,37 +144,12 @@ public TransactionItemBuilder paymentIntegration( /** *Money value of the Transaction Item.
- * @param builder function to build the amount value - * @return Builder - */ - - public TransactionItemBuilder amount( - FunctionMoney value of the Transaction Item.
- * @param builder function to build the amount value - * @return Builder - */ - - public TransactionItemBuilder withAmount( - FunctionMoney value of the Transaction Item.
- * @param amount value to be set - * @return Builder + * @return amount */ - public TransactionItemBuilder amount(@Nullable final com.commercetools.checkout.models.common.Amount amount) { - this.amount = amount; - return this; + @Nullable + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; } /** @@ -161,23 +171,13 @@ public com.commercetools.checkout.models.payment_integration.PaymentIntegrationR 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); + return new TransactionItemImpl(amount, payment, paymentIntegration); } /** @@ -185,7 +185,7 @@ public TransactionItem build() { * @return TransactionItem */ public TransactionItem buildUnchecked() { - return new TransactionItemImpl(payment, paymentIntegration, amount); + return new TransactionItemImpl(amount, payment, paymentIntegration); } /** @@ -203,9 +203,9 @@ public static TransactionItemBuilder of() { */ public static TransactionItemBuilder of(final TransactionItem template) { TransactionItemBuilder builder = new TransactionItemBuilder(); + builder.amount = template.getAmount(); 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/TransactionItemImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java index 4edbe40d894..32fab10f2b1 100644 --- 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 @@ -22,23 +22,22 @@ @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.common.Amount amount; + 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( + TransactionItemImpl(@JsonProperty("amount") final com.commercetools.checkout.models.common.Amount amount, @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) { + @JsonProperty("paymentIntegration") final com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference paymentIntegration) { + this.amount = amount; this.payment = payment; this.paymentIntegration = paymentIntegration; - this.amount = amount; } /** @@ -47,6 +46,14 @@ public class TransactionItemImpl implements TransactionItem, ModelBase { public TransactionItemImpl() { } + /** + *Money value of the Transaction Item.
+ */ + + public com.commercetools.checkout.models.common.Amount getAmount() { + return this.amount; + } + /** *Reference to the Payment associated with the Transaction Item.
*/ @@ -63,12 +70,8 @@ public com.commercetools.checkout.models.payment_integration.PaymentIntegrationR return this.paymentIntegration; } - /** - *Money value of the Transaction Item.
- */ - - public com.commercetools.checkout.models.common.Amount getAmount() { - return this.amount; + public void setAmount(final com.commercetools.checkout.models.common.Amount amount) { + this.amount = amount; } public void setPayment(final com.commercetools.checkout.models.payment.PaymentReference payment) { @@ -80,10 +83,6 @@ public void setPaymentIntegration( 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) @@ -94,25 +93,25 @@ public boolean equals(Object o) { TransactionItemImpl that = (TransactionItemImpl) o; - return new EqualsBuilder().append(payment, that.payment) + return new EqualsBuilder().append(amount, that.amount) + .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(); + return new HashCodeBuilder(17, 37).append(amount).append(payment).append(paymentIntegration).toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("payment", payment) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("amount", amount) + .append("payment", payment) .append("paymentIntegration", paymentIntegration) - .append("amount", amount) .build(); } 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 index 137706e4848..272bbb672f1 100644 --- 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 @@ -17,14 +17,21 @@ public void buildUnchecked(String name, TransactionItemBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { + new Object[] { "amount", + TransactionItem.builder().amount(new com.commercetools.checkout.models.common.AmountImpl()) }, 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()) } }; + 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()); } @Test @@ -43,11 +50,4 @@ public void paymentIntegration() { 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/references.txt b/references.txt index be6c445227a..3a1464c3a3e 100644 --- a/references.txt +++ b/references.txt @@ -466,3 +466,4 @@ f8b027c8e1b5ba61ace3d3d358b9efc7ad4b93eb e111bc9d132c5da4dc43085c1983efa8cbdf91d3 e60554cf51abaeb40bb26716fb27ada4c135b40f 0ccd9d7c7f9d43d7c437c69ec81c50b0d4ddc641 +246368f5b2d9d7245b2f33c08aedb941a5561623