io.sphere.sdk.payments.commands.PaymentCreateCommandImpl Maven / Gradle / Ivy
/*
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.payments.Payment.
To render this class the handlebars template 'commands/createCommandImplementation.hbs' has been used.
*/
package io.sphere.sdk.payments.commands;
import io.sphere.sdk.commands.MetaModelCreateCommandBuilder;
import io.sphere.sdk.commands.MetaModelCreateCommandImpl;
import io.sphere.sdk.payments.Payment;
import io.sphere.sdk.payments.PaymentDraft;
import io.sphere.sdk.payments.expansion.PaymentExpansionModel;
import io.sphere.sdk.client.JsonEndpoint;
final class PaymentCreateCommandImpl extends MetaModelCreateCommandImpl> implements PaymentCreateCommand {
PaymentCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) {
super(builder);
}
PaymentCreateCommandImpl(final PaymentDraft body) {
super(body, JsonEndpoint.of(Payment.typeReference(), "/payments"), PaymentExpansionModel.of(), PaymentCreateCommandImpl::new);
}
@Override
public PaymentCreateCommand withDraft(final PaymentDraft draft) {
return new PaymentCreateCommandImpl(copyBuilder().draft(draft));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy