Project

General

Profile

Specification » History » Revision 3

Revision 2 (Soh Keong, 12/07/2020 04:05 PM) → Revision 3/4 (Soh Keong, 12/07/2020 04:29 PM)

{{toc}} 

 h1. Specification 

 h1. Programming Guide 

 h3. Jar version  

 |_. version |_. Description    | 
 | 1.5         | Init             | 

 h3. Jar File Download 

 "Jar":/redmine/attachments/download/536/GiftCardService-1.5.jar 
 "Lib":/redmine/attachments/download/538/lib.rar 
 "Properties":/redmine/attachments/download/537/service.properties 

 h3. properties file 

 * *service.properties* 

 # *json.url*                  -  
 # *json.key*                  -  
 # *connection.timeout*        -  
 # *connection.read.timeout* - 


 h2. Methods 

 h3. Common Instance 

 <pre> 
 com.cosway.gift.service.GiftCardService service = new com.cosway.gift.service.GiftCardService(); 
 </pre> 
 
 h3. checkGiftCard 

 <pre> 
 com.cosway.gift.bean.response.GiftCardCheckResponseBean resultBean = service.checkGiftCard(GiftCardCheckBean bean) 
 </pre> 

 * *com.cosway.gift.bean.request.GiftCardCheckBean* 
 > * *countryId*      - 
 > * *centerId*       - com.cosway.gift.constant.CommonConstant.CENTER_ID_ONLINE 
 > * *giftCardList* - List<GiftCardBean> 
 >> * *cardSerialNo*    - 
 >> * *pinCode*         - 

 * *com.cosway.gift.bean.response.GiftCardCheckResponseBean* 
 > * *errorCode*      - 
 > * *errorMsg*       - 
 > * *totalRecord*    - 
 > * *giftCardList* - List<GiftCardDetail> 
 >> * *errorCode*       - 
 >> * *errorMsg*        - 
 >> * *serialNo*        - 
 >> * *startDate*       - with pinCode only 
 >> * *expiryDate*      - 
 >> * *value*           - with pinCode only 
 >> * *memberId*        - 

 h3. utilizeGiftCard 

 <pre> 
 com.cosway.gift.bean.response.GiftCardCheckResponseBean resultBean = service.utilizeGiftCard(GiftCardTransactionBean bean) 
 </pre> 

 * *com.cosway.gift.bean.request.GiftCardTransactionBean * 
 > * *transactionId* - 
 > * *orderId*         - 
 > * *orderDate*       - Date 
 > * *amount*          - double 
 > * *countryId*       - 
 > * *centerId*        - com.cosway.gift.constant.CommonConstant.CENTER_ID_ONLINE 
 > * *giftCardList*    - List<GiftCardBean> 
 >> * *cardSerialNo*     - 
 >> * *pinCode*          - 

 * *com.cosway.gift.bean.response.GiftCardCheckResponseBean* 
 > * *errorCode*      - 
 > * *errorMsg*       - 
 > * *totalRecord*    - 
 > * *giftCardList* - List<GiftCardDetail> 
 >> * *errorCode*       - 
 >> * *errorMsg*        - 
 >> * *serialNo*        - 


 h3. lockGiftCard  

 <pre> 

 <pre> 
 com.cosway.gift.bean.response.GiftCardCheckResponseBean resultBean = service.lockGiftCard(GiftCardTransactionBean bean) 
 com.cosway.gift.bean.response.GiftCardCheckResponseBean resultBean = service.unlockGiftCard(GiftCardTransactionBean bean)  
 </pre> 

 * *com.cosway.gift.bean.request.GiftCardTransactionBean * 
 > * *transactionId* - 
 > * *countryId*       - 
 > * *centerId*        - com.cosway.gift.constant.CommonConstant.CENTER_ID_ONLINE 
 > * *giftCardList*    - List<GiftCardBean> 
 >> * *cardSerialNo*     - 
 >> * *pinCode*          - 

 * *com.cosway.gift.bean.response.GiftCardCheckResponseBean* 
 > * *errorCode*      - 
 > * *errorMsg*       - 
 > * *totalRecord*    - 
 > * *giftCardList* - List<GiftCardDetail> 
 >> * *errorCode*       - 
 >> * *errorMsg*        - 
 >> * *serialNo*        - 
 >> * *startDate*       -  
 >> * *expiryDate*      - 
 >> * *value*           -  
 >> * *memberId*        -