getOrderPayment function

Future<ApiResponse<OrderPayment>> getOrderPayment(
  1. ExsitedClient client,
  2. Object orderId,
  3. Object paymentId, {
  4. bool? raiseOnError,
  5. String? responseFormat,
})

GET /api/{api_version}/orders/{order_id}/payments/{payment_id}

One payment; the server does not check that the payment belongs to the order.

Implementation

Future<ApiResponse<OrderPayment>> getOrderPayment(
  ExsitedClient client,
  Object orderId,
  Object paymentId, {
  bool? raiseOnError,
  String? responseFormat,
}) =>
    client.sendGetRequest(OrdersUrls.orderPayment,
        pathParams: {'order_id': orderId, 'payment_id': paymentId},
        raiseOnError: raiseOnError,
        responseFormat: responseFormat,
        dtoDecoder: OrderPayment.fromMap);