PaymentMethodTypeMapper

@objc(DTPaymentMethodTypeMapper)
public class PaymentMethodTypeMapper : NSObject

Provides Objective-C–compatible access to DTPaymentMethodType conversions.

Swift users should use PaymentMethodType.fromIdentifier(identifier:) and the identifier property directly.

  • Returns the DTPaymentMethodType raw value for a given 3-letter payment method identifier.

    Declaration

    Swift

    @objc
    public static func toType(identifier: String) -> NSNumber?

    Parameters

    identifier

    The 3-letter payment method identifier string

    Return Value

    An NSNumber wrapping the matching DTPaymentMethodType raw value, or nil if the identifier is not recognized.

  • Returns the 3-letter payment method identifier based on the DTPaymentMethodType.

    Declaration

    Swift

    @objc
    public static func toIdentifier(type: PaymentMethodType) -> String

    Parameters

    type

    The payment method type, e.g. DTPaymentMethodTypeVisa

    Return Value

    The 3-letter payment method identifier