apiV2CustomerBookingsListWithHttpInfo method

Future<Response> apiV2CustomerBookingsListWithHttpInfo({
  1. bool? completed,
  2. DateTime? endTime,
  3. bool? isTrialCall,
  4. DateTime? startTime,
})

Main viewset used by Customer to control own bookings. Provides a full list of fields for a Booking object. With filtering options.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> apiV2CustomerBookingsListWithHttpInfo({ bool? completed, DateTime? endTime, bool? isTrialCall, DateTime? startTime, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v2/customer/bookings/';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (completed != null) {
    queryParams.addAll(_queryParams('', 'completed', completed));
  }
  if (endTime != null) {
    queryParams.addAll(_queryParams('', 'end_time', endTime));
  }
  if (isTrialCall != null) {
    queryParams.addAll(_queryParams('', 'is_trial_call', isTrialCall));
  }
  if (startTime != null) {
    queryParams.addAll(_queryParams('', 'start_time', startTime));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}