function onAppInitializedCallback(_client) {
  window.client = _client;
  client.instance.resize({ height: "500px" });
  client.request.get("https://<%= iparam.voucher_api %>", {})
    .then(function (data) {
      // If we successfully get the voucher data, we can proceed to showing that in the UI
      renderVoucherView(data.response);
    })
    .catch(function (error) {
      //Log and notify the agent/user
      console.error(error);
      showNotification("danger", "Unable to get voucher data");
      client.instance.close();
    })
  //Register the click handler for a voucher item
  $(document).on('click', '.fc_voucher', voucherClickHandler);
}
/**
 * Call the voucher API and render the view based on the response
 * @param {*} _client 
 */
Call the voucher API and render the view based on the response
@param {*} _client
Call the voucher API and render the view based on the response @param { * } _client
function onAppInitializedCallback(_client) {
  window.client = _client;
  client.instance.resize({ height: "500px" });
  client.request.get("https://<%= iparam.voucher_api %>", {})
    .then(function (data) {
      renderVoucherView(data.response);
    })
    .catch(function (error) {
      console.error(error);
      showNotification("danger", "Unable to get voucher data");
      client.instance.close();
    })
  $(document).on('click', '.fc_voucher', voucherClickHandler);
}
function onAppInitializedCallback ( _client ) { window . client = _client ; client . instance . resize ( { height : "500px" } ) ; client . request . get ( "https://<%= iparam.voucher_api %>" , { } ) . then ( function ( data ) { renderVoucherView ( data . response ) ; } ) . catch ( function ( error ) { console . error ( error ) ; showNotification ( "danger" , "Unable to get voucher data" ) ; client . instance . close ( ) ; } ) $ ( document ) . on ( 'click' , '.fc_voucher' , voucherClickHandler ) ; }
Call the voucher API and render the view based on the response
 @param {*} _client
Call the voucher API and render the view based on the response @param { * } _client
// If we successfully get the voucher data, we can proceed to showing that in the UI //Log and notify the agent/user //Register the click handler for a voucher item