Project

General

Profile

Specification » History » Version 7

Soh Keong, 01/06/2022 11:36 AM

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