Beispiel #1
0
function readCatalog()
{
    global $messages;
    $readResult = Catalog::readCache();
    $messages = $readResult;
}
Beispiel #2
0
function test_Amender_addRatePlan()
{
    global $EXISTING_CUSTOMER_ACCOUNT_NAME;
    printResultStart(__FUNCTION__);
    $messages = array();
    //Retrieve a productRatePlanId from the catalog
    $prpId;
    try {
        $catalog = Catalog::readCache();
        $prp = $catalog[0]->products[0]->ratePlans[0];
        echo "Previewing AddProduct amendment for customer '" . $EXISTING_CUSTOMER_ACCOUNT_NAME . "' with Product Rate Plan '" . $prp->Name . "' on Product '" . $prp->productName . "' <br>";
        $prpId = $prp->Id;
    } catch (Exception $e) {
        array_push($messages, $e->getMessage());
        printResultEnd($messages);
        return;
    }
    //Test
    try {
        $amRes = Amender::addRatePlan($EXISTING_CUSTOMER_ACCOUNT_NAME, $prpId, null, true);
        print_r_html($amRes);
    } catch (Exception $e) {
        array_push($messages, $e->getMessage());
    }
    printResultEnd($messages);
}