patchAuthorizationsIDWithHttpInfo method

Future<Response> patchAuthorizationsIDWithHttpInfo(
  1. String authID,
  2. AuthorizationUpdateRequest authorizationUpdateRequest, {
  3. String? zapTraceSpan,
})

Update an authorization to be active or inactive

Note: This method returns the HTTP Response.

Parameters:

  • String authID (required): The ID of the authorization to update.

  • AuthorizationUpdateRequest authorizationUpdateRequest (required): Authorization to update

  • String zapTraceSpan: OpenTracing span context

Implementation

Future<Response> patchAuthorizationsIDWithHttpInfo(
  String authID,
  AuthorizationUpdateRequest authorizationUpdateRequest, {
  String? zapTraceSpan,
}) async {
  final path = r'/authorizations/{authID}'.replaceAll('{authID}', authID);

  // ignore: prefer_final_locals
  Object? postBody = authorizationUpdateRequest;

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

  if (zapTraceSpan != null) {
    headerParams[r'Zap-Trace-Span'] = parameterToString(zapTraceSpan);
  }

  const authNames = <String>[
    'BasicAuthentication',
    'QuerystringAuthentication',
    'TokenAuthentication'
  ];
  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'PATCH',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes[0],
    authNames,
  );
}