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

com.global.api.entities.enums.TransactionModifier Maven / Gradle / Ivy

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

import java.util.EnumSet;
import java.util.Set;

public enum TransactionModifier implements IFlag {
    None,
    Incremental,
    Additional,
    Offline,
    LevelII,
    FraudDecline,
    ChipDecline,
    CashBack,
    Voucher,
    Secure3D,
    HostedRequest,
    Recurring,
    EncryptedMobile,
    Fallback,
    Level_III,
    DecryptedMobile,
    AlternativePaymentMethod,
    OfflineDecline,
    DeletePreAuth,
    BankPayment,
    BuyNowPayLater,
    Merchant;

    public long getLongValue() {
        return 1 << this.ordinal();
    }
    public static Set getSet(long value) {
        EnumSet flags = EnumSet.noneOf(TransactionModifier.class);
        for(TransactionModifier flag : TransactionModifier.values()) {
            long flagValue = flag.getLongValue();
            if((flagValue & value) == flagValue)
                flags.add(flag);
        }
        return flags;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy