All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.products.commands.updateactions.AddExternalImage Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.products.commands.updateactions;

import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.products.Image;
import io.sphere.sdk.products.Product;

/**
 *  Adds external image url with meta-information to the product variant.
 *
 *  {@doc.gen intro}
 *
 *  {@include.example io.sphere.sdk.products.commands.ProductUpdateCommandTest#addExternalImage()}
 */
public class AddExternalImage extends UpdateActionImpl {
    private final Integer variantId;
    private final Image image;

    private AddExternalImage(final Image image, final Integer variantId) {
        super("addExternalImage");
        this.image = image;
        this.variantId = variantId;
    }

    public static AddExternalImage of(final Image image, final Integer variantId) {
        return new AddExternalImage(image, variantId);
    }

    public Image getImage() {
        return image;
    }

    public Integer getVariantId() {
        return variantId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy