Happpi PHP Library

getPricing()

gets the pricing given a specific customer.

Return Type

Array of type: CurtSimplePricing

Required Parameters

    None

Optional Parameters

    None

Dependencies

    Configuration->$CustomerID
    Configuration->$Key

Example:


<!-- getPricing() -->
<?php
	require_once('libraries/happpi/LoadAll.php'); // points to the LoadAll.php file for loading the library.

	// once the library is required, you can now use one of the main "interaction" classes.
	// These interaction classes contain methods that get information from our REST API and
	// converts them to PHP objects for you to use.
	$Customer = new CurtCustomer(); // create a new customer object to gain access to its functions.
	// two required dependencies need to be set in the Configuration file located in the
	// happpi lib folder: CustomerID and Key
	$pricing = $Customer->getPricing(); // call getPricing() to return an array of SimplePricing objects.
	echo "<h2>Pricing:</h2>";
	foreach($pricing as $simpPrice){ // step through each SimplePricing object
		echo $simpPrice->getPartID(); // display each PartID
		echo ",";
		echo $simpPrice->getPrice(); // display each price
		echo "<br />";
	}
?>