PHP code example of networkrailbusinesssystems / oracle-api

1. Go to this page and download the library: Download networkrailbusinesssystems/oracle-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

networkrailbusinesssystems / oracle-api example snippets


use NetworkRailBusinessSystems\OracleApi\OracleCatalogueHelper;

$response = OracleCatalogueHelper::search('016798 or FENCE', limit = 100); // search by item code or description 
$response = OracleCatalogueHelper::searchByCode('0004/016798', limit = 100); // search by item code 
$response = OracleCatalogueHelper::searchByDescription('FENCE', limit = 100);  // search by item description

use NetworkRailBusinessSystems\OracleApi\OracleCatalogueHelper;

$oracle_order_number = OracleCatalogueHelper::submitOrderToOracle($orderDetails);

Http::fake([
    '*' => Http::response([
            "ItemCode" => "0004/016798",
            "ItemDescription" => "POST FENCE  INTERMDT 6 HOLE",
            "ItemYourPrice" => 50.95,
            "Status" => "NR SUPER",
            "PackSize" => "1",
            "IBECustomAttribute15" => null,
            "ConfigurableItem" => null,
            "ItemPrimaryUOMCode" => null,
            "MiniSiteName" => "Non-Heavy Products"
    ]),
]);