WLInboxItem.h
5.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
Copyright 2010-2016 Warply Inc. All rights reserved.
Redistribution and use in source and binary forms, without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binaryform must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*!
@header WLInboxItem.h
The WLInboxItem object is used to model the information related to the offer for
which the Remote Notification (Push) was sent.
@copyright Warply Inc.
*/
#import <Foundation/Foundation.h>
#import "WLBaseItem.h"
#import <CoreLocation/CoreLocation.h>
/*!
@class WLInboxItem
@discussion This object contains the information related to the offer for
which the Remote Notification (Push) was sent, such as: offer title and subtitle,
offer message, offer category, expiration date etc.
*/
@interface WLInboxItem : WLBaseItem
/*!
@property title
@abstract An string object with the offer title.
*/
@property (nonatomic, copy) NSString *title;
/*!
@property subtitle
@abstract An string object with the offer subtitle.
*/
@property (nonatomic, copy) NSString *subtitle;
/*!
@property offer_message
@abstract An string object with the offer message.
*/
@property (nonatomic, copy) NSString *offer_message;
/*!
@property offer_category
@abstract An string object with the offer category.
*/
@property (nonatomic, copy) NSString *offer_category;
/*!
@property expires
@abstract An integer object with the offer expiration date (epoch format).
*/
@property(nonatomic) NSInteger expires;
/*!
@property starts
@abstract An integer object with the offer starting date (epoch format).
*/
@property(nonatomic) NSInteger starts;
/*!
@property delivered
@abstract An integer with the time / date the offer was delivered (epoch format).
*/
@property (nonatomic) NSInteger delivered;
@property (nonatomic) NSString *extra_fields;
/*!
@property opened
@abstract An integer counting the times this offer has been opened.
*/
@property (nonatomic) NSInteger opened;
/*!
@property sorting
@abstract An NSNumber wrapping an int indicating the suggested order of the offers from the server in descending order.
*/
@property (nonatomic) NSInteger sorting;
/*!
@property is_new
@abstract A a BOOL indicating whether the item is new (it is the first time it is being presented in the inbox of the user
*/
@property (nonatomic) BOOL is_new;
/*!
@property location
@abstract This property is a CLLocation object if the inbox item is connected to a geofencing poi and nil otherwise
*/
@property (nonatomic) CLLocation *location;
/*!
@property distance
@abstract The distance from the location the getInboxItemsNearLocation:withSuccessBlock:failureBlock: call uses as a parameter or from the users current location if the getInboxItemsNearMeWithSuccessBlock:failureBlock: was used to retrieve the inbox items.
*/
@property (nonatomic) CLLocationDistance distance;
/*!
@property radius
@abstract The radius of the corresponding geofence.
@discussion If the inbox item is linked to a geofencing campaign, and the users location is inside this radius, they will get a push notification.
*/
@property (nonatomic) CLLocationDistance radius;
/*!
@property name
@abstract The alias of the item in case it is linked to a location (location != nil).
@see //apple_ref/occ/instp/WLInboxItem/location location
*/
@property (nonatomic) NSString *name;
/**
* @property display_type
@abstract This property defines the type of the native ad.
@discussion It can be full_page, half_page, list or feed.
*/
@property (nonatomic) NSString *display_type;
/*!
@property campaign_type
@abstract This property defines the type of the campaign.
@discussion It can be standard-offer, beacon, etc.
*/
@property (nonatomic) NSString *campaign_type;
/*!
@methodgroup Initializing a WLInboxItem Object
*/
/*!
@abstract Initialise a WLInboxItem Object.
@discussion Initializes and returns a newly allocated WLInboxItem object with
the specified WLBaseItem object.
@param baseItem A WLBaseItem object.
@return Returns WLInboxItem object.
@see //apple_ref/occ/cl/WLBaseItem WLBaseItem
*/
- (id)initWithItem:(WLBaseItem *)baseItem;
@end