Project

General

Profile

Actions

Specification » History » Revision 7

« Previous | Revision 7/10 (diff) | Next »
Soh Keong, 01/06/2022 11:36 AM


Specification

Programming Guide

Jar version

version Description
1.5 Init
1.6 open TrxID
1.7 Added UtilizeOrderId and Date

Jar File Download

Jar
Properties

properties file

  • service.properties
  1. json.url - Dotnet team URL
  2. json.key - provided by json
  3. connection.timeout - set connection timeout
  4. connection.read.timeout - set connection read timeout

Methods

Common Instance

com.cosway.voucher.service.VoucherService service = new com.cosway.voucher.service.VoucherService();

getRandomByType (IGetRandomNoByType)

com.cosway.voucher.bean.response.VoucherRandomResponseBean resultBean = service.getRandomByType(VoucherRandomByType voucherBean)
  • 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

checkVoucher ((IGetVoucherByCode))/ getVoucherByMemberId (IGetVoucherByMemberID)

com.cosway.voucher.bean.response.VoucherCheckResponseBean resultBean = service.checkVoucher(VoucherCheckBean bean)
com.cosway.voucher.bean.response.VoucherCheckResponseBean resultBean = service.getVoucherByMemberId(VoucherByMemberId bean)
  • 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

addVoucher (IAddVoucher)/ cancelVoucher (ICancelVoucher)/ utilizeVoucher (IUtilizeVoucher)/ lockVoucher (ILockVoucher)/ unlockVoucher (IUnlockVoucher)

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) 
  • 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

Updated by Soh Keong almost 3 years ago · 7 revisions