Project

General

Profile

API References » History » Version 4

chin-yeh, 10/25/2011 05:04 PM

1 1 chin-yeh
{{toc}}
2
3
h1. API References
4 2 chin-yeh
5
This is the list of API references for all of the integrated SP web services.
6
7
h2. Query utilization status of the Special Bundle Set
8
9 3 chin-yeh
This API queries whether the special bundle set has been utilized.
10
11
_Method Signature:_
12
<pre>
13
<code class="JAVA">
14
public static TransactionResponse queryUtilizationStatus(String memberId, 
15
			String countryCode) throws RemoteException
16 4 chin-yeh
</code>
17 3 chin-yeh
</pre>
18
19 2 chin-yeh
h3. Input Parameters
20
21 3 chin-yeh
* _memberId_ - the shopper/member ID
22
* _countryCode_ - the country code of the member
23
24 2 chin-yeh
h3. Output Parameters
25 3 chin-yeh
26
The returned object, *TransactionResponse* consists of:
27
* _process_ - the process code of the submitted request
28
* _trxId_ - the submitted transaction ID, a.k.a. order ID
29
* _centerId_ - either _ONLINE_ or _TEST_
30
* _memberId_ - the member/shopper ID
31
* _status_ - the [[wiki#ErrorCode-References|status code]], e.g. 0000
32
* _errCode_ - the [[wiki#ErrorCode-References|error code]], e.g. 00000
33
* _errMessage_ - the detailed description of the status code
34
* _isUtilized_ - true if utilized else false
35
36 2 chin-yeh
37
h3. Code Snippets
38 1 chin-yeh
39 4 chin-yeh
<pre>
40
<code class="JAVA">
41
String memberId = request.getParameter("member_id");
42
String countryCode = request.getParameter("country_code");
43
	
44
TransactionResponse result = SpServicesUtils.queryUtilizationStatus(memberId, countryCode);
45
</code>
46
</pre>
47
48 2 chin-yeh
h2. Utilize the Special Bundle Set
49
50
h3. Input Parameters
51
52
h3. Output Parameters
53 1 chin-yeh
54 4 chin-yeh
The returned object, *TransactionResponse* consists of:
55
* _process_ - the process code of the submitted request
56
* _trxId_ - the submitted transaction ID, a.k.a. order ID
57
* _centerId_ - either _ONLINE_ or _TEST_
58
* _memberId_ - the member/shopper ID
59
* _status_ - the [[wiki#ErrorCode-References|status code]], e.g. 0000
60
* _errCode_ - the [[wiki#ErrorCode-References|error code]], e.g. 00000
61
* _errMessage_ - the detailed description of the status code
62
* _isUtilized_ - true if utilized else false
63
64 2 chin-yeh
h3. Code Snippets
65 1 chin-yeh
66 4 chin-yeh
<pre>
67
<code class="JAVA">
68
String memberId = request.getParameter("member_id");
69
String countryCode = request.getParameter("country_code");
70
String orderId = request.getParameter("order_id");
71
Date transactionDate = new Date();
72
73
Connection dbConnection = DBConnectionFactory.createDbConnection("java:/DB2DS_USA");
74
75
TransactionResponse result = null;
76
try {
77
	result = SpServicesUtils.flagSpecialSetUtilization(dbConnection,
78
			orderId, countryCode, memberId, transactionDate);
79
} finally {
80
	if (dbConnection != null) {
81
		dbConnection.close();
82
	}
83
}
84
</code>
85
</pre>
86
87 2 chin-yeh
h2. Return the Special Bundle Set
88
89
h3. Input Parameters
90
91
h3. Output Parameters
92 1 chin-yeh
93 4 chin-yeh
The returned object, *TransactionResponse* consists of:
94
* _process_ - the process code of the submitted request
95
* _trxId_ - the submitted transaction ID, a.k.a. order ID
96
* _centerId_ - either _ONLINE_ or _TEST_
97
* _memberId_ - the member/shopper ID
98
* _status_ - the [[wiki#ErrorCode-References|status code]], e.g. 0000
99
* _errCode_ - the [[wiki#ErrorCode-References|error code]], e.g. 00000
100
* _errMessage_ - the detailed description of the status code
101
* _isUtilized_ - true if utilized else false
102
103 1 chin-yeh
h3. Code Snippets
104 4 chin-yeh
105
<pre>
106
<code class="JAVA">
107
String memberId = request.getParameter("member_id");
108
String countryCode = request.getParameter("country_code");
109
String orderId = request.getParameter("order_id");
110
Date transactionDate = new Date();
111
112
Connection dbConnection = DBConnectionFactory.createDbConnection("java:/DB2DS_USA");
113
114
TransactionResponse result = null;
115
try {
116
	result = SpServicesUtils.unflagSpecialSetUtilization(dbConnection,
117
			orderId, countryCode, memberId, transactionDate);
118
} finally {
119
	if (dbConnection != null) {
120
		dbConnection.close();
121
	}
122
}
123
</code>
124
</pre>