Project

General

Profile

Specification » History » Revision 7

Revision 6 (Soh Keong, 08/11/2021 04:51 PM) → Revision 7/14 (Soh Keong, 08/13/2021 04:19 PM)

{{toc}} 

 h1. Specification 

 h1. Programming Guide 

 h3. Jar version  

 |_. version |_. Description    | 
 | 1.0         | Init             | 

 h3. Jar File Download 

 "Jar":/redmine/attachments/download/603/TWVoucherService-1.0.jar 
 "Properties":/redmine/attachments/download/604/service.properties 
 "Library":/redmine/attachments/download/605/lib.rar 

 h3. properties file 

 * *service.properties* 

 # *json.url*                  - Dotnet team URL 
 # *json.key*                  - provided by Dotnet 
 # *aes.key*                   - provided by Dotnet 
 # *connection.timeout*        - set connection timeout 
 # *connection.read.timeout* - set connection read timeout 

 h2. Methods 

 h3. Common Instance 

 <pre> 
 com.vouchertw.service.VoucherService service = new com.vouchertw.service.VoucherService(); 
 </pre> 


 h3. addVoucher 

 <pre> 
 com.vouchertw.bean.ResponseBean result = service.addVoucher(VoucherTransactionBean bean); 
 </pre> 

 * *com.vouchertw.bean.VoucherTransactionBean* 
 > * *stockistId*     - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE 
 > * *memberId*       - String 
 > * *countryId*      - String 
 > * *orderId*        - String 
 > * *orderDate*      - java.time.LocalDate 
 > * *voucherSet*     - Set<VoucherBean> 
 >> * *voucherCode*     - String 
 >> * *startDate*       - java.time.LocalDate 
 >> * *expiryDate*      - java.time.LocalDate 
 >> * *amount*          - double 
 >> * *point*           - int 
 >> * *voucherName*     - String 
 >> * *promoCode*       - String 
 >> * *token*           - System auto assign 

 * *com.vouchertw.bean.ResponseBean* 
 > * *errorCode* - String 
 > * *errorMsg*    - String 

 h3. getVoucherByMember 

 <pre> 
 com.vouchertw.bean.MemberResponseBean result = service.getVoucherByMember(MemberRequestBeanbean); 
 </pre> 

 * *com.vouchertw.bean.MemberRequestBean* 
 > * *stockistId*     - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE 
 > * *memberId*       - String 
 > * *countryId*      - String 
 >> * *token*         - System auto assign 

 * *com.vouchertw.bean.MemberResponseBean* 
 > * *errorCode*      - String 
 > * *errorMsg*       - String 
 > * *voucherSet*     - Set<VoucherBean> 
 >> * *voucherCode*     - String 
 >> * *startDate*       - java.time.LocalDate 
 >> * *expiryDate*      - java.time.LocalDate 
 >> * *amount*          - double 
 >> * *point*           - int 
 >> * *voucherName*     - String 
 >> * *promoCode*       - String 
 >> * *orderId*         - String 
 >> * *stockistId*      - String 
 >> * *status*          *errorCode*       - String 
 >> * *statusMsg* *errorMsg*        - String 

 h3. getActiveUtilizeVoucherByMember 

 <pre> 
 com.vouchertw.bean.MemberResponseBean result = service.getActiveUtilizeVoucherByMember(VoucherRequestBean bean); 
 </pre> 

 * *com.vouchertw.bean.VoucherTransactionBean* 
 > * *stockistId*        - com.vouchertw.constant.CommonConstant.CENTER_ID_ONLINE 
 > * *memberId*          - String 
 > * *countryId*         - String 
 > * *voucherPromoId*    - String (Optional) 
 > * *voucherSet*        - Set<VoucherBean> (Optional) 
 >> * *voucherCode*        - String (Optional) 
 >> * *promoCode*          - String (Optional) 

 * *com.vouchertw.bean.MemberResponseBean* 
 > * *errorCode*      - String 
 > * *errorMsg*       - String 
 > * *voucherSet*     - Set<VoucherBean> 
 >> * *voucherCode*     - String 
 >> * *startDate*       - java.time.LocalDate 
 >> * *expiryDate*      - java.time.LocalDate 
 >> * *amount*          - double 
 >> * *point*           - int 
 >> * *voucherName*     - String 
 >> * *promoCode*       - String 
 >> * *orderId*         - String 
 >> * *stockistId*      - String 
 >> * *status*          *errorCode*       - String 
 >> * *statusMsg* *errorMsg*        - String