io.sphere.sdk.carts.commands.updateactions.RemoveDiscountCode Maven / Gradle / Ivy
package io.sphere.sdk.carts.commands.updateactions;
import io.sphere.sdk.carts.Cart;
import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.discountcodes.DiscountCode;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.models.Referenceable;
/**
* Removes a discount code.
*
* {@doc.gen intro}
*
* {@include.example io.sphere.sdk.carts.commands.CartUpdateCommandTest#removeDiscountCode()}
*/
public class RemoveDiscountCode extends UpdateActionImpl {
private final Reference discountCode;
private RemoveDiscountCode(final Reference discountCode) {
super("removeDiscountCode");
this.discountCode = discountCode;
}
public static RemoveDiscountCode of(final Referenceable discountCode) {
return new RemoveDiscountCode(discountCode.toReference());
}
public Reference getDiscountCode() {
return discountCode;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy