getBooksRulesWithHttpInfo method

Future<Response> getBooksRulesWithHttpInfo({
  1. String? sandbox,
})

Returns the org's auto-categorization rules, highest priority first.

Returns the org's auto-categorization rules, highest priority first. A rule is a standing instruction — "anything whose merchant contains X books to category Y" — and it overrides a vendor's default category, so this is the list that decides how a future bill classifies itself.

Note: This method returns the HTTP Response.

Parameters:

  • String sandbox: Sandbox reads the org's SANDBOX ledger when it is exactly "true"; anything else reads the live one.

Implementation

Future<Response> getBooksRulesWithHttpInfo({ String? sandbox, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/books/rules';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (sandbox != null) {
    queryParams.addAll(_queryParams('', 'sandbox', sandbox));
  }

  const contentTypes = <String>[];


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