"""cellpointapi.

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

# ruff: noqa: E501

class OauthScopeCpdIssuedJwt(object):
    """Implementation of the 'OAuth ScopeCpdIssuedJwt' enum.

    OAuth 2 scopes supported by the API

    Attributes:
        BUYER: Pay for a created order
        DASHBOARDSVIEW: View dashboards in MSS
        DOCUMENT-PROXY: Transmit card data to third parties
        NOTESWRITE: Able to create notes on orders and transactions
        NOTESREAD: Able to read notes on orders and transactions
        ORDERSDOWNLOAD: Download order data
        ORDERSREAD: Read order details
        ORDERSWRITE: Create,modify, or cancel an order
        ORDERSRETRY_FRAUD: Able to retry a transaction in the fraud review queue
        PAYMENTSBULK: Able to do bulk action on payment transaction
        PAYMENTSCANCEL: Able to do cancel action on a payment transaction
        PAYMENTSCAPTURE: Able to do capture action on a payment transaction
        PAYMENTSCAPTURE_EDIT: Able to edit capture amount in MSS
        PAYMENTSDOWNLOAD: Able to download payment transaction data
        PAYMENTSWRITE: Create a payment transaction for automatic processing
        PAYMENTSCLOSE: Able to close a payment transaction
        PAYMENTSCAPTURE_RECONCILE: Able to view and perform reconcile action on
            capture transactions in the reconciliation queue
        QUEUESEXTERNAL_CANCEL_FAILURE: Able to view external cancel failure
            transactions
        QUEUESEXTERNAL_CAPTURE_FAILURE: Able to view external capture failure
            transactions
        QUEUESEXTERNAL_REFUND_FAILURE: Able to view external refund failure
            transactions
        QUEUESHIGH_VALUE_AUTHORIZED: Able to view high value authorization transaction
        QUEUESINTERNAL_CANCEL_FAILURE: Able to view internal cancel failure
            transactions
        QUEUESINTERNAL_CAPTURE_FAILURE: Able to view internal capture failure
            transactions
        QUEUESINTERNAL_REFUND_FAILURE: Able to view internal refund failure
            transactions
        QUEUESRECONCILIATION_FAILURE: Able to view reconciliation message failure
            transaction
        REFUNDSBULK: Able to perform bulk actions on refund transaction
        REFUNDSDOWNLOAD: Able to download refund data
        REFUNDSREFUND: Able to do manual refund action on a refund transaction
        REFUNDSWRITE: Able to create and edit refunds
        REFUNDSCLOSE: Able to close a refund transaction
        REFUNDSREFUND_RECONCILE: Able to view and perform reconcile action on refund
            transactions in the reconciliation queue
        REVIEW_POOLPOSTAUTH_FRAUD_RETRY: Able to view transactions in the post-auth
            fraud retry review pool

    """

    BUYER = "buyer"

    DASHBOARDSVIEW = "dashboards:view"

    DOCUMENT_PROXY = "document-proxy"

    NOTESWRITE = "notes:write"

    NOTESREAD = "notes:read"

    ORDERSDOWNLOAD = "orders:download"

    ORDERSREAD = "orders:read"

    ORDERSWRITE = "orders:write"

    ORDERSRETRY_FRAUD = "orders:retry_fraud"

    PAYMENTSBULK = "payments:bulk"

    PAYMENTSCANCEL = "payments:cancel"

    PAYMENTSCAPTURE = "payments:capture"

    PAYMENTSCAPTURE_EDIT = "payments:capture_edit"

    PAYMENTSDOWNLOAD = "payments:download"

    PAYMENTSWRITE = "payments:write"

    PAYMENTSCLOSE = "payments:close"

    PAYMENTSCAPTURE_RECONCILE = "payments:capture_reconcile"

    QUEUESEXTERNAL_CANCEL_FAILURE = "queues:external_cancel_failure"

    QUEUESEXTERNAL_CAPTURE_FAILURE = "queues:external_capture_failure"

    QUEUESEXTERNAL_REFUND_FAILURE = "queues:external_refund_failure"

    QUEUESHIGH_VALUE_AUTHORIZED = "queues:high_value_authorized"

    QUEUESINTERNAL_CANCEL_FAILURE = "queues:internal_cancel_failure"

    QUEUESINTERNAL_CAPTURE_FAILURE = "queues:internal_capture_failure"

    QUEUESINTERNAL_REFUND_FAILURE = "queues:internal_refund_failure"

    QUEUESRECONCILIATION_FAILURE = "queues:reconciliation_failure"

    REFUNDSBULK = "refunds:bulk"

    REFUNDSDOWNLOAD = "refunds:download"

    REFUNDSREFUND = "refunds:refund"

    REFUNDSWRITE = "refunds:write"

    REFUNDSCLOSE = "refunds:close"

    REFUNDSREFUND_RECONCILE = "refunds:refund_reconcile"

    REVIEW_POOLPOSTAUTH_FRAUD_RETRY = "review_pool:postauth_fraud_retry"

    @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
