@@ -144,8 +144,6 @@ public void delete(Long id) {
144144 }
145145
146146 /**
147- * @deprecated this method doesn't work with fields parameter in request, please use getHistory method with id, limit and offset parameters
148- *
149147 * Find all texts and calls attributed to a contact.
150148 *
151149 * @param request request to get particular contact's history
@@ -158,71 +156,10 @@ public void delete(Long id) {
158156 * @throws CallfireApiException in case HTTP response code is something different from codes listed above.
159157 * @throws CallfireClientException in case error has occurred in client.
160158 */
161- @ Deprecated
162159 public ContactHistory getHistory (GetByIdRequest request ) {
163160 Validate .notNull (request .getId (), "request.id cannot be null" );
164161 String path = CONTACTS_ITEM_HISTORY_PATH .replaceFirst (PLACEHOLDER , request .getId ().toString ());
165162 return client .get (path , of (ContactHistory .class ), request );
166163 }
167164
168- /**
169- * Find all texts and calls attributed to a contact.
170- *
171- * @param id contact id to get history for
172- * @return returns a list of calls and texts a contact has been involved with.
173- * @throws BadRequestException in case HTTP response code is 400 - Bad request, the request was formatted improperly.
174- * @throws UnauthorizedException in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.
175- * @throws AccessForbiddenException in case HTTP response code is 403 - Forbidden, insufficient permissions.
176- * @throws ResourceNotFoundException in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.
177- * @throws InternalServerErrorException in case HTTP response code is 500 - Internal Server Error.
178- * @throws CallfireApiException in case HTTP response code is something different from codes listed above.
179- * @throws CallfireClientException in case error has occurred in client.
180- */
181- public ContactHistory getHistory (Long id ) {
182- return getHistory (id , null , null );
183- }
184-
185- /**
186- * Find all texts and calls attributed to a contact.
187- *
188- * @param id contact id to get history for
189- * @param limit maximum number of calls/texts records to return in response
190- * @return returns a list of calls and texts a contact has been involved with.
191- * @throws BadRequestException in case HTTP response code is 400 - Bad request, the request was formatted improperly.
192- * @throws UnauthorizedException in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.
193- * @throws AccessForbiddenException in case HTTP response code is 403 - Forbidden, insufficient permissions.
194- * @throws ResourceNotFoundException in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.
195- * @throws InternalServerErrorException in case HTTP response code is 500 - Internal Server Error.
196- * @throws CallfireApiException in case HTTP response code is something different from codes listed above.
197- * @throws CallfireClientException in case error has occurred in client.
198- */
199- public ContactHistory getHistory (Long id , Long limit ) {
200- return getHistory (id , limit , null );
201- }
202-
203- /**
204- * Find all texts and calls attributed to a contact.
205- *
206- * @param id contact id to get history for
207- * @param limit maximum number of calls/texts records to return in response
208- * @param offset offset to the start of a given page
209- * @return returns a list of calls and texts a contact has been involved with.
210- * @throws BadRequestException in case HTTP response code is 400 - Bad request, the request was formatted improperly.
211- * @throws UnauthorizedException in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.
212- * @throws AccessForbiddenException in case HTTP response code is 403 - Forbidden, insufficient permissions.
213- * @throws ResourceNotFoundException in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.
214- * @throws InternalServerErrorException in case HTTP response code is 500 - Internal Server Error.
215- * @throws CallfireApiException in case HTTP response code is something different from codes listed above.
216- * @throws CallfireClientException in case error has occurred in client.
217- */
218- public ContactHistory getHistory (Long id , Long limit , Long offset ) {
219- Validate .notNull (id , "id cannot be null" );
220-
221- List <NameValuePair > queryParams = new ArrayList <>(1 );
222- addQueryParamIfSet ("limit" , limit , queryParams );
223- addQueryParamIfSet ("offset" , offset , queryParams );
224-
225- String path = CONTACTS_ITEM_HISTORY_PATH .replaceFirst (PLACEHOLDER , id .toString ());
226- return client .get (path , of (ContactHistory .class ), queryParams );
227- }
228165}
0 commit comments