OPPPaymentBrandsConfig

@interface 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

    Objective-C

    @property (nonatomic, readonly, getter=isEnabled) BOOL enabled;

    Swift

    var isEnabled: Bool { get }
  • Payment brand list from the Server.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<NSString *> *_Nonnull paymentBrands;

    Swift

    var paymentBrands: [String] { get }
  • A flag that specifies whether override checkout payment brands with brands from the Server or not.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL shouldOverride;

    Swift

    var shouldOverride: Bool { get }
  • Creates OPPPaymentBrandsConfig object from the JSON that can be received from the Server by checkout ID.

    Declaration

    Objective-C

    + (nullable instancetype)paymentBrandsConfigFromJSON:
        (nonnull NSDictionary *)JSON;

    Swift

    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 an OPPPaymentBrandsConfig object with the provided values.

    Declaration

    Objective-C

    + (nonnull instancetype)paymentBrandsConfigWithPaymentBrands:
                                (nonnull NSArray<NSString *> *)paymentBrands
                                                         enabled:(BOOL)enabled
                                                  shouldOverride:
                                                      (BOOL)shouldOverride;

    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.

  • Creates an OPPPaymentBrandsConfig object with the provided values.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPaymentBrands:
                                (nonnull NSArray<NSString *> *)paymentBrands
                                          enabled:(BOOL)enabled
                                   shouldOverride:(BOOL)shouldOverride;

    Swift

    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.