
com.global.api.builders.InstallmentBuilder 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
The newest version!
package com.global.api.builders;
import com.global.api.ServicesContainer;
import com.global.api.entities.IInstallmentEntity;
import com.global.api.entities.exceptions.ApiException;
import com.global.api.gateways.IInstallmentService;
import com.global.api.paymentMethods.Installment;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public abstract class InstallmentBuilder extends BaseBuilder {
/**
* Represents the Installment entity
*/
private IInstallmentEntity entity;
/**
* Represents the parameterized constructor to set the installment Entity value
*
* @param entity
*/
public InstallmentBuilder(IInstallmentEntity entity) {
if (entity != null) {
this.entity = entity;
}
}
/**
* Executes the Installment builder against the gateway.
*
* @param configName
* @return {@link Installment}
* @throws ApiException
*/
public Installment execute(String configName) throws ApiException {
super.execute(configName);
IInstallmentService installmentClient = ServicesContainer.getInstance().getInstallmentClient(configName);
return installmentClient.processInstallment(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy