OPPPaymentBrandsConfig

@objc
public final class OPPPaymentBrandsConfig : NSObject

Class to encapsulate the payment brand configuration parameters from the Server.

  • A flag that specifies whether payment brands from the Server are enabled or not.

    Declaration

    Swift

    @objc
    public private(set) var isEnabled: Bool { get }
  • Payment brand list from the Server.

    Declaration

    Swift

    @objc
    public private(set) var paymentBrands: [String] { get }
  • A flag that specifies whether override checkout payment brands with brands from the Server or not.

    Declaration

    Swift

    @objc
    public private(set) var shouldOverride: Bool { get }
  • Creates an OPPPaymentBrandsConfig object with the provided values.

    Declaration

    Swift

    @objc
    public init(paymentBrands: [String], enabled: Bool, shouldOverride: Bool)

    Parameters

    paymentBrands

    List of payment brands from the Server.

    enabled

    A flag that specifies whether payment brands from the Server are enabled or not.

    shouldOverride

    A flag that specifies whether override checkout payment brands with brands from the Server or not.

    Return Value

    Returns an OPPPaymentBrandsConfig object.

  • Creates OPPPaymentBrandsConfig object from the JSON that can be received from the Server by checkout ID.

    Declaration

    Swift

    @objc
    public convenience init?(fromJSON JSON: [AnyHashable : Any])

    Parameters

    JSON

    A dictionary with parameters received from the Server.

    Return Value

    Returns an OPPPaymentBrandsConfig object, or nil if JSON contains invalid values.

  • Creates OPPPaymentBrandsConfig object from the JSON that can be received from the Server by checkout ID.

    Declaration

    Swift

    @objc
    public static func paymentBrandsConfigFromJSON(_ JSON: [AnyHashable : Any]) -> `Self`?

    Parameters

    JSON

    A dictionary with parameters received from the Server.

    Return Value

    Returns an OPPPaymentBrandsConfig object, or nil if JSON contains invalid values.

  • Creates an OPPPaymentBrandsConfig object with the provided values.

    Declaration

    Swift

    @objc
    public static func paymentBrandsConfigWithPaymentBrands(_ paymentBrands: [String], enabled: Bool, shouldOverride: Bool) -> Self

    Parameters

    paymentBrands

    List of payment brands from the Server.

    enabled

    A flag that specifies whether payment brands from the Server are enabled or not.

    shouldOverride

    A flag that specifies whether override checkout payment brands with brands from the Server or not.

    Return Value

    Returns an OPPPaymentBrandsConfig object.