Specification » History » Version 10
Soh Keong, 08/20/2021 10:44 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 | | 1.0 | Init | |
||
11 | |||
12 | h3. Jar File Download |
||
13 | |||
14 | 10 | Soh Keong | "Jar":/redmine/attachments/download/607/TWVoucherService-1.1.jar |
15 | 5 | Soh Keong | "Properties":/redmine/attachments/download/604/service.properties |
16 | "Library":/redmine/attachments/download/605/lib.rar |
||
17 | 1 | Soh Keong | |
18 | h3. properties file |
||
19 | |||
20 | * *service.properties* |
||
21 | |||
22 | # *json.url* - Dotnet team URL |
||
23 | 2 | Soh Keong | # *json.key* - provided by Dotnet |
24 | # *aes.key* - provided by Dotnet |
||
25 | 1 | Soh Keong | # *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.vouchertw.service.VoucherService service = new com.vouchertw.service.VoucherService(); |
||
34 | </pre> |
||
35 | |||
36 | |||
37 | h3. addVoucher |
||
38 | |||
39 | <pre> |
||
40 | com.vouchertw.bean.ResponseBean result = service.addVoucher(VoucherTransactionBean bean); |
||
41 | </pre> |
||
42 | |||
43 | * *com.vouchertw.bean.VoucherTransactionBean* |
||
44 | 6 | Soh Keong | > * *stockistId* - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE |
45 | 1 | Soh Keong | > * *memberId* - String |
46 | > * *countryId* - String |
||
47 | > * *orderId* - String |
||
48 | > * *orderDate* - java.time.LocalDate |
||
49 | > * *voucherSet* - Set<VoucherBean> |
||
50 | >> * *voucherCode* - String |
||
51 | >> * *startDate* - java.time.LocalDate |
||
52 | >> * *expiryDate* - java.time.LocalDate |
||
53 | >> * *amount* - double |
||
54 | >> * *point* - int |
||
55 | >> * *voucherName* - String |
||
56 | >> * *promoCode* - String |
||
57 | 9 | Soh Keong | >> * *pin* - String |
58 | 1 | Soh Keong | >> * *token* - System auto assign |
59 | 2 | Soh Keong | |
60 | * *com.vouchertw.bean.ResponseBean* |
||
61 | > * *errorCode* - String |
||
62 | > * *errorMsg* - String |
||
63 | |||
64 | h3. getVoucherByMember |
||
65 | |||
66 | <pre> |
||
67 | com.vouchertw.bean.MemberResponseBean result = service.getVoucherByMember(MemberRequestBeanbean); |
||
68 | </pre> |
||
69 | |||
70 | * *com.vouchertw.bean.MemberRequestBean* |
||
71 | 6 | Soh Keong | > * *stockistId* - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE |
72 | 2 | Soh Keong | > * *memberId* - String |
73 | > * *countryId* - String |
||
74 | >> * *token* - System auto assign |
||
75 | |||
76 | * *com.vouchertw.bean.MemberResponseBean* |
||
77 | > * *errorCode* - String |
||
78 | > * *errorMsg* - String |
||
79 | > * *voucherSet* - Set<VoucherBean> |
||
80 | >> * *voucherCode* - String |
||
81 | >> * *startDate* - java.time.LocalDate |
||
82 | >> * *expiryDate* - java.time.LocalDate |
||
83 | >> * *amount* - double |
||
84 | >> * *point* - int |
||
85 | >> * *voucherName* - String |
||
86 | >> * *promoCode* - String |
||
87 | >> * *orderId* - String |
||
88 | >> * *stockistId* - String |
||
89 | 7 | Soh Keong | >> * *status* - String |
90 | >> * *statusMsg* - String |
||
91 | 3 | Soh Keong | |
92 | h3. getActiveUtilizeVoucherByMember |
||
93 | |||
94 | <pre> |
||
95 | com.vouchertw.bean.MemberResponseBean result = service.getActiveUtilizeVoucherByMember(VoucherRequestBean bean); |
||
96 | </pre> |
||
97 | |||
98 | * *com.vouchertw.bean.VoucherTransactionBean* |
||
99 | 6 | Soh Keong | > * *stockistId* - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE |
100 | 3 | Soh Keong | > * *memberId* - String |
101 | > * *countryId* - String |
||
102 | > * *voucherPromoId* - String (Optional) |
||
103 | 4 | Soh Keong | > * *voucherSet* - Set<VoucherBean> (Optional) |
104 | >> * *voucherCode* - String (Optional) |
||
105 | >> * *promoCode* - String (Optional) |
||
106 | 3 | Soh Keong | |
107 | * *com.vouchertw.bean.MemberResponseBean* |
||
108 | > * *errorCode* - String |
||
109 | > * *errorMsg* - String |
||
110 | > * *voucherSet* - Set<VoucherBean> |
||
111 | >> * *voucherCode* - String |
||
112 | >> * *startDate* - java.time.LocalDate |
||
113 | >> * *expiryDate* - java.time.LocalDate |
||
114 | >> * *amount* - double |
||
115 | >> * *point* - int |
||
116 | >> * *voucherName* - String |
||
117 | >> * *promoCode* - String |
||
118 | >> * *orderId* - String |
||
119 | >> * *stockistId* - String |
||
120 | 7 | Soh Keong | >> * *status* - String |
121 | >> * *statusMsg* - String |