public TotalsResponse Totals()
 {
     if (_configured)
     {
         try
         {
             TotalsResponse response = new TotalsResponse(TransbankWrap.get_totals());
             if (response.Success)
             {
                 return(response);
             }
             else
             {
                 throw new TransbankGetTotalsException("Get Totals retured an error: " + response.ResponseMessage, response);
             }
         }
         catch (TransbankGetTotalsException)
         {
             throw;
         }
         catch (Exception e)
         {
             throw new TransbankException("Unable to get totals in POS", e);
         }
     }
     else
     {
         throw new TransbankException("Port not Configured");
     }
 }
 private void getTotalsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         TotalsResponse response = POS.Instance.Totals();
         if (response.Success)
         {
             MessageBox.Show(response.ToString(), "Totals obtained Successfully.");
         }
     }
     catch (TransbankException a)
     {
         MessageBox.Show(a.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 public TransbankGetTotalsException(string message, TotalsResponse response) : base(message)
 {
     GetTotalsResponse = response;
 }