A set of data objects utilized by the Mobiliser Smartphone application.
1 /**
2 * @overview
3 * A set of data objects utilized by the Mobiliser Smartphone application.
4 *
5 * @name SY_OB_Data_Objects.js
6 * @author SAP AG
7 * @version 1.0
8 *
9 */
10
11
12 /**
13 @class Setting is a connection configurations class to connect to the back-end server.
14 @constructor
15 @param protocol String representing the protocol type. Either "http://" or "https://".
16 @param ipaddress The IP address of the money mobiliser server
17 @param port The port number of the money mobiliser server
18 @param wsname The name of the WS_Core web service;
19 */
20 function Setting() {
21 this.protocol = 'http://';
22 this.ipaddress = '216.207.70.199';//'192.168.2.4';//'10.99.29.110';//'192.168.2.4';//'10.91.28.89';//'10.99.28.89';//'202.45.6.122';//'10.0.2.2';//'216.207.70.198';
23 this.port = '8080';//'80';
24 this.wsname = 'mobiliser/rest/spmmbanking';
25 this.spmws = 'mobiliser/rest/smartphone';
26 this.origin = "MAPP";
27 this.appinfo = {};
28 this.appinfo.device = '';
29 this.appinfo.deviceId = '';
30 this.appinfo.otherDeviceId = '';
31 this.appinfo.application = "MAPP"; // TODO: change app name and add version number (svn revision ? build number ?)
32 // Currently, appid used for AuditData expects "MAPP", otherwise user cannot login.
33 this.appinfo.applicationVersion = "5.1.3";
34 }
35
36 /**
37 * @class OrgUnits which contains the available org units for which customer can
38 * log into the app.
39 * @param id
40 * @param name
41 * @param currency
42 */
43 function OrgUnit() {
44 this.id = '';
45 this.name = '';
46 this.currency = '';
47 }
48
49 /**
50 * @class This stores authentication object which is needed for further
51 * authentication
52 */
53 function Authentication() {
54 this.token = '';
55 }
56
57 /**
58 @class Contains basic information about the customer.
59
60 @constructor
61
62 @param customerId
63 @param {string} msisdn The msisdn of the customer
64 @param blacklist An id for blacklistreason to indicate customer account status.
65 @param test test state of customer account.
66 @param typeId The id of customerType
67 @param cancelId The id of cancellationReason of customer account
68 @param modeId The id of mode of txn receipt mode of customer account
69 */
70 function Customer() {
71 this.customerId = '';
72 this.orgUnitId = '';
73 this.blacklist = '';
74 this.active = '';
75 this.test = '';
76 this.displayName = '';
77 this.language = '';
78 this.timezone = '';
79 this.typeId = '';
80 this.cancelId = '';
81 this.modeId = '';
82 }
83
84
85
86 /**
87 * @class This class stores information about specific accounts
88 * @param accountIdentification
89 * @param institutionCode
90 * @param type
91 * @param accountStatus
92 * @param linkedAccount
93 * @param branchCode
94 * @param countryCode
95 * @param currencyCode
96 * @param accountHolder
97 * @param alias
98 * @param balance
99 * @param outstandingAmount
100 * @param minimumAmount
101 * @param statementAmount
102 * @param paymentInstrumentId
103 * @param accountFamily Legal values CA, CASA, OTHERS, CREATECARD, DB
104 * @param code
105 * @param categoryDescription
106 */
107 function Account() {
108 this.accountIdentification = '';
109 this.institutionCode = '';
110 this.type = '';
111 this.accountStatus = '';
112 this.paymentInstrumentId = '';
113 this.linkedAccount = '';
114 this.branchCode = '';
115 this.countryCode = '';
116 this.currencyCode = '';
117 this.accountHolder = '';
118 this.alias = '';
119 this.balance = '';
120 this.availableFunds = '';
121 this.outstandingAmount = '';
122 this.minimumAmount = '';
123 this.statementAmount = '';
124 }
125
126 /**
127 @class LoginSession This is the session class which stores all of the user's data throughtout a login session.
128
129 @constructor
130 @param customerId The customer id
131 @param password The password of the customer
132 @param sessionId The session id as returned by the server
133 @param customerId The id of the customer
134 @param displayName The display name of the customer
135 @param msisdn The phone number of the customer
136 @param transaction Is an array of tranasctions
137 @param contactNumber Is an array of contacts from the address book of the user's smartphone
138 @param invoiceNo The current invoice number the user is selecting to pay for
139 @param registeredbill A list of all registered bills for the user
140 @param openbill
141 @param openBillArray A list of all open and due bills for the user
142 @param accounts A list of accounts registered by the user
143 @param totalaccounts total number of accounts registered by the user
144 @param customer A list of accounts registered by the user
145 @param svaalert A list of accounts registered by the user
146 */
147 function LoginSession() {
148 /*Open Bank API data*/
149 this.customerId = '';
150 this.userId = '';
151 this.userMsisdn = '';
152 this.bankId = '';
153 this.customerSupportNo = '';
154 this.idNumber = '';
155 this.idType = '';
156 this.authentication = new Authentication();
157 this.accountList = [];
158 this.customer = new Customer();
159 this.totalfavourites = '';
160 this.favourites = [];
161 this.txns = [];
162 this.denominations = [];
163 }
164
165 /**
166 * @class Amount
167 * @param value
168 * @param currency
169 */
170 function Amount() {
171 this.value = '';
172 this.currency = '';
173 }
174
175 /**
176 * @class Transaction class
177 * @param id
178 * @param debitCredit debit or credit
179 */
180 function Transaction() {
181 this.id = '';
182 this.debitCredit = '';
183 this.amount = new Amount();
184 this.date = '';
185 this.postingDate = '';
186 this.account = new Account();
187 this.balance = new Amount();
188 this.chequeNumber = '';
189 this.text1 = '';
190 this.text2 = '';
191 this.text3 = '';
192 this.text4 = '';
193 }
194 /**
195 * @class This class stores information about favourites
196 * @param favId
197 * @param favType
198 * @param alias
199 * @param details
200 */
201 function Favourites(){
202 this.favId = '';
203 this.favType = '';
204 this.alias = '';
205 this.accountHolder = '';
206 this.accountIdentification ='';
207 this.paymentType = '';
208 this.paymentInstrumentId = '';
209 this.to_account_type = '';
210 this.billerName = '';
211 this.billerCode = '';
212 }
213
214 /**
215 @class Timer
216
217 @constructor
218 */
219 function Timer() {
220 this.handle = '';
221 this.on_flag = 0;
222 }
223
224
225 /**
226 * @class This class stores information about denominations
227 * @param Id
228 * @param value
229 */
230 function Denomination(){
231 this.id = '';
232 this.amount = new Amount();
233 this.description = '';
234 this.code = '';
235 this.subcode = '';
236 }