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