public class JBackofficeRequests extends Object
Constructor and Description |
---|
JBackofficeRequests(String sURI)
Create a gateway request instance
|
JBackofficeRequests(String sURI,
String sLogin,
String sPassword) |
Modifier and Type | Method and Description |
---|---|
String |
activateVoucher(String id,
String userid)
Activate a voucher
|
String |
checkVoucher(String id)
Check if the voucher exists and is valid and ready to be activated.
|
String |
consumeVoucher(String id)
Set the voucher to consumed which shall deactivate the voucher and set
a used_at date
|
String |
createCreditRecord(String ticketid,
Double amount)
Create a credit record in the central database.
|
String |
createRadiusAccount(String cType,
String sPeriod)
work in progress
|
void |
deleteCreditRecord(String id)
Delete the record identified by id.
|
String |
getCreditRecord(String id)
Return the requested record.
|
String |
getVoucher(String id)
Get the voucher data as a JSON string
|
void |
redeemCreditRecord(String id)
Update the credit record identified by id with redeemed=true and the current date for updated_at
and valid_before
|
void |
revertRedeemCreditRecord(String id)
Revert the redeem action
|
public JBackofficeRequests(String sURI, String sLogin, String sPassword)
sURI
- sLogin
- sPassword
- public JBackofficeRequests(String sURI)
sURI
- The URI must include the port nmber and the controller name
The controller name is 'credit' for credit transactions. The gateway must reside in a location that is uniquely
identified by branch, customer, and host. I.e. In the current setup, each host has its own gatewaypublic void deleteCreditRecord(String id) throws BasicException
id
- The record id of the credit recordBasicException
public String getCreditRecord(String id) throws BasicException
id
- BasicException
public String createCreditRecord(String ticketid, Double amount) throws BasicException
ticketid
- amount
- BasicException
public void redeemCreditRecord(String id) throws BasicException
id
- BasicException
public void revertRedeemCreditRecord(String id) throws BasicException
id
- The record id of the credit recordBasicException
public String activateVoucher(String id, String userid) throws BasicException
id
- userid
- BasicException
public String consumeVoucher(String id) throws BasicException
id
- BasicException
public String checkVoucher(String id) throws BasicException
id
- BasicException
public String getVoucher(String id) throws BasicException
id
- BasicException
Copyright © 2021. All rights reserved.