diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c96b395
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+node_modules/
+Infusionsoft/examples/
+Infusionsoft/utilities/
+Infusionsoft/admin/
\ No newline at end of file
diff --git a/Infusionsoft/admin/API_Field_Access.xml b/Infusionsoft/admin/API_Field_Access.xml
deleted file mode 100644
index b21932a..0000000
--- a/Infusionsoft/admin/API_Field_Access.xml
+++ /dev/null
@@ -1,1290 +0,0 @@
-
-
-
-
-
- Contact data
- Contact
- LEFT JOIN LeadSource ON Contact.LeadSourceId=LeadSource.Id
-
- Contact.IsUser
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- User data
- Contact
- LEFT JOIN User ON Contact.Id=User.Id
-
- IsUser
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Which campaigns
- Campaignee
- INNER JOIN Campaign ON Campaign.Id=Campaignee.CampaignId
-
-
-
-
-
-
- Active
- Inactive
-
-
-
-
-
-
-
-
-
-
- MarketingPiece
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Lead data
- Opportunity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Lead Stages
-
-
-
-
-
-
-
-
-
- Lead Statuses
-
-
-
-
-
-
-
-
-
- Product/Subscription Interests
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Product/Subscription Interest Bundles
-
-
-
-
-
-
-
-
- Continuity Programs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Products
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Credit Card
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Recurring Order
- JobRecurring
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Recurring Order With Basic Contact Info (no custom fields)
- JobRecurring
- INNER JOIN Contact ON Contact.Id=JobRecurring.ContactId
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Contact.IsUser
- 0
-
-
- INNER JOIN ContactGroup ON ContactGroupAssign.GroupId=ContactGroup.Id
- INNER JOIN Contact ON Contact.Id=ContactGroupAssign.ContactId
- LEFT JOIN LeadSource ON Contact.LeadSourceId=LeadSource.Id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Contact Groups
-
-
-
-
-
-
-
-
-
- Contact Group Categories
-
-
-
-
-
-
-
-
- Lead Sources in the system
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Campaigns in the system
-
-
-
-
-
-
-
-
-
-
- An invoice for a client
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- LEFT JOIN Address ON Job.ShippingAddressId=Address.Id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ContactTemplate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ServiceCall
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Infusionsoft/admin/generate_broken_field_files.php b/Infusionsoft/admin/generate_broken_field_files.php
deleted file mode 100644
index d3dd449..0000000
--- a/Infusionsoft/admin/generate_broken_field_files.php
+++ /dev/null
@@ -1,24 +0,0 @@
- array(
- ),
- '0.9.13' => array(
- ),
- '0.9.12' => array(
- 'Infusionsoft_CProgram' => array('SubCategory')
- ),
-);
-
-//We want a cascading effect. If in version 0.9.6 we remove a field, we want to add it to all previous files, so we
-//start with the latest version, and work our way backwards, always adding any removed fields from a later date to the earlier versions.
-?>
$fields){
- if(!empty($previous_fields)) $fields = array_merge($fields, $previous_fields);
- $file = fopen('remove_field_files/' . $version . "_remove_fields.txt", "w");
- fwrite($file, serialize($fields));
- echo $version . " - " . print_r($fields, true) . " ";
- $previous_fields = $fields;
-}
-?>
-
-
-load($filePath);
- foreach($dom->getElementsByTagName('table') as $table)
- {
- $this->fields[$table->getAttribute('name')] = array();
- foreach($table->getElementsByTagName('field') as $field)
- {
- $this->fields[$table->getAttribute('name')][] = $field->getAttribute('name');
- }
- }
-
- }
-}
-
-class StubGenerator{
- protected $fields = array();
- protected $table;
-
- public function __construct($table, $fields){
- $this->table = $table;
- $this->fields = $fields;
- }
-
- public function write($templatePath, $filePath){
- ?>Writing source for table class: table; ?> fields as $field){
- if($addedAField){
- $source .= ', ';
- }
- $source .= "'" . $field . "'";
- $addedAField = true;
- }
- $source .= ')';
- return $source;
- }
-}
-
-$filePath = dirname(__FILE__) . '/API_Field_Access.xml';
-$fields = new DataServiceTableFields();
-$fields->parseApiFieldAccessXML($filePath);
-
-$tables = array();
-
-foreach($fields->fields as $table=>$fields){
- $stubGenerator = new StubGenerator($table, $fields);
- $stubGenerator->write(dirname(dirname(__FILE__)) . '/generated/a_template_base_class.php', dirname(dirname(__FILE__)) . '/generated/' . $table . '.php');
-
-
- if(!file_exists(dirname(dirname(__FILE__)) . '/' . $table . '.php') || isset($_GET['overwriteUserEditable'])){
- $stubGenerator = new StubGenerator($table, array());
- $stubGenerator->write(dirname(dirname(__FILE__)) . '/generated/a_template_class.php', dirname(dirname(__FILE__)) . '/' . $table . '.php');
- }
-
- $tables[] = $table;
-}
-
-$handle = fopen(dirname(dirname(__FILE__)) . "/examples/object_editor_all_tables.php", "w");
-fwrite($handle, "
-
-Overwrite User Editable Classes (THIS IS FOR SDK DEVELOPERS ONLY!)
-
-
-
-
-
-