getToken method

Future<TokenResponseModel?> getToken({
  1. required TokenRequestModel tokenRequestModel,
})

Implementation

Future<TokenResponseModel?> getToken({
  required TokenRequestModel tokenRequestModel,
}) async {
  final Response response = await spHttpRequest(
    httpRequestType: HttpRequestType.post,
    path: ApiEndpoints.getToken,
    payload: tokenRequestModel.toJson(),
  );
  return tokenResponseModel = TokenResponseModel.fromJson(response.data);
}