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

com.global.api.services.PayFacService Maven / Gradle / Ivy

There is a newer version: 14.2.3
Show newest version
package com.global.api.services;

import com.global.api.builders.PayFacBuilder;
import com.global.api.entities.Transaction;
import com.global.api.entities.User;
import com.global.api.entities.enums.TransactionModifier;
import com.global.api.entities.enums.TransactionType;
import com.global.api.entities.enums.UserType;
import com.global.api.entities.payFac.UserReference;
import com.global.api.terminals.abstractions.IDisposable;
import lombok.var;

public class PayFacService implements IDisposable {

    public PayFacBuilder createMerchant() {
        return
                new PayFacBuilder(TransactionType.Create)
                        .withModifier(TransactionModifier.Merchant);
    }

    public PayFacBuilder getMerchantInfo(String merchantId) {
        var userReference = new UserReference();
        userReference.setUserId(merchantId);
        userReference.setUserType(UserType.MERCHANT);

        return
                new PayFacBuilder(TransactionType.Fetch)
                        .withModifier(TransactionModifier.Merchant)
                        .withUserReference(userReference);
    }

    public PayFacBuilder createAccount() {
        return new PayFacBuilder<>(TransactionType.CreateAccount);
    }

    public PayFacBuilder editAccount() {
        return new PayFacBuilder<>(TransactionType.EditAccount);
    }

    @Override
    public void dispose() {
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy