assertList method

void assertList()

Asserts that isList is true and throws an exception if not.

Implementation

void assertList() {
  if (!isList) {
    throw ApiServiceException('Response is object but expected array', null, null);
  }
}