getPurchaseOrderConfirmations method

Future<List<PurchaseOrderConfirmation>> getPurchaseOrderConfirmations({
  1. required String poNumber,
  2. Options? getPurchaseConfirmationOptions,
})

Implementation

Future<List<PurchaseOrderConfirmation>> getPurchaseOrderConfirmations({
  required String poNumber,
  Options? getPurchaseConfirmationOptions,
}) async {
  Response<Json> response = await _orderApiProvider
      .getPurchaseOrderConfirmation(
        poNumber: poNumber,
        getPurchaseConfirmationOptions: getPurchaseConfirmationOptions,
      );

  List<Json> jsonList = List.from(response.data!['results']);
  return jsonList.map(PurchaseOrderConfirmation.fromJson).toList();
}