Happpi PHP Library

setPrice()

sets the pricing for a given customer.

Return Type

CurtSimplePricing

Required Parameters

Optional Parameters

    None

Dependencies

    Configuration->$CustomerID
    Configuration->$Key

Example:

<!-- setPrice -->
<?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.
	// make sure you set the required dependencies (customerID and key) in the Configuration file located in the happpi lib folder.
	$simpPricingObj = new CurtSimplePricing(); // create a SimplePricing object with values to pass to setPrice()
	$simpPricingObj->setCust_id("custID here");
	$simpPricingObj->setCustPartID("abc123a");
	$simpPricingObj->setPartID(11000);
	$simpPricingObj->setIsSale(false);
	$Customer->setPrice($simplePricingObj); // pass the $simplePricingObj to the setPrice method to set the price.
?>