downloadDocumentBytes method

  1. @override
Future<Uint8List?> downloadDocumentBytes(
  1. String? accessToken,
  2. String reference,
  3. DocumentTypes type
)
override

Implementation

@override
Future<Uint8List?> downloadDocumentBytes(String? accessToken, String reference, DocumentTypes type) async {
  switch (type) {
    case DocumentTypes.pdf:
      return await apiController.downloadBytes(accessToken, 'api/ubl2.1/download/$reference.pdf');
    case DocumentTypes.xml:
      return await apiController.downloadBytes(accessToken, 'api/ubl2.1/download/$reference.xml');
    default: return null;
  }
}