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

io.sphere.sdk.discountcodes.commands.DiscountCodeCreateCommandImpl Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
/*
This class has been generated by class io.sphere.sdk.annotations.processors.CreateCommandEndpointAnnotationProcessor
induced by the annotation io.sphere.sdk.annotations.HasCreateCommand.
in the source class io.sphere.sdk.discountcodes.DiscountCode.
To render this class the handlebars template 'commands/createCommandImplementation.hbs' has been used.
*/
package io.sphere.sdk.discountcodes.commands;

import io.sphere.sdk.commands.MetaModelCreateCommandBuilder;
import io.sphere.sdk.commands.MetaModelCreateCommandImpl;
import io.sphere.sdk.discountcodes.DiscountCode;
import io.sphere.sdk.discountcodes.DiscountCodeDraft;
import io.sphere.sdk.discountcodes.expansion.DiscountCodeExpansionModel;
import io.sphere.sdk.client.JsonEndpoint;

final class DiscountCodeCreateCommandImpl extends MetaModelCreateCommandImpl> implements DiscountCodeCreateCommand {
    DiscountCodeCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) {
        super(builder);
    }

    DiscountCodeCreateCommandImpl(final DiscountCodeDraft body) {
        super(body, JsonEndpoint.of(DiscountCode.typeReference(), "/discount-codes"), DiscountCodeExpansionModel.of(), DiscountCodeCreateCommandImpl::new);
    }

    @Override
    public DiscountCodeCreateCommand withDraft(final DiscountCodeDraft draft) {
        return new DiscountCodeCreateCommandImpl(copyBuilder().draft(draft));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy