/// <summary> /// Get the AuthorizationReversal /// </summary> /// <param name="authReversal">AuthorizationReversal</param> /// <returns>AuthorizationReversal</returns> public AuthorizationReversal get(AuthorizationReversal authReversal) { authReversal.setRequiredFields(new List <string> { CardPaymentsConstants.id }); authReversal.checkRequiredFields(); Request request = new Request( method: RequestType.GET, uri: this.prepareURI("/voidauths/" + authReversal.id()) ); dynamic response = this.client.processRequest(request); return(new AuthorizationReversal(response)); }
/// <summary> /// Reverse /// </summary> /// <param name="authReversal">AuthorizationReversal</param> /// <returns>AuthorizationReversal</returns> public AuthorizationReversal reverseAuth(AuthorizationReversal authReversal) { authReversal.setRequiredFields(new List <string> { CardPaymentsConstants.authorizationId }); authReversal.checkRequiredFields(); authReversal.setRequiredFields(new List <string> { CardPaymentsConstants.merchantRefNum }); authReversal.setOptionalFields(new List <string> { CardPaymentsConstants.amount, CardPaymentsConstants.dupCheck }); Request request = new Request( method: RequestType.POST, uri: this.prepareURI("/auths/" + authReversal.authorizationId() + "/voidauths"), body: authReversal ); dynamic response = this.client.processRequest(request); return(new AuthorizationReversal(response)); }