Specification » History » Revision 5
Revision 4 (Soh Keong, 04/01/2021 02:26 PM) → Revision 5/10 (Soh Keong, 09/28/2021 11:56 AM)
{{toc}} h1. Specification h1. Programming Guide h3. Jar version |_. version |_. Description | | 1.5 | Init | | 1.6 | open TrxID | h3. Jar File Download "Jar":/redmine/attachments/download/613/VoucherService-1.6.jar "Jar":/redmine/attachments/download/492/VoucherService-1.5.jar "Properties":/redmine/attachments/download/493/service.properties h3. properties file * *service.properties* # *json.url* - Dotnet team URL # *json.key* - provided by json # *connection.timeout* - set connection timeout # *connection.read.timeout* - set connection read timeout h2. Methods h3. Common Instance <pre> com.cosway.voucher.service.VoucherService service = new com.cosway.voucher.service.VoucherService(); </pre> h3. getRandomByType (IGetRandomNoByType) <pre> com.cosway.voucher.bean.response.VoucherRandomResponseBean resultBean = service.getRandomByType(VoucherRandomByType voucherBean) </pre> * *com.cosway.voucher.bean.request.VoucherRandomByType* > * *quantity* - Int > * *voucherType* - String * *com.cosway.voucher.bean.response.VoucherRandomResponseBean* > * *errorCode* - String > * *errorMsg* - String > * *totalRecords* - Int > * *voucherList* - List<VoucherBean> >> * *voucherCode* - String h3. checkVoucher ((IGetVoucherByCode))/ getVoucherByMemberId (IGetVoucherByMemberID) <pre> com.cosway.voucher.bean.response.VoucherCheckResponseBean resultBean = service.checkVoucher(VoucherCheckBean bean) com.cosway.voucher.bean.response.VoucherCheckResponseBean resultBean = service.getVoucherByMemberId(VoucherByMemberId bean) </pre> * *com.cosway.voucher.bean.request.VoucherCheckBean* > * *memberId* - String > * *voucherList* - List<VoucherBean> >> * *voucherCode* - String * *com.cosway.voucher.bean.request.VoucherByMemberId* > * *memberId* - String * *com.cosway.voucher.bean.response.VoucherCheckResponseBean* > * *errorCode* - String > * *errorMsg* - String > * *totalRecords* - Int > * *voucherList* - List<VoucherDetailBean> >> * *errorCode* - String >> * *errorMsg* - String >> * *voucherCode* - String >> * *memberId* - String >> * *startDate* - Date >> * *expiryDate* - Date >> * *amount* - double >> * *lock* - boolean >> * *bookingStatus* - String >> * *promoCode* - String h3. addVoucher (IAddVoucher)/ cancelVoucher (ICancelVoucher)/ utilizeVoucher (IUtilizeVoucher)/ lockVoucher (ILockVoucher)/ unlockVoucher (IUnlockVoucher) <pre> com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.addVoucher(VoucherAddBean bean) com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.cancelVoucher(VoucherTransactionBean bean) com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.utilizeVoucher(VoucherTransactionBean bean) com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.lockVoucher(VoucherTransactionBean bean) com.cosway.voucher.bean.response.VoucherTransactionResponseBean resultBean = service.unlockVoucher(VoucherTransactionBean bean) </pre> * *com.cosway.voucher.bean.request.VoucherAddBean* > * *noBook* - com.cosway.voucher.constant.CommonConstant.NO_BOOK_YES > REFER com.cosway.voucher.bean.request.VoucherTransactionBean * *com.cosway.voucher.bean.request.VoucherTransactionBean* > * *orderId* - String > * *countryId* - String > * *orderDate* - Date > * *trxId* - String > * *voucherList* - List<VoucherBean> > * *voucherCode* - String (for ALL) > * *startDate* - Date (for Add, Lock & Unlock) > * *expiryDate* - Date (for Add, Lock & Unlock) > * *amount* - Double (for Add, Lock & Unlock) > * *voucherType* - String (for Add Only) > * *promoCode* - String (for Add Only) * *com.cosway.voucher.bean.response.VoucherTransactionResponseBean* > * *errorCode* - String > * *errorMsg* - String