feat: finish writing tests for getRecordsByIds method

This commit is contained in:
StevanFreeborn
2023-02-12 15:04:08 -06:00
parent 827ad9c5a1
commit abf571f415
4 changed files with 306 additions and 1 deletions
+13 -1
View File
@@ -357,10 +357,22 @@ export class OnspringClient {
return apiResponse.asRecordType();
}
/**
* @method getRecordsByIds - Gets records by their ids.
* @param {GetRecordsRequest} request - The request that will be used to get the records.
* @returns {Promise<ApiResponse<CollectionResponse<Record>>>} - A promise that resolves to an ApiResponse of type CollectionResponse of type Record.
*/
public async getRecordsByIds(
request: GetRecordsRequest
): Promise<ApiResponse<CollectionResponse<Record>>> {
throw new Error('Not implemented');
const endpoint = EndpointFactory.getRecordsByIdsEndpoint();
const apiResponse = await this.post<any>(endpoint, request);
if (apiResponse.isSuccessful === false) {
return apiResponse;
}
return apiResponse.asRecordCollectionType();
}
/**