Project

General

Profile

Actions

API References

This is the list of API references for all of the integrated SP web services.

Query utilization status of the Special Bundle Set

This API queries whether the special bundle set has been utilized.

Method Signature:

public static boolean isUtilized(String memberId, String countryCode) 
        throws RemoteException

Input Parameters

  • memberId - the shopper/member ID
  • countryCode - the country code of the member

Output Parameters

true means utilized

Code Snippets

String memberId = request.getParameter("member_id");
String countryCode = request.getParameter("country_code");

boolean isUtilized = SpServicesUtils.isUtilized(memberId, countryCode);

Utilize the Special Bundle Set

Flag the Special Bundle Set as utilized for the given member/shopper ID.

Method Signature:

public static TransactionResponse flagSpecialSetUtilization(
            Connection dbConnection, String orderId,
            String countryCode, String memberId, Date trxDate) 
        throws RemoteException, SQLException {

Input Parameters

  • dbConnection - an established database connection
  • orderId - the order ID
  • countryCode - the country code of the member
  • memberId - the shopper/member ID
  • trxDate - the transaction date

Output Parameters

The returned object, TransactionResponse consists of:
  • process - the process code of the submitted request
  • trxId - the submitted transaction ID, a.k.a. order ID
  • centerId - either ONLINE or TEST
  • memberId - the member/shopper ID
  • status - the status code, e.g. 0000
  • errCode - the error code, e.g. 00000
  • errMessage - the detailed description of the status code
  • isUtilized - true if utilized else false

Code Snippets

String memberId = request.getParameter("member_id");
String countryCode = request.getParameter("country_code");
String orderId = request.getParameter("order_id");
Date transactionDate = new Date();

Connection dbConnection = DBConnectionFactory.createDbConnection("java:/DB2DS_USA");

TransactionResponse result = null;
try {
    result = SpServicesUtils.flagSpecialSetUtilization(dbConnection,
            orderId, countryCode, memberId, transactionDate);
} finally {
    if (dbConnection != null) {
        dbConnection.close();
    }
}

Return the Special Bundle Set

Inform SP to flag the status as un-utilized when return or exchange the Special Bundle Set.

Method Signature:

public static TransactionResponse unflagSpecialSetUtilization(
            Connection dbConnection,
            String orderId, String countryCode, String memberId, Date trxDate) 
        throws RemoteException, SQLException {

Input Parameters

  • dbConnection - an established database connection
  • orderId - the order ID
  • countryCode - the country code of the member
  • memberId - the shopper/member ID
  • trxDate - the transaction date

Output Parameters

The returned object, TransactionResponse consists of:
  • process - the process code of the submitted request
  • trxId - the submitted transaction ID, a.k.a. order ID
  • centerId - either ONLINE or TEST
  • memberId - the member/shopper ID
  • status - the status code, e.g. 0000
  • errCode - the error code, e.g. 00000
  • errMessage - the detailed description of the status code
  • isUtilized - true if utilized else false

Code Snippets

String memberId = request.getParameter("member_id");
String countryCode = request.getParameter("country_code");
String orderId = request.getParameter("order_id");
Date transactionDate = new Date();

Connection dbConnection = DBConnectionFactory.createDbConnection("java:/DB2DS_USA");

TransactionResponse result = null;
try {
    result = SpServicesUtils.unflagSpecialSetUtilization(dbConnection,
            orderId, countryCode, memberId, transactionDate);
} finally {
    if (dbConnection != null) {
        dbConnection.close();
    }
}

Updated by chin-yeh about 13 years ago · 7 revisions