private Dictionary <string, object> GetQuickbooksFieldValues(object instance, Type t)
        {
            Dictionary <string, object> properties = new Dictionary <string, object>();

            PropertyInfo[] props = t.GetProperties();

            foreach (PropertyInfo prop in props)
            {
                object[] attrs = prop.GetCustomAttributes(true);

                foreach (object attr in attrs)
                {
                    QuickbooksField authAttr = attr as QuickbooksField;

                    if (authAttr != null)
                    {
                        string propName = prop.Name;
                        object value    = prop.GetValue(instance);
                        properties.Add(authAttr.GetName(), value);
                    }
                }
            }

            return(properties);
        }
        private Dictionary <string, PropertyInfo> GetQuickbooksFieldProperties(Type t)
        {
            Dictionary <string, PropertyInfo> properties = new Dictionary <string, PropertyInfo>();

            PropertyInfo[] props = t.GetProperties();

            foreach (PropertyInfo prop in props)
            {
                object[] attrs = prop.GetCustomAttributes(true);

                foreach (object attr in attrs)
                {
                    QuickbooksField authAttr = attr as QuickbooksField;

                    if (authAttr != null)
                    {
                        properties.Add(authAttr.GetName(), prop);
                    }
                }
            }

            return(properties);
        }