/// <summary> /// Get the Settlement /// </summary> /// <param name="settlement">Settlement</param> /// <returns>Settlement</returns> public Settlement get(Settlement settlement) { settlement.setRequiredFields(new List <string> { CardPaymentsConstants.id }); settlement.checkRequiredFields(); Request request = new Request( method: RequestType.GET, uri: this.prepareURI("/settlements/" + settlement.id()) ); dynamic response = this.client.processRequest(request); return(new Settlement(response)); }
/// <summary> /// Cancel Settlement /// </summary> /// <param name="settlement">Settlement</param> /// <returns>Settlement</returns> public Settlement cancelSettlement(Settlement settle) { settle.setRequiredFields(new List <string> { CardPaymentsConstants.id }); settle.checkRequiredFields(); Settlement tmpSettlement = new Settlement(); tmpSettlement.status("CANCELLED"); Request request = new Request( method: RequestType.PUT, uri: this.prepareURI("/settlements/" + settle.id()), body: tmpSettlement ); dynamic response = this.client.processRequest(request); return(new Settlement(response)); }