Project

General

Profile

Specification » History » Version 11

Soh Keong, 08/20/2021 10:47 PM

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