checkout method

Future<CheckoutResponseModel?> checkout({
  1. required CheckoutRequestModel checkoutRequestModel,
})

Implementation

Future<CheckoutResponseModel?> checkout({
  required CheckoutRequestModel checkoutRequestModel,
}) async {
  final Response response = await spHttpRequest(
    httpRequestType: HttpRequestType.post,
    path: ApiEndpoints.checkout,
    payload: checkoutRequestModel.toJson(),
  );
  return CheckoutResponseModel.fromJson(response.data);
}