getOrderTotals method

Future<OrderTotals> getOrderTotals(
  1. String orderId
)

Get order totals

Implementation

Future<OrderTotals> getOrderTotals(String orderId) async {
  try {
    final order = await getOrder(orderId);
    return order.totals ?? OrderTotals();
  } catch (e) {
    throw Exception('Failed to get order totals: $e');
  }
}