getBankItemsMyBankItemsGetWithHttpInfo method

Future<Response> getBankItemsMyBankItemsGetWithHttpInfo({
  1. String? itemCode,
  2. int? page,
  3. int? size,
})

Get Bank Items

Fetch all items in your bank.

Note: This method returns the HTTP Response.

Parameters:

  • String itemCode: Item to search in your bank.

  • int page: Page number

  • int size: Page size

Implementation

Future<Response> getBankItemsMyBankItemsGetWithHttpInfo({
  String? itemCode,
  int? page,
  int? size,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/my/bank/items';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (itemCode != null) {
    queryParams.addAll(_queryParams('', 'item_code', itemCode));
  }
  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (size != null) {
    queryParams.addAll(_queryParams('', 'size', size));
  }

  const contentTypes = <String>[];

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