Skip to content

Commit 850d8a6

Browse files
committed
add MyPaymentDraft mixins
1 parent 41a0fec commit 850d8a6

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

api-java-mixin.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ types:
13471347
MyPayment:
13481348
(java-extends): 'com.commercetools.api.models.DomainResource<MyPayment>, com.commercetools.api.models.Customizable<MyPayment>'
13491349
MyPaymentDraft:
1350-
(java-extends): 'com.commercetools.api.models.CustomizableDraft<MyPaymentDraft>'
1350+
(java-extends): 'MyPaymenDraftMixin, com.commercetools.api.models.CustomizableDraft<MyPaymentDraft>'
13511351
MyPaymentUpdate:
13521352
(java-extends): 'com.commercetools.api.models.ResourceUpdate<MyPaymentUpdate,
13531353
MyPaymentUpdateAction, MyPaymentUpdateBuilder>'

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyPaymentDraft.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import javax.annotation.Nullable;
99

1010
import com.commercetools.api.models.common.Money;
11+
import com.commercetools.api.models.payment.MyPaymentDraftMixin;
1112
import com.commercetools.api.models.payment.PaymentMethodInfoDraft;
1213
import com.commercetools.api.models.type.CustomFieldsDraft;
1314
import com.fasterxml.jackson.annotation.*;
@@ -33,8 +34,8 @@
3334
*/
3435
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
3536
@JsonDeserialize(as = MyPaymentDraftImpl.class)
36-
public interface MyPaymentDraft extends com.commercetools.api.models.CustomizableDraft<MyPaymentDraft>,
37-
io.vrap.rmf.base.client.Draft<MyPaymentDraft> {
37+
public interface MyPaymentDraft extends MyPaymentDraftMixin,
38+
com.commercetools.api.models.CustomizableDraft<MyPaymentDraft>, io.vrap.rmf.base.client.Draft<MyPaymentDraft> {
3839

3940
/**
4041
* <p>Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.</p>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
package com.commercetools.api.models.payment;
3+
4+
public interface MyPaymentDraftMixin {
5+
6+
public void setPaymentMethodInfo(final PaymentMethodInfoDraft paymentMethodInfo);
7+
8+
public default void setPaymentMethodInfo(final PaymentMethodInfo paymentMethodInfo) {
9+
this.setPaymentMethodInfo(paymentMethodInfo.toDraft());
10+
}
11+
}

0 commit comments

Comments
 (0)