NSError(Stripe)

@interface NSError (Stripe)

NSError extensions for creating error objects from Stripe API responses.

  • Creates an NSError object from a given Stripe API json response.

    Declaration

    Objective-C

    + (nullable NSError *)stp_errorFromStripeResponse:
        (nullable NSDictionary *)jsonDictionary;

    Swift

    class func stp_error(fromStripeResponse jsonDictionary: [AnyHashable : Any]?) -> Error?

    Parameters

    jsonDictionary

    The root dictionary from the JSON response.

    Return Value

    An NSError object with the error information from the JSON response, or nil if there was no error information included in the JSON dictionary.