com.global.api.entities.enums.TransactionModifier 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.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;
}
}