appendCodes method

Future<List<Invoice>> appendCodes(
  1. String sdkId,
  2. String userId,
  3. String type,
  4. String sentMediumType,
  5. String secretFKeys,
  6. String? insuranceId,
  7. String? invoiceId,
  8. int? gracePeriod,
  9. List<EncryptedInvoicingCode> invoicingCodes,
)

Implementation

Future<List<Invoice>> appendCodes(String sdkId, String userId, String type, String sentMediumType, String secretFKeys, String? insuranceId, String? invoiceId, int? gracePeriod, List<EncryptedInvoicingCode> invoicingCodes) async {
	final res = await _methodChannel.invokeMethod<String>(
		'InvoiceApi.tryAndRecover.appendCodes',
		{
			"sdkId": sdkId,
			"userId": jsonEncode(userId),
			"type": jsonEncode(type),
			"sentMediumType": jsonEncode(sentMediumType),
			"secretFKeys": jsonEncode(secretFKeys),
			"insuranceId": jsonEncode(insuranceId),
			"invoiceId": jsonEncode(invoiceId),
			"gracePeriod": jsonEncode(gracePeriod),
			"invoicingCodes": jsonEncode(invoicingCodes.map((x0) => EncryptedInvoicingCode.encode(x0)).toList()),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method appendCodes");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as List<dynamic>).map((x1) => Invoice.fromJSON(x1) ).toList();
}