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

com.logicommerce.sdk.models.SubscriptionResponseImplBuilder Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package com.logicommerce.sdk.models;

import com.logicommerce.sdk.enums.SubscriptionActionStatus;
import com.logicommerce.sdk.enums.SubscriptionMessageType;
import com.logicommerce.sdk.enums.SubscriptionStatus;

public class SubscriptionResponseImplBuilder {

	private SubscriptionActionStatus actionStatus;

	private SubscriptionStatus status;

	private SubscriptionMessageType messageType;

	private String message;

	public SubscriptionResponseImplBuilder() {
		messageType = SubscriptionMessageType.INFO;
		message = "";
	}

	public SubscriptionResponseImplBuilder actionStatus(SubscriptionActionStatus actionStatus) {
		this.actionStatus = actionStatus;
		return this;
	}

	public SubscriptionResponseImplBuilder status(SubscriptionStatus status) {
		this.status = status;
		return this;
	}

	public SubscriptionResponseImplBuilder responseType(SubscriptionMessageType messageType) {
		this.messageType = messageType;
		return this;
	}

	public SubscriptionResponseImplBuilder message(String message) {
		this.message = message;
		return this;
	}

	public SubscriptionResponse build() {
		SubscriptionResponseImpl response = new SubscriptionResponseImpl();
		response.setActionStatus(actionStatus);
		response.setStatus(status);
		response.setMessageType(messageType);
		response.setMessage(message);
		return response;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy