Project

General

Profile

Specification » History » Version 14

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