Skip to content

Commit

Permalink
TASK: Updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Dec 19, 2022
1 parent d19a74e commit 47c5175
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 24 deletions.
27 changes: 17 additions & 10 deletions changes.md
@@ -1,31 +1,38 @@
**Api changes**

<details>
<summary>Added Type(s)</summary>
<summary>Changed Property(s)</summary>

- added type `ProductPricesSetMessage` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:758:0)
- added type `ProductPricesSetMessagePayload` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:919:0)
- :warning: changed property `amount` of type `Transaction` from type `TypedMoney` to `CentPrecisionMoney` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/payment/Transaction.raml:18:2)
</details>


<details>
<summary>Removed Type(s)</summary>
<summary>Added Property(s)</summary>

- :warning: removed type `ProductPriceSetMessage` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/types.raml:758:0)
- :warning: removed type `ProductPriceSetMessagePayload` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/types.raml:919:0)
- added property `createdAt` to type `AssignedProductSelection` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/product-selection/AssignedProductSelection.raml:12:2)
</details>


<details>
<summary>Added Property(s)</summary>
<summary>Required Property(s)</summary>

- added property `createdAt` to type `AssignedProductSelection` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/product-selection/AssignedProductSelection.raml:12:2)
- changed property `discounted` of type `StagedStandalonePrice` to be optional (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/standalone-price/StagedStandalonePrice.raml:12:2)
</details>


<details>
<summary>Required Property(s)</summary>
<summary>Added Type(s)</summary>

- changed property `discounted` of type `StagedStandalonePrice` to be optional (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/standalone-price/StagedStandalonePrice.raml:12:2)
- added type `ProductPricesSetMessage` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:758:0)
- added type `ProductPricesSetMessagePayload` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:919:0)
</details>


<details>
<summary>Removed Type(s)</summary>

- :warning: removed type `ProductPriceSetMessage` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/types.raml:758:0)
- :warning: removed type `ProductPriceSetMessagePayload` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/types.raml:919:0)
</details>

Expand Up @@ -9,7 +9,7 @@
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import com.commercetools.api.models.common.TypedMoney;
import com.commercetools.api.models.common.CentPrecisionMoney;
import com.commercetools.api.models.type.CustomFields;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
Expand Down Expand Up @@ -63,7 +63,7 @@ public interface Transaction extends com.commercetools.api.models.Customizable<T
@NotNull
@Valid
@JsonProperty("amount")
public TypedMoney getAmount();
public CentPrecisionMoney getAmount();

/**
* <p>Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the <code>interfaceInteractions</code> array, the corresponding interaction can be found with this ID.</p>
Expand Down Expand Up @@ -92,7 +92,7 @@ public interface Transaction extends com.commercetools.api.models.Customizable<T

public void setType(final TransactionType type);

public void setAmount(final TypedMoney amount);
public void setAmount(final CentPrecisionMoney amount);

public void setInteractionId(final String interactionId);

Expand Down
Expand Up @@ -34,7 +34,7 @@ public class TransactionBuilder implements Builder<Transaction> {

private com.commercetools.api.models.payment.TransactionType type;

private com.commercetools.api.models.common.TypedMoney amount;
private com.commercetools.api.models.common.CentPrecisionMoney amount;

@Nullable
private String interactionId;
Expand Down Expand Up @@ -75,18 +75,18 @@ public TransactionBuilder type(final com.commercetools.api.models.payment.Transa
* <p>Money value of the Transaction.</p>
*/

public TransactionBuilder amount(final com.commercetools.api.models.common.TypedMoney amount) {
this.amount = amount;
public TransactionBuilder amount(
Function<com.commercetools.api.models.common.CentPrecisionMoneyBuilder, com.commercetools.api.models.common.CentPrecisionMoneyBuilder> builder) {
this.amount = builder.apply(com.commercetools.api.models.common.CentPrecisionMoneyBuilder.of()).build();
return this;
}

/**
* <p>Money value of the Transaction.</p>
*/

public TransactionBuilder amount(
Function<com.commercetools.api.models.common.TypedMoneyBuilder, Builder<? extends com.commercetools.api.models.common.TypedMoney>> builder) {
this.amount = builder.apply(com.commercetools.api.models.common.TypedMoneyBuilder.of()).build();
public TransactionBuilder amount(final com.commercetools.api.models.common.CentPrecisionMoney amount) {
this.amount = amount;
return this;
}

Expand Down Expand Up @@ -140,7 +140,7 @@ public com.commercetools.api.models.payment.TransactionType getType() {
return this.type;
}

public com.commercetools.api.models.common.TypedMoney getAmount() {
public com.commercetools.api.models.common.CentPrecisionMoney getAmount() {
return this.amount;
}

Expand Down
Expand Up @@ -26,7 +26,7 @@ public class TransactionImpl implements Transaction, ModelBase {

private com.commercetools.api.models.payment.TransactionType type;

private com.commercetools.api.models.common.TypedMoney amount;
private com.commercetools.api.models.common.CentPrecisionMoney amount;

private String interactionId;

Expand All @@ -38,7 +38,7 @@ public class TransactionImpl implements Transaction, ModelBase {
TransactionImpl(@JsonProperty("id") final String id,
@JsonProperty("timestamp") final java.time.ZonedDateTime timestamp,
@JsonProperty("type") final com.commercetools.api.models.payment.TransactionType type,
@JsonProperty("amount") final com.commercetools.api.models.common.TypedMoney amount,
@JsonProperty("amount") final com.commercetools.api.models.common.CentPrecisionMoney amount,
@JsonProperty("interactionId") final String interactionId,
@JsonProperty("state") final com.commercetools.api.models.payment.TransactionState state,
@JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom) {
Expand Down Expand Up @@ -82,7 +82,7 @@ public com.commercetools.api.models.payment.TransactionType getType() {
* <p>Money value of the Transaction.</p>
*/

public com.commercetools.api.models.common.TypedMoney getAmount() {
public com.commercetools.api.models.common.CentPrecisionMoney getAmount() {
return this.amount;
}

Expand Down Expand Up @@ -122,7 +122,7 @@ public void setType(final com.commercetools.api.models.payment.TransactionType t
this.type = type;
}

public void setAmount(final com.commercetools.api.models.common.TypedMoney amount) {
public void setAmount(final com.commercetools.api.models.common.CentPrecisionMoney amount) {
this.amount = amount;
}

Expand Down

0 comments on commit 47c5175

Please sign in to comment.