cl.transbank.pos.responses.RefundResponse Maven / Gradle / Ivy
package cl.transbank.pos.responses;
import cl.transbank.pos.utils.RefundCResponse;
public class RefundResponse {
private final int functionCode;
private final int responseCode;
private final long commerceCode;
private final String terminalId;
private final String authorizationCode;
private final int operationID;
private final int initialized;
public RefundResponse(RefundCResponse cresponse) {
this.responseCode = cresponse.getResponseCode();
this.functionCode = cresponse.getFunction();
this.commerceCode = cresponse.getCommerceCode();
this.terminalId = cresponse.getTerminalId();
this.authorizationCode = cresponse.getAuthorizationCode();
this.operationID = cresponse.getOperationID();
this.initialized = cresponse.getInitilized();
}
public boolean isSuccessful() {
return responseCode == 0;
}
public String getResponseMessage() {
return ResponseCodes.getMessage(this.getResponseCode());
}
public int getFunctionCode() {
return functionCode;
}
@Override
public String toString() {
return "RefundResponse{" +
"isSuccesful=" + isSuccessful() +
", functionCode=" + functionCode +
", responseCode=" + responseCode +
", commerceCode=" + commerceCode +
", terminalId=" + terminalId +
", authorizationCode=" + authorizationCode +
", operationID=" + operationID +
", initialized=" + initialized +
" }\n";
}
public int getResponseCode() {
return responseCode;
}
public long getCommerceCode() {
return commerceCode;
}
public String getTerminalId() {
return terminalId;
}
public String getAuthorizationCode() {
return authorizationCode;
}
public int getOperationID() {
return operationID;
}
public int getInitialized() {
return initialized;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy