//
// JGotoWS.h
// IvyMedia
//
// Created by paul on 8/26/14.
//
//

#import <Foundation/Foundation.h>
#import <RestKit/RestKit.h>
#import "Vendor.h"
#import "Resource.h"
@class AppInfoResponse;

// @interface RKPropertyMapping (Item)
// @property (nonatomic, strong) NSString *itemName;
// @end

@interface LoginResponseBody : NSObject
+ (RKObjectMapping *)objectMappingForClass:(Class)class;
@end

@interface JGotoWS : NSObject <Resource>

@property (nonatomic, strong)NSString *apiUid;
@property (nonatomic, strong) NSString *apiPassword;
@property (nonatomic, assign) NSInteger apiVersion;
@property (nonatomic, assign) NSInteger domainId;
@property (nonatomic, strong) NSString *cookie_string;

- (NSString *)innerXML;

@end

@interface JGotoWSResponse : NSObject
@property (nonatomic, strong) NSString *error;
@end

@interface Login : JGotoWS
@property (nonatomic, strong) NSString *username;
@property (nonatomic, strong) NSString *password;
@property (nonatomic, strong) NSString *device_identifier;
@end

@interface LoginResponse : JGotoWSResponse
@property (nonatomic, assign) NSInteger status;
@property (nonatomic, strong) Vendor *user;
@end

@interface DeviceInfo : NSObject
@property (nonatomic, assign) NSInteger device_type;
@property (nonatomic, strong) NSString *model_name;
@property (nonatomic, strong) NSString *system_name;
@property (nonatomic, strong) NSString *unique_identifier;

- (NSString *)innerXML;

@end

@interface AppInfo : NSObject

@property (nonatomic, strong) NSString *bundle_name;
@property (nonatomic, strong) NSString *bundle_version;

- (NSString *)innerXML;

@end

@interface LoginInfo : NSObject

@property (nonatomic, assign) BOOL auto_login;
@property (nonatomic, assign) NSInteger user_id;
@property (nonatomic, strong) NSString *uid;
@property (nonatomic, strong) NSString *password;

- (NSString *)innerXML;

@end

@interface InitApp : JGotoWS
@property (nonatomic, strong) DeviceInfo *device_info;
@property (nonatomic, strong) AppInfo *app_info;
@property (nonatomic, strong) LoginInfo *login_info;
@end

@interface InitAppResponse : JGotoWSResponse
@property (nonatomic, strong) LoginResponse *login_response;

@property (nonatomic, strong) AppInfoResponse *app_info_response;
@end

// @interface InitAppJsonMapper : NSObject
// - (NSString *)serializeWithObject:(id)object;
// @end

@interface AddRequest : JGotoWS
@property (nonatomic, strong)NSString *subject;
@property (nonatomic, strong) NSString *message;
@property (nonatomic, strong) NSString *customer_name;
@property (nonatomic, strong) NSString *customer_email;
@end

@interface AddRequestResponse : JGotoWSResponse
@property (nonatomic, assign) NSInteger status;
@end

@interface PurchaseReport : JGotoWS
@property (nonatomic, strong)NSString *start_date;
@property (nonatomic, strong) NSString *end_date;
@property (nonatomic, assign) NSInteger date_type;
@end

@interface PurchaseRecordResponse : JGotoWSResponse
@property (nonatomic, strong)NSArray *orders;
@property (nonatomic, strong) NSArray *bus_status_infos;
@property (nonatomic, strong) NSArray *products;
@property (nonatomic, strong) NSArray *vendors;
@property (nonatomic, strong) NSArray *bus_stations;
@property (nonatomic, strong) NSArray *airports;
@property (nonatomic, strong) NSArray *destinations;
@end


