getGatewayByIdWithHttpInfo method

Future<Response> getGatewayByIdWithHttpInfo(
  1. String id,
  2. List<PopulateGatewayQueryParameters>? populateQuery
)

Get a gateway by ID

Note: This method returns the HTTP Response.

Parameters:

  • String id (required): Path param: id

Implementation

Future<Response> getGatewayByIdWithHttpInfo(
  String id,
  List<PopulateGatewayQueryParameters>? populateQuery,
) async {
  // ignore: prefer_const_declarations
  final path = r'/ga/gateways/{id}'.replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  if (populateQuery != null && populateQuery.isNotEmpty) {
    for (final q in populateQuery) {
      final queryMap = q.toQueryParam();
      queryParams.addAll(
        _queryParams(
          "",
          queryMap.keys.first,
          queryMap.values.first,
        ),
      );
    }
  }
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];

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