-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of [email protected]:novaksolutions/infusionsoft-p…
…hp-sdk.git
- Loading branch information
Showing
9 changed files
with
297 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: joey | ||
* Date: 3/31/14 | ||
* Time: 8:04 AM | ||
*/ | ||
|
||
class Infusionsoft_EmailSent extends Infusionsoft_Generated_Base { | ||
protected static $tableFields = array( | ||
"Id", | ||
"ContactId", | ||
"FirstName", | ||
"LastName", | ||
"Email", | ||
"BatchId", | ||
"Sent", | ||
"BounceType", | ||
"Bounced", | ||
"Opened", | ||
"Clicked", | ||
"LinkClickedId", | ||
"LinkClicked", | ||
"Opted", | ||
"OptType", | ||
"OptNotes" | ||
); | ||
|
||
public function __construct($idString = null, $app = null){ | ||
$this->table = 'EmailSent'; | ||
} | ||
|
||
public function getFields(){ | ||
return self::$tableFields; | ||
} | ||
|
||
public function save() { | ||
throw new Infusionsoft_Exception("EmailSent cannot be saved since they are loaded from a saved search, and not accessible via the Data Service"); | ||
} | ||
|
||
public function loadFromArray($data){ | ||
parent::loadFromArray($data, true); | ||
$this->Id = $data['EmailSentId']; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* Created by JetBrains PhpStorm. | ||
* User: prescott | ||
* Date: 5/13/13 | ||
* Time: 11:22 AM | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
|
||
|
||
class Infusionsoft_SavedSearchDataService extends Infusionsoft_Service { | ||
public static function queryWithOrderBy($object, $queryData, $orderByField = null, $ascending = true, $limit = 1000, $page = 0, $returnFields = false, Infusionsoft_App $app = null){ | ||
$results = array(); | ||
|
||
$Settings = ClassRegistry::init("Settings.Setting"); | ||
$savedSearchId = $Settings->getValue(get_class($object) . '.SavedSearchId'); | ||
if($savedSearchId == ''){ | ||
throw new Exception("Saved Search Id For Object: " . get_class($object) . ' not set in settings, please set the setting: ' . get_class($object) . '.SavedSearchId' . ' to the saved search id'); | ||
} | ||
|
||
$userId = $Settings->getValue('SavedSearchUserId'); | ||
if($userId == ''){ | ||
throw new Exception("Saved Search UserId not set, please set the setting: " . 'SavedSearchUserId' . ' to a valid Infusionsoft UserId.'); | ||
} | ||
|
||
$rows = Infusionsoft_SearchService::getSavedSearchResultsAllFields($savedSearchId, $userId, $page); | ||
$className = get_class($object); | ||
foreach($rows as $row){ | ||
/** | ||
* @var Infusionsoft_Generated_Base $dataObject | ||
*/ | ||
$dataObject = new $className(); | ||
$dataObject->loadFromArray($row, true); | ||
$results[] = $dataObject; | ||
} | ||
|
||
return $results; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
class Infusionsoft_ShippingService extends Infusionsoft_ShippingServiceBase{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?php | ||
class Infusionsoft_ShippingServiceBase extends Infusionsoft_Service{ | ||
|
||
public static function getAllShippingOptions(Infusionsoft_App $app = null){ | ||
$params = array( | ||
); | ||
|
||
return parent::send($app, "ShippingService.getAllShippingOptions", $params); | ||
} | ||
|
||
public static function getAllConfiguredShippingOptions(Infusionsoft_App $app = null){ | ||
$params = array( | ||
); | ||
|
||
return parent::send($app, "ShippingService.getAllShippingOptions", $params); | ||
} | ||
|
||
public static function getFlatRateShippingOption($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getFlatRateShippingOption", $params); | ||
} | ||
|
||
public static function getOrderTotalShippingOption($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getOrderTotalShippingOption", $params); | ||
} | ||
|
||
public static function getOrderTotalShippingRanges($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getOrderTotalShippingRanges", $params); | ||
} | ||
|
||
public static function getProductBasedShippingOption($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getProductBasedShippingOption", $params); | ||
} | ||
|
||
public static function getProductShippingPricesForProductShippingOption($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getProductShippingPricesForProductShippingOption", $params); | ||
} | ||
|
||
public static function getOrderQuantityShippingOption($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getOrderQuantityShippingOption", $params); | ||
} | ||
|
||
public static function getWeightBasedShippingOption($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getWeightBasedShippingOption", $params); | ||
} | ||
|
||
public static function getWeightBasedShippingRanges($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getWeightBasedShippingRanges", $params); | ||
} | ||
|
||
public static function getUpsShippingOption($optionId, Infusionsoft_App $app = null){ | ||
$params = array( | ||
(int) $optionId | ||
); | ||
|
||
return parent::send($app, "ShippingService.getUpsShippingOption", $params); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.