Project

General

Profile

Specification » History » Version 2

Soh Keong, 10/27/2020 05:17 PM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Programming Guide
6
7
h3. Jar version 
8
9
|_. version |_. Description  |
10
| 2.2       | Init           |
11
12
h3. Jar File Download
13
14
"Jar":/redmine/attachments/download/492/VoucherService-1.5.jar
15
"Properties":/redmine/attachments/download/493/service.properties
16
17
h3. properties file
18
19
* *service.properties*
20
21
# *json.url*                - Dotnet team URL
22
# *json.key*                - provided by json
23
# *connection.timeout*      - set connection timeout
24
# *connection.read.timeout* - set connection read timeout
25
26
h2. Methods
27
28
h3. Common Instance
29
30
<pre>
31
com.cosway.voucher.service.VoucherService service = new com.cosway.voucher.service.VoucherService();
32
</pre>
33
34
h3. getRandomByType
35
36
<pre>
37
com.cosway.voucher.bean.response.VoucherRandomResponseBean resultBean = service.getRandomByType(VoucherRandomByType voucherBean)
38
</pre>
39
40
* *com.cosway.voucher.bean.request.VoucherRandomByType*
41
> * *quantity*    - Int
42
> * *voucherType* - String
43
44
* *com.cosway.voucher.bean.response.VoucherRandomResponseBean*
45
> * *errorCode*    - String
46
> * *errorMsg*     - String
47
> * *totalRecords* - Int
48
> * *voucherList*  - List<VoucherBean>
49
>> * *voucherCode*   - String
50
51
h3. checkVoucher / getVoucherByMemberId
52
53
<pre>
54
com.cosway.voucher.bean.response.VoucherCheckResponseBean resultBean = service.checkVoucher(VoucherCheckBean bean)
55
com.cosway.voucher.bean.response.VoucherCheckResponseBean resultBean = service.getVoucherByMemberId(VoucherByMemberId bean)
56
</pre>
57
58
* *com.cosway.voucher.bean.request.VoucherCheckBean*
59
> * *memberId* - String
60
> * *voucherList*  - List<VoucherBean>
61
>> * *voucherCode*   - String
62
63
* *com.cosway.voucher.bean.request.VoucherByMemberId*
64
> * *memberId* - String
65
66
* *com.cosway.voucher.bean.response.VoucherCheckResponseBean*
67
> * *errorCode*    - String
68
> * *errorMsg*     - String
69
> * *totalRecords* - Int
70
> * *voucherList*  - List<VoucherDetailBean>
71
>> * *errorCode*      - String
72
>> * *errorMsg*       - String
73
>> * *voucherCode*    - String
74
>> * *memberId*       - String
75
>> * *startDate*      - Date
76
>> * *expiryDate*     - Date
77
>> * *amount*         - double
78
>> * *lock*           - boolean
79
>> * *bookingStatus*  - String
80
>> * *promoCode*      - String
81
82
h3. addVoucher / cancelVoucher / utilizeVoucher / lockVoucher / unlockVoucher
83
84
<pre>
85 2 Soh Keong
com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.addVoucher(VoucherAddBean bean) 
86
com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.cancelVoucher(VoucherTransactionBean bean)
87
com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.utilizeVoucher(VoucherTransactionBean bean) 
88
com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.lockVoucher(VoucherTransactionBean bean)
89
com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.unlockVoucher(VoucherTransactionBean bean) 
90 1 Soh Keong
</pre>
91 2 Soh Keong
92
* *com.cosway.voucher.bean.request.VoucherAddBean*
93
> * *noBook* - com.cosway.voucher.constant.CommonConstant.NO_BOOK_YES
94
> REFER com.cosway.voucher.bean.request.VoucherTransactionBean
95
96
* *com.cosway.voucher.bean.request.VoucherTransactionBean*
97
> * *orderId*     - String 
98
> * *countryId*   - String
99
> * *orderDate*   - Date
100
> * *trxId*       - String 
101
> * *voucherList* - List<VoucherBean>
102
> * *voucherCode*   - String (for ALL)
103
> * *startDate*     - Date (for Add, Lock & Unlock)
104
> * *expiryDate*    - Date (for Add, Lock & Unlock)
105
> * *amount*        - Double (for Add, Lock & Unlock)
106
> * *voucherType*   - String (for Add Only)
107
> * *promoCode*     - String (for Add Only)
108
109
* *com.cosway.voucher.bean.response.VoucherTransactionResponseBean*
110
> * *errorCode*    - String
111
> * *errorMsg*     - String