Project

General

Profile

Specification » History » Version 13

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