private Request SettlementInternal(Settlement settle) { settle.SetRequiredFields(new List <string> { GlobalConstants.AuthorizationId }); settle.CheckRequiredFields(); settle.SetRequiredFields(new List <string> { GlobalConstants.MerchantRefNum }); settle.SetOptionalFields(new List <string> { GlobalConstants.Amount, GlobalConstants.DupCheck }); return(new Request( method: RequestType.Post, uri: PrepareUri("/auths/" + settle.AuthorizationId() + "/settlements"), body: settle )); }
/// <summary> /// Settlement /// </summary> /// <param name="settlement">Settlement</param> /// <returns>Settlement</returns> public Settlement Settlement(Settlement settle) { settle.SetRequiredFields(new List <string> { GlobalConstants.AuthorizationId }); settle.CheckRequiredFields(); settle.SetRequiredFields(new List <string> { GlobalConstants.MerchantRefNum }); settle.SetOptionalFields(new List <string> { GlobalConstants.Amount, GlobalConstants.DupCheck }); Request request = new Request( method: RequestType.Post, uri: PrepareUri("/auths/" + settle.AuthorizationId() + "/settlements"), body: settle ); dynamic response = _client.ProcessRequest(request); return(new Settlement(response)); }