Project

General

Profile

Specification » History » Version 7

Soh Keong, 08/13/2021 04:19 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 5 Soh Keong
"Jar":/redmine/attachments/download/603/TWVoucherService-1.0.jar
15
"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
>> * *token*         - System auto assign
58 2 Soh Keong
59
* *com.vouchertw.bean.ResponseBean*
60
> * *errorCode* - String
61
> * *errorMsg*  - String
62
63
h3. getVoucherByMember
64
65
<pre>
66
com.vouchertw.bean.MemberResponseBean result = service.getVoucherByMember(MemberRequestBeanbean);
67
</pre>
68
69
* *com.vouchertw.bean.MemberRequestBean*
70 6 Soh Keong
> * *stockistId*   - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE
71 2 Soh Keong
> * *memberId*     - String
72
> * *countryId*    - String
73
>> * *token*       - System auto assign
74
75
* *com.vouchertw.bean.MemberResponseBean*
76
> * *errorCode*    - String
77
> * *errorMsg*     - String
78
> * *voucherSet*   - Set<VoucherBean>
79
>> * *voucherCode*   - String
80
>> * *startDate*     - java.time.LocalDate
81
>> * *expiryDate*    - java.time.LocalDate
82
>> * *amount*        - double
83
>> * *point*         - int
84
>> * *voucherName*   - String
85
>> * *promoCode*     - String
86
>> * *orderId*       - String
87
>> * *stockistId*    - String
88 7 Soh Keong
>> * *status*        - String
89
>> * *statusMsg*      - String
90 3 Soh Keong
91
h3. getActiveUtilizeVoucherByMember
92
93
<pre>
94
com.vouchertw.bean.MemberResponseBean result = service.getActiveUtilizeVoucherByMember(VoucherRequestBean bean);
95
</pre>
96
97
* *com.vouchertw.bean.VoucherTransactionBean*
98 6 Soh Keong
> * *stockistId*      - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE
99 3 Soh Keong
> * *memberId*        - String
100
> * *countryId*       - String
101
> * *voucherPromoId*  - String (Optional)
102 4 Soh Keong
> * *voucherSet*      - Set<VoucherBean> (Optional)
103
>> * *voucherCode*      - String (Optional)
104
>> * *promoCode*        - String (Optional)
105 3 Soh Keong
106
* *com.vouchertw.bean.MemberResponseBean*
107
> * *errorCode*    - String
108
> * *errorMsg*     - String
109
> * *voucherSet*   - Set<VoucherBean>
110
>> * *voucherCode*   - String
111
>> * *startDate*     - java.time.LocalDate
112
>> * *expiryDate*    - java.time.LocalDate
113
>> * *amount*        - double
114
>> * *point*         - int
115
>> * *voucherName*   - String
116
>> * *promoCode*     - String
117
>> * *orderId*       - String
118
>> * *stockistId*    - String
119 7 Soh Keong
>> * *status*        - String
120
>> * *statusMsg*      - String