"""paypalserversdk.

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
"""

# ruff: noqa: E501

class ProcessorResponseCode(object):
    """Implementation of the 'Processor Response Code' enum.

    Processor response code for the non-PayPal payment processor errors.

    Attributes:
        RESPONSE_0000: APPROVED.
        RESPONSE_00N7: CVV2_FAILURE_POSSIBLE_RETRY_WITH_CVV.
        RESPONSE_0100: REFERRAL.
        RESPONSE_0390: ACCOUNT_NOT_FOUND.
        RESPONSE_0500: DO_NOT_HONOR.
        RESPONSE_0580: UNAUTHORIZED_TRANSACTION.
        RESPONSE_0800: BAD_RESPONSE_REVERSAL_REQUIRED.
        RESPONSE_0880: CRYPTOGRAPHIC_FAILURE.
        RESPONSE_0890: UNACCEPTABLE_PIN.
        RESPONSE_0960: SYSTEM_MALFUNCTION.
        RESPONSE_0R00: CANCELLED_PAYMENT.
        RESPONSE_1000: PARTIAL_AUTHORIZATION.
        RESPONSE_10BR: ISSUER_REJECTED.
        RESPONSE_1300: INVALID_DATA_FORMAT.
        RESPONSE_1310: INVALID_AMOUNT.
        RESPONSE_1312: INVALID_TRANSACTION_CARD_ISSUER_ACQUIRER.
        RESPONSE_1317: INVALID_CAPTURE_DATE.
        RESPONSE_1320: INVALID_CURRENCY_CODE.
        RESPONSE_1330: INVALID_ACCOUNT.
        RESPONSE_1335: INVALID_ACCOUNT_RECURRING.
        RESPONSE_1340: INVALID_TERMINAL.
        RESPONSE_1350: INVALID_MERCHANT.
        RESPONSE_1352: RESTRICTED_OR_INACTIVE_ACCOUNT.
        RESPONSE_1360: BAD_PROCESSING_CODE.
        RESPONSE_1370: INVALID_MCC.
        RESPONSE_1380: INVALID_EXPIRATION.
        RESPONSE_1382: INVALID_CARD_VERIFICATION_VALUE.
        RESPONSE_1384: INVALID_LIFE_CYCLE_OF_TRANSACTION.
        RESPONSE_1390: INVALID_ORDER.
        RESPONSE_1393: TRANSACTION_CANNOT_BE_COMPLETED.
        RESPONSE_5100: GENERIC_DECLINE.
        RESPONSE_5110: CVV2_FAILURE.
        RESPONSE_5120: INSUFFICIENT_FUNDS.
        RESPONSE_5130: INVALID_PIN.
        RESPONSE_5135: DECLINED_PIN_TRY_EXCEEDED.
        RESPONSE_5140: CARD_CLOSED.
        RESPONSE_5150: PICKUP_CARD_SPECIAL_CONDITIONS. Try using another card. Do not
            retry the same card.
        RESPONSE_5160: UNAUTHORIZED_USER.
        RESPONSE_5170: AVS_FAILURE.
        RESPONSE_5180: INVALID_OR_RESTRICTED_CARD. Try using another card. Do not
            retry the same card.
        RESPONSE_5190: SOFT_AVS.
        RESPONSE_5200: DUPLICATE_TRANSACTION.
        RESPONSE_5210: INVALID_TRANSACTION.
        RESPONSE_5400: EXPIRED_CARD.
        RESPONSE_5500: INCORRECT_PIN_REENTER.
        RESPONSE_5650: DECLINED_SCA_REQUIRED.
        RESPONSE_5700: TRANSACTION_NOT_PERMITTED. Outside of scope of accepted
            business.
        RESPONSE_5710: TX_ATTEMPTS_EXCEED_LIMIT.
        RESPONSE_5800: REVERSAL_REJECTED.
        RESPONSE_5900: INVALID_ISSUE.
        RESPONSE_5910: ISSUER_NOT_AVAILABLE_NOT_RETRIABLE.
        RESPONSE_5920: ISSUER_NOT_AVAILABLE_RETRIABLE.
        RESPONSE_5930: CARD_NOT_ACTIVATED.
        RESPONSE_5950: DECLINED_DUE_TO_UPDATED_ACCOUNT. External decline as an
            updated card has been issued.
        RESPONSE_6300: ACCOUNT_NOT_ON_FILE.
        RESPONSE_7600: APPROVED_NON_CAPTURE.
        RESPONSE_7700: ERROR_3DS.
        RESPONSE_7710: AUTHENTICATION_FAILED.
        RESPONSE_7800: BIN_ERROR.
        RESPONSE_7900: PIN_ERROR.
        RESPONSE_8000: PROCESSOR_SYSTEM_ERROR.
        RESPONSE_8010: HOST_KEY_ERROR.
        RESPONSE_8020: CONFIGURATION_ERROR.
        RESPONSE_8030: UNSUPPORTED_OPERATION.
        RESPONSE_8100: FATAL_COMMUNICATION_ERROR.
        RESPONSE_8110: RETRIABLE_COMMUNICATION_ERROR.
        RESPONSE_8220: SYSTEM_UNAVAILABLE.
        RESPONSE_9100: DECLINED_PLEASE_RETRY. Retry.
        RESPONSE_9500: SUSPECTED_FRAUD. Try using another card. Do not retry the same
            card.
        RESPONSE_9510: SECURITY_VIOLATION.
        RESPONSE_9520: LOST_OR_STOLEN. Try using another card. Do not retry the same
            card.
        RESPONSE_9530: HOLD_CALL_CENTER. The merchant must call the number on the
            back of the card. POS scenario.
        RESPONSE_9540: REFUSED_CARD.
        RESPONSE_9600: UNRECOGNIZED_RESPONSE_CODE.
        RESPONSE_PCNR: CONTINGENCIES_NOT_RESOLVED.
        RESPONSE_PCVV: CVV_FAILURE.
        RESPONSE_PP06: ACCOUNT_CLOSED. A previously open account is now closed
        RESPONSE_PPRN: REATTEMPT_NOT_PERMITTED.
        RESPONSE_PPAD: BILLING_ADDRESS.
        RESPONSE_PPAB: ACCOUNT_BLOCKED_BY_ISSUER.
        RESPONSE_PPAE: AMEX_DISABLED.
        RESPONSE_PPAG: ADULT_GAMING_UNSUPPORTED.
        RESPONSE_PPAI: AMOUNT_INCOMPATIBLE.
        RESPONSE_PPAR: AUTH_RESULT.
        RESPONSE_PPAU: MCC_CODE.
        RESPONSE_PPAV: ARC_AVS.
        RESPONSE_PPAX: AMOUNT_EXCEEDED.
        RESPONSE_PPBG: BAD_GAMING.
        RESPONSE_PPC2: ARC_CVV.
        RESPONSE_PPCE: CE_REGISTRATION_INCOMPLETE.
        RESPONSE_PPCO: COUNTRY.
        RESPONSE_PPCR: CREDIT_ERROR.
        RESPONSE_PPCT: CARD_TYPE_UNSUPPORTED.
        RESPONSE_PPCU: CURRENCY_USED_INVALID.
        RESPONSE_PPD3: SECURE_ERROR_3DS.
        RESPONSE_PPDC: DCC_UNSUPPORTED.
        RESPONSE_PPDI: DINERS_REJECT.
        RESPONSE_PPDV: AUTH_MESSAGE.
        RESPONSE_PPDT: DECLINE_THRESHOLD_BREACH.
        RESPONSE_PPEF: EXPIRED_FUNDING_INSTRUMENT.
        RESPONSE_PPEL: EXCEEDS_FREQUENCY_LIMIT.
        RESPONSE_PPER: INTERNAL_SYSTEM_ERROR.
        RESPONSE_PPEX: EXPIRY_DATE.
        RESPONSE_PPFE: FUNDING_SOURCE_ALREADY_EXISTS.
        RESPONSE_PPFI: INVALID_FUNDING_INSTRUMENT.
        RESPONSE_PPFR: RESTRICTED_FUNDING_INSTRUMENT.
        RESPONSE_PPFV: FIELD_VALIDATION_FAILED.
        RESPONSE_PPGR: GAMING_REFUND_ERROR.
        RESPONSE_PPH1: H1_ERROR.
        RESPONSE_PPIF: IDEMPOTENCY_FAILURE.
        RESPONSE_PPII: INVALID_INPUT_FAILURE.
        RESPONSE_PPIM: ID_MISMATCH.
        RESPONSE_PPIT: INVALID_TRACE_ID.
        RESPONSE_PPLR: LATE_REVERSAL.
        RESPONSE_PPLS: LARGE_STATUS_CODE.
        RESPONSE_PPMB: MISSING_BUSINESS_RULE_OR_DATA.
        RESPONSE_PPMC: BLOCKED_Mastercard.
        RESPONSE_PPMD: DEPRECATED The PPMD value has been deprecated.
        RESPONSE_PPNC: NOT_SUPPORTED_NRC.
        RESPONSE_PPNL: EXCEEDS_NETWORK_FREQUENCY_LIMIT.
        RESPONSE_PPNM: NO_MID_FOUND.
        RESPONSE_PPNT: NETWORK_ERROR.
        RESPONSE_PPPH: NO_PHONE_FOR_DCC_TRANSACTION.
        RESPONSE_PPPI: INVALID_PRODUCT.
        RESPONSE_PPPM: INVALID_PAYMENT_METHOD.
        RESPONSE_PPQC: QUASI_CASH_UNSUPPORTED.
        RESPONSE_PPRE: UNSUPPORT_REFUND_ON_PENDING_BC.
        RESPONSE_PPRF: INVALID_PARENT_TRANSACTION_STATUS.
        RESPONSE_PPRR: MERCHANT_NOT_REGISTERED.
        RESPONSE_PPS0: BANKAUTH_ROW_MISMATCH.
        RESPONSE_PPS1: BANKAUTH_ROW_SETTLED.
        RESPONSE_PPS2: BANKAUTH_ROW_VOIDED.
        RESPONSE_PPS3: BANKAUTH_EXPIRED.
        RESPONSE_PPS4: CURRENCY_MISMATCH.
        RESPONSE_PPS5: CREDITCARD_MISMATCH.
        RESPONSE_PPS6: AMOUNT_MISMATCH.
        RESPONSE_PPSC: ARC_SCORE.
        RESPONSE_PPSD: STATUS_DESCRIPTION.
        RESPONSE_PPSE: AMEX_DENIED.
        RESPONSE_PPTE: VERIFICATION_TOKEN_EXPIRED.
        RESPONSE_PPTF: INVALID_TRACE_REFERENCE.
        RESPONSE_PPTI: INVALID_TRANSACTION_ID.
        RESPONSE_PPTR: VERIFICATION_TOKEN_REVOKED.
        RESPONSE_PPTT: TRANSACTION_TYPE_UNSUPPORTED.
        RESPONSE_PPTV: INVALID_VERIFICATION_TOKEN.
        RESPONSE_PPUA: USER_NOT_AUTHORIZED.
        RESPONSE_PPUC: CURRENCY_CODE_UNSUPPORTED.
        RESPONSE_PPUE: UNSUPPORT_ENTITY.
        RESPONSE_PPUI: UNSUPPORT_INSTALLMENT.
        RESPONSE_PPUP: UNSUPPORT_POS_FLAG.
        RESPONSE_PPUR: UNSUPPORTED_REVERSAL.
        RESPONSE_PPVC: VALIDATE_CURRENCY.
        RESPONSE_PPVE: VALIDATION_ERROR.
        RESPONSE_PPVT: VIRTUAL_TERMINAL_UNSUPPORTED.

    """

    RESPONSE_0000 = "0000"

    RESPONSE_00N7 = "00N7"

    RESPONSE_0100 = "0100"

    RESPONSE_0390 = "0390"

    RESPONSE_0500 = "0500"

    RESPONSE_0580 = "0580"

    RESPONSE_0800 = "0800"

    RESPONSE_0880 = "0880"

    RESPONSE_0890 = "0890"

    RESPONSE_0960 = "0960"

    RESPONSE_0R00 = "0R00"

    RESPONSE_1000 = "1000"

    RESPONSE_10BR = "10BR"

    RESPONSE_1300 = "1300"

    RESPONSE_1310 = "1310"

    RESPONSE_1312 = "1312"

    RESPONSE_1317 = "1317"

    RESPONSE_1320 = "1320"

    RESPONSE_1330 = "1330"

    RESPONSE_1335 = "1335"

    RESPONSE_1340 = "1340"

    RESPONSE_1350 = "1350"

    RESPONSE_1352 = "1352"

    RESPONSE_1360 = "1360"

    RESPONSE_1370 = "1370"

    RESPONSE_1380 = "1380"

    RESPONSE_1382 = "1382"

    RESPONSE_1384 = "1384"

    RESPONSE_1390 = "1390"

    RESPONSE_1393 = "1393"

    RESPONSE_5100 = "5100"

    RESPONSE_5110 = "5110"

    RESPONSE_5120 = "5120"

    RESPONSE_5130 = "5130"

    RESPONSE_5135 = "5135"

    RESPONSE_5140 = "5140"

    RESPONSE_5150 = "5150"

    RESPONSE_5160 = "5160"

    RESPONSE_5170 = "5170"

    RESPONSE_5180 = "5180"

    RESPONSE_5190 = "5190"

    RESPONSE_5200 = "5200"

    RESPONSE_5210 = "5210"

    RESPONSE_5400 = "5400"

    RESPONSE_5500 = "5500"

    RESPONSE_5650 = "5650"

    RESPONSE_5700 = "5700"

    RESPONSE_5710 = "5710"

    RESPONSE_5800 = "5800"

    RESPONSE_5900 = "5900"

    RESPONSE_5910 = "5910"

    RESPONSE_5920 = "5920"

    RESPONSE_5930 = "5930"

    RESPONSE_5950 = "5950"

    RESPONSE_6300 = "6300"

    RESPONSE_7600 = "7600"

    RESPONSE_7700 = "7700"

    RESPONSE_7710 = "7710"

    RESPONSE_7800 = "7800"

    RESPONSE_7900 = "7900"

    RESPONSE_8000 = "8000"

    RESPONSE_8010 = "8010"

    RESPONSE_8020 = "8020"

    RESPONSE_8030 = "8030"

    RESPONSE_8100 = "8100"

    RESPONSE_8110 = "8110"

    RESPONSE_8220 = "8220"

    RESPONSE_9100 = "9100"

    RESPONSE_9500 = "9500"

    RESPONSE_9510 = "9510"

    RESPONSE_9520 = "9520"

    RESPONSE_9530 = "9530"

    RESPONSE_9540 = "9540"

    RESPONSE_9600 = "9600"

    RESPONSE_PCNR = "PCNR"

    RESPONSE_PCVV = "PCVV"

    RESPONSE_PP06 = "PP06"

    RESPONSE_PPRN = "PPRN"

    RESPONSE_PPAD = "PPAD"

    RESPONSE_PPAB = "PPAB"

    RESPONSE_PPAE = "PPAE"

    RESPONSE_PPAG = "PPAG"

    RESPONSE_PPAI = "PPAI"

    RESPONSE_PPAR = "PPAR"

    RESPONSE_PPAU = "PPAU"

    RESPONSE_PPAV = "PPAV"

    RESPONSE_PPAX = "PPAX"

    RESPONSE_PPBG = "PPBG"

    RESPONSE_PPC2 = "PPC2"

    RESPONSE_PPCE = "PPCE"

    RESPONSE_PPCO = "PPCO"

    RESPONSE_PPCR = "PPCR"

    RESPONSE_PPCT = "PPCT"

    RESPONSE_PPCU = "PPCU"

    RESPONSE_PPD3 = "PPD3"

    RESPONSE_PPDC = "PPDC"

    RESPONSE_PPDI = "PPDI"

    RESPONSE_PPDV = "PPDV"

    RESPONSE_PPDT = "PPDT"

    RESPONSE_PPEF = "PPEF"

    RESPONSE_PPEL = "PPEL"

    RESPONSE_PPER = "PPER"

    RESPONSE_PPEX = "PPEX"

    RESPONSE_PPFE = "PPFE"

    RESPONSE_PPFI = "PPFI"

    RESPONSE_PPFR = "PPFR"

    RESPONSE_PPFV = "PPFV"

    RESPONSE_PPGR = "PPGR"

    RESPONSE_PPH1 = "PPH1"

    RESPONSE_PPIF = "PPIF"

    RESPONSE_PPII = "PPII"

    RESPONSE_PPIM = "PPIM"

    RESPONSE_PPIT = "PPIT"

    RESPONSE_PPLR = "PPLR"

    RESPONSE_PPLS = "PPLS"

    RESPONSE_PPMB = "PPMB"

    RESPONSE_PPMC = "PPMC"

    RESPONSE_PPMD = "PPMD"

    RESPONSE_PPNC = "PPNC"

    RESPONSE_PPNL = "PPNL"

    RESPONSE_PPNM = "PPNM"

    RESPONSE_PPNT = "PPNT"

    RESPONSE_PPPH = "PPPH"

    RESPONSE_PPPI = "PPPI"

    RESPONSE_PPPM = "PPPM"

    RESPONSE_PPQC = "PPQC"

    RESPONSE_PPRE = "PPRE"

    RESPONSE_PPRF = "PPRF"

    RESPONSE_PPRR = "PPRR"

    RESPONSE_PPS0 = "PPS0"

    RESPONSE_PPS1 = "PPS1"

    RESPONSE_PPS2 = "PPS2"

    RESPONSE_PPS3 = "PPS3"

    RESPONSE_PPS4 = "PPS4"

    RESPONSE_PPS5 = "PPS5"

    RESPONSE_PPS6 = "PPS6"

    RESPONSE_PPSC = "PPSC"

    RESPONSE_PPSD = "PPSD"

    RESPONSE_PPSE = "PPSE"

    RESPONSE_PPTE = "PPTE"

    RESPONSE_PPTF = "PPTF"

    RESPONSE_PPTI = "PPTI"

    RESPONSE_PPTR = "PPTR"

    RESPONSE_PPTT = "PPTT"

    RESPONSE_PPTV = "PPTV"

    RESPONSE_PPUA = "PPUA"

    RESPONSE_PPUC = "PPUC"

    RESPONSE_PPUE = "PPUE"

    RESPONSE_PPUI = "PPUI"

    RESPONSE_PPUP = "PPUP"

    RESPONSE_PPUR = "PPUR"

    RESPONSE_PPVC = "PPVC"

    RESPONSE_PPVE = "PPVE"

    RESPONSE_PPVT = "PPVT"

    @classmethod
    def from_value(cls, value, default=None):
        """Return the matching enum value for the given input."""
        if value is None:
            return default

        # If numeric and matches directly
        if isinstance(value, int):
            for name, val in cls.__dict__.items():
                if not name.startswith("_") and val == value:
                    return val

        # If string, perform case-insensitive match
        if isinstance(value, str):
            value_lower = value.lower()
            for name, val in cls.__dict__.items():
                if not name.startswith("_") and (
                    name.lower() == value_lower or str(val).lower() == value_lower
                ):
                    return val

        # Fallback to default
        return default
