com.global.api.terminals.builders.TerminalBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
package com.global.api.terminals.builders;
import com.global.api.builders.TransactionBuilder;
import com.global.api.entities.enums.PaymentMethodType;
import com.global.api.entities.enums.StoredCredentialInitiator;
import com.global.api.entities.enums.TransactionType;
import com.global.api.terminals.TerminalResponse;
import lombok.Getter;
public abstract class TerminalBuilder> extends TransactionBuilder {
protected PaymentMethodType paymentMethodType;
protected Integer requestId;
/*
* ID of the clerk if in retail mode, and ID of the server if in restaurant mode
*
* @var int
*/
protected Integer clerkId;
protected String referenceNumber;
@Getter
protected String clerkNumber;
@Getter
protected StoredCredentialInitiator storedCredentialInitiator;
public PaymentMethodType getPaymentMethodType() {
return paymentMethodType;
}
public Integer getRequestId() {
return requestId;
}
public Integer getClerkId() {
return this.clerkId;
}
public String getReferenceNumber() { return this.referenceNumber; }
public TerminalBuilder withClerkId(Integer value) {
clerkId = value;
return this;
}
public TerminalAuthBuilder withCardOnFileIndicator(StoredCredentialInitiator value){
storedCredentialInitiator = value;
return (TerminalAuthBuilder) this;
}
public TerminalBuilder withReferenceNumber(String value) {
referenceNumber = value;
return this;
}
public TerminalBuilder withRequestId(Integer value) {
requestId = value;
return this;
}
public TerminalBuilder withClerkNumber(String value) {
this.clerkNumber = value;
return this;
}
TerminalBuilder(TransactionType type, PaymentMethodType paymentType) {
super(type);
paymentMethodType = paymentType;
}
}