-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #580 from commercetools/gen-sdk-updates
Update generated SDKs
- Loading branch information
Showing
15 changed files
with
512 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,15 @@ | ||
**Api changes** | ||
|
||
<details> | ||
<summary>Added Method(s)</summary> | ||
|
||
- added method `apiRoot.withProjectKey().discountCodes().withKey().get()` | ||
- added method `apiRoot.withProjectKey().discountCodes().withKey().head()` | ||
- added method `apiRoot.withProjectKey().discountCodes().withKey().post()` | ||
- added method `apiRoot.withProjectKey().discountCodes().withKey().delete()` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Property(s)</summary> | ||
|
||
- added property `perMethodExternalTaxRate` to type `CartAddLineItemAction` | ||
- added property `key` to type `DiscountCode` | ||
- added property `key` to type `DiscountCodeDraft` | ||
- added property `shippingMode` to type `MyCartDraft` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Resource(s)</summary> | ||
<summary>Added Type(s)</summary> | ||
|
||
- added resource `/{projectKey}/discount-codes/key={key}` | ||
- added type `DiscountedLineItemPortionDraft` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Type(s)</summary> | ||
<summary>Changed Property(s)</summary> | ||
|
||
- added type `DiscountCodeSetKeyAction` | ||
- added type `DiscountCodeCreatedMessage` | ||
- added type `DiscountCodeDeletedMessage` | ||
- added type `DiscountCodeKeySetMessage` | ||
- added type `DiscountCodeCreatedMessagePayload` | ||
- added type `DiscountCodeDeletedMessagePayload` | ||
- added type `DiscountCodeKeySetMessagePayload` | ||
- :warning: changed property `includedDiscounts` of type `DiscountedLineItemPriceDraft` from type `DiscountedLineItemPortion[]` to `DiscountedLineItemPortionDraft[]` | ||
</details> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
...main/java-generated/com/commercetools/api/models/cart/DiscountedLineItemPortionDraft.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
|
||
package com.commercetools.api.models.cart; | ||
|
||
import java.time.*; | ||
import java.util.*; | ||
import java.util.function.Function; | ||
|
||
import javax.annotation.Nullable; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
|
||
import com.commercetools.api.models.common.Reference; | ||
import com.commercetools.api.models.common.TypedMoneyDraft; | ||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
|
||
import io.vrap.rmf.base.client.utils.Generated; | ||
|
||
/** | ||
* DiscountedLineItemPortionDraft | ||
* | ||
* <hr> | ||
* Example to create an instance using the builder pattern | ||
* <div class=code-example> | ||
* <pre><code class='java'> | ||
* DiscountedLineItemPortionDraft discountedLineItemPortionDraft = DiscountedLineItemPortionDraft.builder() | ||
* .discount(discountBuilder -> discountBuilder) | ||
* .discountedAmount(discountedAmountBuilder -> discountedAmountBuilder) | ||
* .build() | ||
* </code></pre> | ||
* </div> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
@JsonDeserialize(as = DiscountedLineItemPortionDraftImpl.class) | ||
public interface DiscountedLineItemPortionDraft extends io.vrap.rmf.base.client.Draft<DiscountedLineItemPortionDraft> { | ||
|
||
/** | ||
* <p>A CartDiscountReference or DirectDiscountReference for the discount applicable on the Line Item.</p> | ||
* @return discount | ||
*/ | ||
@NotNull | ||
@Valid | ||
@JsonProperty("discount") | ||
public Reference getDiscount(); | ||
|
||
/** | ||
* <p>Money value for the discount applicable.</p> | ||
* @return discountedAmount | ||
*/ | ||
@NotNull | ||
@Valid | ||
@JsonProperty("discountedAmount") | ||
public TypedMoneyDraft getDiscountedAmount(); | ||
|
||
/** | ||
* <p>A CartDiscountReference or DirectDiscountReference for the discount applicable on the Line Item.</p> | ||
* @param discount value to be set | ||
*/ | ||
|
||
public void setDiscount(final Reference discount); | ||
|
||
/** | ||
* <p>Money value for the discount applicable.</p> | ||
* @param discountedAmount value to be set | ||
*/ | ||
|
||
public void setDiscountedAmount(final TypedMoneyDraft discountedAmount); | ||
|
||
/** | ||
* factory method | ||
* @return instance of DiscountedLineItemPortionDraft | ||
*/ | ||
public static DiscountedLineItemPortionDraft of() { | ||
return new DiscountedLineItemPortionDraftImpl(); | ||
} | ||
|
||
/** | ||
* factory method to create a shallow copy DiscountedLineItemPortionDraft | ||
* @param template instance to be copied | ||
* @return copy instance | ||
*/ | ||
public static DiscountedLineItemPortionDraft of(final DiscountedLineItemPortionDraft template) { | ||
DiscountedLineItemPortionDraftImpl instance = new DiscountedLineItemPortionDraftImpl(); | ||
instance.setDiscount(template.getDiscount()); | ||
instance.setDiscountedAmount(template.getDiscountedAmount()); | ||
return instance; | ||
} | ||
|
||
/** | ||
* factory method to create a deep copy of DiscountedLineItemPortionDraft | ||
* @param template instance to be copied | ||
* @return copy instance | ||
*/ | ||
@Nullable | ||
public static DiscountedLineItemPortionDraft deepCopy(@Nullable final DiscountedLineItemPortionDraft template) { | ||
if (template == null) { | ||
return null; | ||
} | ||
DiscountedLineItemPortionDraftImpl instance = new DiscountedLineItemPortionDraftImpl(); | ||
instance.setDiscount(com.commercetools.api.models.common.Reference.deepCopy(template.getDiscount())); | ||
instance.setDiscountedAmount( | ||
com.commercetools.api.models.common.TypedMoneyDraft.deepCopy(template.getDiscountedAmount())); | ||
return instance; | ||
} | ||
|
||
/** | ||
* builder factory method for DiscountedLineItemPortionDraft | ||
* @return builder | ||
*/ | ||
public static DiscountedLineItemPortionDraftBuilder builder() { | ||
return DiscountedLineItemPortionDraftBuilder.of(); | ||
} | ||
|
||
/** | ||
* create builder for DiscountedLineItemPortionDraft instance | ||
* @param template instance with prefilled values for the builder | ||
* @return builder | ||
*/ | ||
public static DiscountedLineItemPortionDraftBuilder builder(final DiscountedLineItemPortionDraft template) { | ||
return DiscountedLineItemPortionDraftBuilder.of(template); | ||
} | ||
|
||
/** | ||
* accessor map function | ||
* @param <T> mapped type | ||
* @param helper function to map the object | ||
* @return mapped value | ||
*/ | ||
default <T> T withDiscountedLineItemPortionDraft(Function<DiscountedLineItemPortionDraft, T> helper) { | ||
return helper.apply(this); | ||
} | ||
|
||
/** | ||
* gives a TypeReference for usage with Jackson DataBind | ||
* @return TypeReference | ||
*/ | ||
public static com.fasterxml.jackson.core.type.TypeReference<DiscountedLineItemPortionDraft> typeReference() { | ||
return new com.fasterxml.jackson.core.type.TypeReference<DiscountedLineItemPortionDraft>() { | ||
@Override | ||
public String toString() { | ||
return "TypeReference<DiscountedLineItemPortionDraft>"; | ||
} | ||
}; | ||
} | ||
} |
Oops, something went wrong.