AIQApiResponseDecodable
@protocol AIQApiResponseDecodable <NSObject>
Objects conforming to AIQAPIResponseDecodable can be automatically converted from a JSON dictionary that was returned from the AIQ API.
-
Parses response from AIQ API (in JSON format; represented as an
NSDictionary
) into an instance of the class.Declaration
Objective-C
+ (nullable instancetype)decodedObjectFromAPIResponse: (nullable NSDictionary *)response;
Swift
static func decodedObject(fromAPIResponse response: [AnyHashable : Any]?) -> Self?
Parameters
response
- dictionary that represents the JSON object of this type
Return Value
The object represented by the JSON dictionary or nil if the object is not decodeable
-
The raw JSON response used to create the object. This can be useful for accessing fields that haven’t yet been made into native properties in the SDK.
Declaration
Objective-C
@property (readonly, copy, nonatomic, nonnull) NSDictionary *allResponseFields;
Swift
var allResponseFields: [AnyHashable : Any] { get }