Project

General

Profile

Specification » History » Version 12

Soh Keong, 08/25/2021 06:01 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 12 Soh Keong
"Jar":/redmine/attachments/download/608/TWVoucherService-1.2.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 1 Soh Keong
>> * *expiryDate*    - java.time.LocalDate
84 12 Soh Keong
>> * *orderDateUse*  - java.time.LocalDate
85 2 Soh Keong
>> * *amount*        - double
86
>> * *point*         - int
87
>> * *voucherName*   - String
88
>> * *promoCode*     - String
89 1 Soh Keong
>> * *orderId*       - String
90 12 Soh Keong
>> * *orderIdUse*    - String
91 1 Soh Keong
>> * *stockistId*    - String
92 12 Soh Keong
>> * *stockistIdUse* - String
93 7 Soh Keong
>> * *status*        - String
94 12 Soh Keong
>> * *statusMsg*     - String
95 3 Soh Keong
96
h3. getActiveUtilizeVoucherByMember
97
98
<pre>
99
com.vouchertw.bean.MemberResponseBean result = service.getActiveUtilizeVoucherByMember(VoucherRequestBean bean);
100
</pre>
101
102
* *com.vouchertw.bean.VoucherTransactionBean*
103 6 Soh Keong
> * *stockistId*      - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE
104 3 Soh Keong
> * *memberId*        - String
105
> * *countryId*       - String
106
> * *voucherPromoId*  - String (Optional)
107 4 Soh Keong
> * *voucherSet*      - Set<VoucherBean> (Optional)
108
>> * *voucherCode*      - String (Optional)
109
>> * *promoCode*        - String (Optional)
110 3 Soh Keong
111
* *com.vouchertw.bean.MemberResponseBean*
112
> * *errorCode*    - String
113
> * *errorMsg*     - String
114
> * *voucherSet*   - Set<VoucherBean>
115
>> * *voucherCode*   - String
116
>> * *startDate*     - java.time.LocalDate
117
>> * *expiryDate*    - java.time.LocalDate
118
>> * *amount*        - double
119
>> * *point*         - int
120
>> * *voucherName*   - String
121
>> * *promoCode*     - String
122
>> * *orderId*       - String
123
>> * *stockistId*    - String
124 7 Soh Keong
>> * *status*        - String
125
>> * *statusMsg*      - String