public Dictionary <string, object> RollBack(Dictionary <string, object> Input) { Dictionary <string, object> Output = new Dictionary <string, object>(); string vchr = (string)Input["Voucher"]; var msg = VoucherClient.UnRedeeemVoucher(vchr); Output.Add("VoucherMessage", msg); return(Output); }
public void RollBack() { if (!Input.ContainsKey("Voucher")) { throw new ArgumentException("Voucher not passed"); } string vchr = (string)Input["Voucher"]; var msg = VoucherClient.UnRedeeemVoucher(vchr); Output.Add("VoucherMessage", msg); }
public void Execute() { if (!Input.ContainsKey("Voucher")) { throw new ArgumentException("Voucher not passed"); } if (!Input.ContainsKey("OrderNumber")) { throw new ArgumentException("OrderNumber not passed"); } if (!Input.ContainsKey("CustomerKey")) { throw new ArgumentException("CustomerKey not passed"); } string vchr = (string)Input["Voucher"]; string customerkey = (string)Input["CustomerKey"]; var msg = VoucherClient.RedeeemVoucher(vchr); Output.Add("VoucherMessage", msg); _logger.LogInformation(msg); }
public Dictionary <string, object> Execute(Dictionary <string, object> Input) { Dictionary <string, object> Output = new Dictionary <string, object>(); if (!Input.ContainsKey("Voucher")) { throw new ArgumentException("Voucher not passed"); } if (!Input.ContainsKey("OrderNumber")) { throw new ArgumentException("OrderNumber not passed"); } if (!Input.ContainsKey("CustomerKey")) { throw new ArgumentException("CustomerKey not passed"); } string vchr = (string)Input["Voucher"]; string customerkey = (string)Input["CustomerKey"]; var msg = VoucherClient.RedeeemVoucher(vchr); Output.Add("VoucherMessage", msg); _logger.LogInformation(msg); return(Output); }