25 #import <Foundation/Foundation.h>
26 #import <ActiveModelKit/ActiveModelKit.h>
40 @interface ARResource : NSObject<AMAttributeMethods, NSCopying>
54 - (id)initWithService:(
ARService *)service;
56 - (id)initWithService:(
ARService *)service attributes:(NSDictionary *)attributes;
58 - (id)initWithService:(
ARService *)service attributes:(NSDictionary *)attributes persisted:(BOOL)persisted;
77 @property(strong, NS_NONATOMIC_IOSONLY)
ARService *service;
92 @property(copy, NS_NONATOMIC_IOSONLY) NSDictionary *
attributes;
102 - (void)mergeAttributes:(NSDictionary *)attributes;
116 - (void)loadAttributes:(NSDictionary *)attributes removeRoot:(BOOL)removeRoot;
159 - (void)setID:(NSNumber *)ID;
163 - (void)saveWithCompletionHandler:(
void (^)(
ARHTTPResponse *response, NSError *error))completionHandler;
165 - (void)destroyWithCompletionHandler:(
void (^)(
ARHTTPResponse *response, NSError *error))completionHandler;
167 - (void)existsWithCompletionHandler:(
void (^)(
ARHTTPResponse *response, BOOL exists, NSError *error))completionHandler;