Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-java-mixin.raml
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ types:
MyPayment:
(java-extends): 'com.commercetools.api.models.DomainResource<MyPayment>, com.commercetools.api.models.Customizable<MyPayment>'
MyPaymentDraft:
(java-extends): 'com.commercetools.api.models.CustomizableDraft<MyPaymentDraft>'
(java-extends): 'MyPaymenDraftMixin, com.commercetools.api.models.CustomizableDraft<MyPaymentDraft>'
MyPaymentUpdate:
(java-extends): 'com.commercetools.api.models.ResourceUpdate<MyPaymentUpdate,
MyPaymentUpdateAction, MyPaymentUpdateBuilder>'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.annotation.Nullable;

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

/**
* <p>Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

package com.commercetools.api.models.payment;

public interface MyPaymentDraftMixin {

public void setPaymentMethodInfo(final PaymentMethodInfoDraft paymentMethodInfo);

public default void setPaymentMethodInfo(final PaymentMethodInfo paymentMethodInfo) {
this.setPaymentMethodInfo(paymentMethodInfo.toDraft());
}

Check warning on line 10 in commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/models/payment/MyPaymentDraftMixin.java

View check run for this annotation

Codecov / codecov/patch

commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/models/payment/MyPaymentDraftMixin.java#L9-L10

Added lines #L9 - L10 were not covered by tests
}