示例#1
0
        /// <summary>
        /// Cancel Refund
        /// </summary>
        /// <param name="refund">Refund</param>
        /// <returns>Refund</returns>
        public Refund cancelRefund(Refund refund)
        {
            refund.setRequiredFields(new List <string> {
                CardPaymentsConstants.id
            });
            refund.checkRequiredFields();

            Refund tmpRefund = new Refund();

            tmpRefund.status("CANCELLED");

            Request request = new Request(
                method: RequestType.PUT,
                uri: this.prepareURI("/refunds/" + refund.id()),
                body: tmpRefund
                );

            dynamic response = this.client.processRequest(request);

            return(new Refund(response));
        }