Project

General

Profile

API References » History » Version 5

chin-yeh, 10/25/2011 05:11 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 5 chin-yeh
Flag the Special Bundle Set as utilized for the given member/shopper ID.
51
52
_Method Signature:_
53
<pre>
54
<code class="JAVA">
55
public static TransactionResponse flagSpecialSetUtilization(
56
			Connection dbConnection, String orderId,
57
			String countryCode, String memberId, Date trxDate) 
58
		throws RemoteException, SQLException {
59
</code>
60
</pre>
61
62 2 chin-yeh
h3. Input Parameters
63
64 5 chin-yeh
* _dbConnection_ - an established database connection
65
* _orderId_ - the order ID
66
* _countryCode_ - the country code of the member
67
* _memberId_ - the shopper/member ID
68
* _trxDate_ - the transaction date
69
70 2 chin-yeh
h3. Output Parameters
71 1 chin-yeh
72 4 chin-yeh
The returned object, *TransactionResponse* consists of:
73
* _process_ - the process code of the submitted request
74
* _trxId_ - the submitted transaction ID, a.k.a. order ID
75
* _centerId_ - either _ONLINE_ or _TEST_
76
* _memberId_ - the member/shopper ID
77
* _status_ - the [[wiki#ErrorCode-References|status code]], e.g. 0000
78
* _errCode_ - the [[wiki#ErrorCode-References|error code]], e.g. 00000
79
* _errMessage_ - the detailed description of the status code
80
* _isUtilized_ - true if utilized else false
81
82 2 chin-yeh
h3. Code Snippets
83 1 chin-yeh
84 4 chin-yeh
<pre>
85
<code class="JAVA">
86
String memberId = request.getParameter("member_id");
87
String countryCode = request.getParameter("country_code");
88
String orderId = request.getParameter("order_id");
89
Date transactionDate = new Date();
90
91
Connection dbConnection = DBConnectionFactory.createDbConnection("java:/DB2DS_USA");
92
93
TransactionResponse result = null;
94
try {
95
	result = SpServicesUtils.flagSpecialSetUtilization(dbConnection,
96
			orderId, countryCode, memberId, transactionDate);
97
} finally {
98
	if (dbConnection != null) {
99
		dbConnection.close();
100
	}
101
}
102
</code>
103
</pre>
104
105 2 chin-yeh
h2. Return the Special Bundle Set
106
107 5 chin-yeh
Inform SP to flag the status as un-utilized when return or exchange the Special Bundle Set.
108
109
_Method Signature:_
110
<pre>
111
<code class="JAVA">
112
public static TransactionResponse unflagSpecialSetUtilization(
113
			Connection dbConnection,
114
			String orderId, String countryCode, String memberId, Date trxDate) 
115
		throws RemoteException, SQLException {
116
</code>
117
</pre>
118
119 2 chin-yeh
h3. Input Parameters
120 5 chin-yeh
121
* _dbConnection_ - an established database connection
122
* _orderId_ - the order ID
123
* _countryCode_ - the country code of the member
124
* _memberId_ - the shopper/member ID
125
* _trxDate_ - the transaction date
126 2 chin-yeh
127
h3. Output Parameters
128 1 chin-yeh
129 4 chin-yeh
The returned object, *TransactionResponse* consists of:
130
* _process_ - the process code of the submitted request
131
* _trxId_ - the submitted transaction ID, a.k.a. order ID
132
* _centerId_ - either _ONLINE_ or _TEST_
133
* _memberId_ - the member/shopper ID
134
* _status_ - the [[wiki#ErrorCode-References|status code]], e.g. 0000
135
* _errCode_ - the [[wiki#ErrorCode-References|error code]], e.g. 00000
136
* _errMessage_ - the detailed description of the status code
137
* _isUtilized_ - true if utilized else false
138
139 1 chin-yeh
h3. Code Snippets
140 4 chin-yeh
141
<pre>
142
<code class="JAVA">
143
String memberId = request.getParameter("member_id");
144
String countryCode = request.getParameter("country_code");
145
String orderId = request.getParameter("order_id");
146
Date transactionDate = new Date();
147
148
Connection dbConnection = DBConnectionFactory.createDbConnection("java:/DB2DS_USA");
149
150
TransactionResponse result = null;
151
try {
152
	result = SpServicesUtils.unflagSpecialSetUtilization(dbConnection,
153
			orderId, countryCode, memberId, transactionDate);
154
} finally {
155
	if (dbConnection != null) {
156
		dbConnection.close();
157
	}
158
}
159
</code>
160
</pre>