/// <summary> /// Partially refund an existing order /// </summary> /// <param name="orderCode">The code of the order to be partially refunded</param> /// <param name="amount">The amount of the order to be partially refunded</param> public void Refund(String orderCode, int amount) { PartialRefundRequest partialRefundRequest = new PartialRefundRequest { refundAmount = amount }; Http.Post(String.Format("{0}/orders/{1}/refund", _baseUrl, orderCode), partialRefundRequest); }
/// <summary> /// Partially refund an existing order /// </summary> /// <param name="orderCode">The code of the order to be partially refunded</param> /// <param name="amount">The amount of the order to be partially refunded</param> public async Task Refund(String orderCode, int amount) { if (amount == 0) { await Refund(orderCode); } else { PartialRefundRequest partialRefundRequest = new PartialRefundRequest { refundAmount = amount }; await Http.Post(String.Format("{0}/orders/{1}/refund", _baseUrl, orderCode), partialRefundRequest); } }