@@ -4,93 +4,93 @@  | 
                                                    ||
| 4 | 4 | |
| 5 | 5 | class Arraybuilder  | 
                                                        
| 6 | 6 |  { | 
                                                        
| 7 | - public $search;  | 
                                                        |
| 8 | - public $location;  | 
                                                        |
| 7 | + public $search;  | 
                                                        |
| 8 | + public $location;  | 
                                                        |
| 9 | 9 | |
| 10 | - public function __construct()  | 
                                                        |
| 11 | -	{ | 
                                                        |
| 12 | -		$config = include('config/config.php'); | 
                                                        |
| 10 | + public function __construct()  | 
                                                        |
| 11 | +        { | 
                                                        |
| 12 | +                $config = include('config/config.php'); | 
                                                        |
| 13 | 13 | $this->location = $config->location;  | 
                                                        
| 14 | 14 | |
| 15 | - }  | 
                                                        |
| 15 | + }  | 
                                                        |
| 16 | 16 | |
| 17 | - public function setSizeSearch($size)  | 
                                                        |
| 18 | -    { | 
                                                        |
| 19 | - $this->search = array(  | 
                                                        |
| 20 | - 'locationNumber' => $this->location,  | 
                                                        |
| 21 | - 'criteria' => array(  | 
                                                        |
| 22 | - 'entry' => array(  | 
                                                        |
| 23 | - 'key'=> 'Size',  | 
                                                        |
| 24 | - 'value'=>$size  | 
                                                        |
| 25 | - )  | 
                                                        |
| 26 | - ),  | 
                                                        |
| 27 | - 'options' => array(  | 
                                                        |
| 28 | - 'price' => array(  | 
                                                        |
| 29 | - 'cost'=>'1',  | 
                                                        |
| 30 | - 'retail'=>'1'  | 
                                                        |
| 31 | - ),  | 
                                                        |
| 32 | - 'availability' => array(  | 
                                                        |
| 33 | - 'local'=>'1'  | 
                                                        |
| 34 | - ),  | 
                                                        |
| 35 | - 'productSpec'=> array(  | 
                                                        |
| 36 | - 'entry'=> array(  | 
                                                        |
| 37 | - 'key'=>'SpeedRating'  | 
                                                        |
| 38 | - ),  | 
                                                        |
| 39 | - 'entry'=> array(  | 
                                                        |
| 40 | - 'key'=>'TemperatureRating'  | 
                                                        |
| 41 | - )  | 
                                                        |
| 42 | - ),  | 
                                                        |
| 43 | - 'includeRebates'=>'1'  | 
                                                        |
| 44 | - )  | 
                                                        |
| 45 | - );  | 
                                                        |
| 17 | + public function setSizeSearch($size)  | 
                                                        |
| 18 | +        { | 
                                                        |
| 19 | + $this->search = array(  | 
                                                        |
| 20 | + 'locationNumber' => $this->location,  | 
                                                        |
| 21 | + 'criteria' => array(  | 
                                                        |
| 22 | + 'entry' => array(  | 
                                                        |
| 23 | + 'key'=> 'Size',  | 
                                                        |
| 24 | + 'value'=>$size  | 
                                                        |
| 25 | + )  | 
                                                        |
| 26 | + ),  | 
                                                        |
| 27 | + 'options' => array(  | 
                                                        |
| 28 | + 'price' => array(  | 
                                                        |
| 29 | + 'cost'=>'1',  | 
                                                        |
| 30 | + 'retail'=>'1'  | 
                                                        |
| 31 | + ),  | 
                                                        |
| 32 | + 'availability' => array(  | 
                                                        |
| 33 | + 'local'=>'1'  | 
                                                        |
| 34 | + ),  | 
                                                        |
| 35 | + 'productSpec'=> array(  | 
                                                        |
| 36 | + 'entry'=> array(  | 
                                                        |
| 37 | + 'key'=>'SpeedRating'  | 
                                                        |
| 38 | + ),  | 
                                                        |
| 39 | + 'entry'=> array(  | 
                                                        |
| 40 | + 'key'=>'TemperatureRating'  | 
                                                        |
| 41 | + )  | 
                                                        |
| 42 | + ),  | 
                                                        |
| 43 | + 'includeRebates'=>'1'  | 
                                                        |
| 44 | + )  | 
                                                        |
| 45 | + );  | 
                                                        |
| 46 | 46 | return $this->search;  | 
                                                        
| 47 | - }  | 
                                                        |
| 47 | + }  | 
                                                        |
| 48 | 48 | |
| 49 | - public function setKeywordSearch($word)  | 
                                                        |
| 50 | -    { | 
                                                        |
| 51 | - $this->search = array(  | 
                                                        |
| 52 | - 'locationNumber' => $this->location,  | 
                                                        |
| 53 | - 'keywords' => $word,  | 
                                                        |
| 54 | - 'options' => array(  | 
                                                        |
| 55 | - 'images' => array(  | 
                                                        |
| 56 | - 'thumbnail'=>'1',  | 
                                                        |
| 57 | - 'small'=> '1',  | 
                                                        |
| 58 | - 'large'=> '1',  | 
                                                        |
| 59 | - )  | 
                                                        |
| 60 | - )  | 
                                                        |
| 61 | - );  | 
                                                        |
| 49 | + public function setKeywordSearch($word)  | 
                                                        |
| 50 | +        { | 
                                                        |
| 51 | + $this->search = array(  | 
                                                        |
| 52 | + 'locationNumber' => $this->location,  | 
                                                        |
| 53 | + 'keywords' => $word,  | 
                                                        |
| 54 | + 'options' => array(  | 
                                                        |
| 55 | + 'images' => array(  | 
                                                        |
| 56 | + 'thumbnail'=>'1',  | 
                                                        |
| 57 | + 'small'=> '1',  | 
                                                        |
| 58 | + 'large'=> '1',  | 
                                                        |
| 59 | + )  | 
                                                        |
| 60 | + )  | 
                                                        |
| 61 | + );  | 
                                                        |
| 62 | 62 | return $this->search;  | 
                                                        
| 63 | - }  | 
                                                        |
| 63 | + }  | 
                                                        |
| 64 | 64 | |
| 65 | - public function setATDProductNumber($number)  | 
                                                        |
| 66 | -    { | 
                                                        |
| 67 | - $this->search = array(  | 
                                                        |
| 68 | - 'locationNumber' => $this->location,  | 
                                                        |
| 69 | - 'criteria' => array(  | 
                                                        |
| 70 | - 'entry'=>array(  | 
                                                        |
| 71 | - 'key'=>'ATDProductNumber',  | 
                                                        |
| 72 | - 'value'=>$number  | 
                                                        |
| 73 | - )  | 
                                                        |
| 74 | - ),  | 
                                                        |
| 75 | - 'options' => array(  | 
                                                        |
| 76 | - 'images' => array(  | 
                                                        |
| 77 | - 'thumbnail'=> '1',  | 
                                                        |
| 78 | - 'small' => '1',  | 
                                                        |
| 79 | - 'large' => '1'  | 
                                                        |
| 80 | - )  | 
                                                        |
| 81 | - ),  | 
                                                        |
| 82 | - 'productSpec'=> array(  | 
                                                        |
| 83 | - 'entry'=> array(  | 
                                                        |
| 84 | - 'key'=>'SpeedRating'  | 
                                                        |
| 85 | - ),  | 
                                                        |
| 86 | - 'entry'=> array(  | 
                                                        |
| 87 | - 'key'=>'TemperatureRating'  | 
                                                        |
| 88 | - )  | 
                                                        |
| 89 | - )  | 
                                                        |
| 65 | + public function setATDProductNumber($number)  | 
                                                        |
| 66 | +        { | 
                                                        |
| 67 | + $this->search = array(  | 
                                                        |
| 68 | + 'locationNumber' => $this->location,  | 
                                                        |
| 69 | + 'criteria' => array(  | 
                                                        |
| 70 | + 'entry'=>array(  | 
                                                        |
| 71 | + 'key'=>'ATDProductNumber',  | 
                                                        |
| 72 | + 'value'=>$number  | 
                                                        |
| 73 | + )  | 
                                                        |
| 74 | + ),  | 
                                                        |
| 75 | + 'options' => array(  | 
                                                        |
| 76 | + 'images' => array(  | 
                                                        |
| 77 | + 'thumbnail'=> '1',  | 
                                                        |
| 78 | + 'small' => '1',  | 
                                                        |
| 79 | + 'large' => '1'  | 
                                                        |
| 80 | + )  | 
                                                        |
| 81 | + ),  | 
                                                        |
| 82 | + 'productSpec'=> array(  | 
                                                        |
| 83 | + 'entry'=> array(  | 
                                                        |
| 84 | + 'key'=>'SpeedRating'  | 
                                                        |
| 85 | + ),  | 
                                                        |
| 86 | + 'entry'=> array(  | 
                                                        |
| 87 | + 'key'=>'TemperatureRating'  | 
                                                        |
| 88 | + )  | 
                                                        |
| 89 | + )  | 
                                                        |
| 90 | 90 | |
| 91 | - );  | 
                                                        |
| 91 | + );  | 
                                                        |
| 92 | 92 | return $this->search;  | 
                                                        
| 93 | - }  | 
                                                        |
| 93 | + }  | 
                                                        |
| 94 | 94 | |
| 95 | 95 | |
| 96 | 96 | }  | 
                                                        
| 97 | 97 | \ No newline at end of file  | 
                                                        
@@ -8,26 +8,26 @@ discard block  | 
                                                    ||
| 8 | 8 | class Atdconnect  | 
                                                        
| 9 | 9 |  { | 
                                                        
| 10 | 10 | |
| 11 | - private $wsshead;  | 
                                                        |
| 12 | - protected $location;  | 
                                                        |
| 13 | - private $statuswsdl = 'https://testws.atdconnect.com/ws/3_4/orderStatus.wsdl';  | 
                                                        |
| 14 | - private $brandwsdl = 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl';  | 
                                                        |
| 15 | - private $locationwsdl = 'https://testws.atdconnect.com/ws/3_4/locations.wsdl';  | 
                                                        |
| 16 | - private $productwsdl = 'https://testws.atdconnect.com/ws/3_4/products.wsdl';  | 
                                                        |
| 17 | - private $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';  | 
                                                        |
| 11 | + private $wsshead;  | 
                                                        |
| 12 | + protected $location;  | 
                                                        |
| 13 | + private $statuswsdl = 'https://testws.atdconnect.com/ws/3_4/orderStatus.wsdl';  | 
                                                        |
| 14 | + private $brandwsdl = 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl';  | 
                                                        |
| 15 | + private $locationwsdl = 'https://testws.atdconnect.com/ws/3_4/locations.wsdl';  | 
                                                        |
| 16 | + private $productwsdl = 'https://testws.atdconnect.com/ws/3_4/products.wsdl';  | 
                                                        |
| 17 | + private $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';  | 
                                                        |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | - public function __construct()  | 
                                                        |
| 23 | -    { | 
                                                        |
| 22 | + public function __construct()  | 
                                                        |
| 23 | +        { | 
                                                        |
| 24 | 24 |          $config = include('config/config.php'); | 
                                                        
| 25 | 25 | $this->wsshead = $this->getWSSHeader($config->user, $config->pass, $config->client);  | 
                                                        
| 26 | 26 | $this->location = $config->location;  | 
                                                        
| 27 | - }  | 
                                                        |
| 27 | + }  | 
                                                        |
| 28 | 28 | |
| 29 | - public function getWSSHeader($user, $pass, $client)  | 
                                                        |
| 30 | -    { | 
                                                        |
| 29 | + public function getWSSHeader($user, $pass, $client)  | 
                                                        |
| 30 | +        { | 
                                                        |
| 31 | 31 | $xml = '  | 
                                                        
| 32 | 32 | <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">  | 
                                                        
| 33 | 33 | <wsse:UsernameToken atd:clientId="' . $client . '" xmlns:atd="http://api.atdconnect.com/atd">  | 
                                                        
@@ -38,132 +38,132 @@ discard block  | 
                                                    ||
| 38 | 38 | ';  | 
                                                        
| 39 | 39 | |
| 40 | 40 |          return new \SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', new \SoapVar($xml, XSD_ANYXML), true); | 
                                                        
| 41 | - }  | 
                                                        |
| 41 | + }  | 
                                                        |
| 42 | 42 | |
| 43 | - public function apiCall($call,$query,$service)  | 
                                                        |
| 44 | -    { | 
                                                        |
| 43 | + public function apiCall($call,$query,$service)  | 
                                                        |
| 44 | +        { | 
                                                        |
| 45 | 45 | $client = new \SoapClient($service);  | 
                                                        
| 46 | 46 | $client->__setSoapHeaders($this->wsshead);  | 
                                                        
| 47 | 47 | $response = $client->$call($query);  | 
                                                        
| 48 | 48 | return $response;  | 
                                                        
| 49 | - }  | 
                                                        |
| 49 | + }  | 
                                                        |
| 50 | 50 | |
| 51 | - public function setLocation($location)  | 
                                                        |
| 52 | -    { | 
                                                        |
| 53 | - $this->location = $location;  | 
                                                        |
| 51 | + public function setLocation($location)  | 
                                                        |
| 52 | +        { | 
                                                        |
| 53 | + $this->location = $location;  | 
                                                        |
| 54 | 54 | return $this->location;  | 
                                                        
| 55 | - }  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | - public function getLocation()  | 
                                                        |
| 58 | -    { | 
                                                        |
| 59 | - return $this->location;  | 
                                                        |
| 60 | - }  | 
                                                        |
| 61 | -  | 
                                                        |
| 62 | - public function setKeywordSearch($word)  | 
                                                        |
| 63 | -    { | 
                                                        |
| 64 | - $search = new Arraybuilder();  | 
                                                        |
| 65 | - return $search->setKeywordSearch($word);  | 
                                                        |
| 66 | - }  | 
                                                        |
| 67 | -  | 
                                                        |
| 68 | - public function setATDProductNumber($number)  | 
                                                        |
| 69 | -    { | 
                                                        |
| 70 | - $search = new Arraybuilder();  | 
                                                        |
| 71 | - return $search->setATDProductNumber($number);  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | -  | 
                                                        |
| 74 | -  | 
                                                        |
| 75 | - public function setSizeSearch($size)  | 
                                                        |
| 76 | -    { | 
                                                        |
| 77 | - $search = new Arraybuilder();  | 
                                                        |
| 78 | - return $search->setSizeSearch($size);  | 
                                                        |
| 79 | - }  | 
                                                        |
| 55 | + }  | 
                                                        |
| 56 | +  | 
                                                        |
| 57 | + public function getLocation()  | 
                                                        |
| 58 | +        { | 
                                                        |
| 59 | + return $this->location;  | 
                                                        |
| 60 | + }  | 
                                                        |
| 61 | +  | 
                                                        |
| 62 | + public function setKeywordSearch($word)  | 
                                                        |
| 63 | +        { | 
                                                        |
| 64 | + $search = new Arraybuilder();  | 
                                                        |
| 65 | + return $search->setKeywordSearch($word);  | 
                                                        |
| 66 | + }  | 
                                                        |
| 67 | +  | 
                                                        |
| 68 | + public function setATDProductNumber($number)  | 
                                                        |
| 69 | +        { | 
                                                        |
| 70 | + $search = new Arraybuilder();  | 
                                                        |
| 71 | + return $search->setATDProductNumber($number);  | 
                                                        |
| 72 | + }  | 
                                                        |
| 73 | +  | 
                                                        |
| 74 | +  | 
                                                        |
| 75 | + public function setSizeSearch($size)  | 
                                                        |
| 76 | +        { | 
                                                        |
| 77 | + $search = new Arraybuilder();  | 
                                                        |
| 78 | + return $search->setSizeSearch($size);  | 
                                                        |
| 79 | + }  | 
                                                        |
| 80 | 80 | |
| 81 | 81 | |
| 82 | - //************************************************  | 
                                                        |
| 83 | - // Location Service  | 
                                                        |
| 84 | - //************************************************  | 
                                                        |
| 82 | + //************************************************  | 
                                                        |
| 83 | + // Location Service  | 
                                                        |
| 84 | + //************************************************  | 
                                                        |
| 85 | 85 | |
| 86 | - public function getLocationByCriteria()  | 
                                                        |
| 87 | -    { | 
                                                        |
| 86 | + public function getLocationByCriteria()  | 
                                                        |
| 87 | +        { | 
                                                        |
| 88 | 88 |          return $this->apiCall('getLocationByCriteria','',$this->locationwsdl); | 
                                                        
| 89 | - }  | 
                                                        |
| 89 | + }  | 
                                                        |
| 90 | 90 | |
| 91 | - public function getLocationCutoffTimes()  | 
                                                        |
| 92 | -    { | 
                                                        |
| 91 | + public function getLocationCutoffTimes()  | 
                                                        |
| 92 | +        { | 
                                                        |
| 93 | 93 |          return $this->apiCall('getLocationCutoffTimes',['location' => $this->location],$this->locationwsdl); | 
                                                        
| 94 | - }  | 
                                                        |
| 94 | + }  | 
                                                        |
| 95 | 95 | |
| 96 | - public function getDistributionCenter($dc = '059')  | 
                                                        |
| 97 | -    { | 
                                                        |
| 96 | + public function getDistributionCenter($dc = '059')  | 
                                                        |
| 97 | +        { | 
                                                        |
| 98 | 98 |          return $this->apiCall('getDistributionCenter',array('servicingDC' => $dc),$this->locationwsdl); | 
                                                        
| 99 | - }  | 
                                                        |
| 99 | + }  | 
                                                        |
| 100 | 100 | |
| 101 | 101 | |
| 102 | - //************************************************  | 
                                                        |
| 103 | - // Brand Styles Service  | 
                                                        |
| 104 | - //************************************************  | 
                                                        |
| 102 | + //************************************************  | 
                                                        |
| 103 | + // Brand Styles Service  | 
                                                        |
| 104 | + //************************************************  | 
                                                        |
| 105 | 105 | |
| 106 | 106 | |
| 107 | - public function getBrand($product = null)  | 
                                                        |
| 108 | -    { | 
                                                        |
| 109 | -    	return $this->apiCall('getBrand',array('locationNumber' => $this->location,'productGroup' => $product),$this->brandwsdl); | 
                                                        |
| 110 | - }  | 
                                                        |
| 107 | + public function getBrand($product = null)  | 
                                                        |
| 108 | +        { | 
                                                        |
| 109 | +                return $this->apiCall('getBrand',array('locationNumber' => $this->location,'productGroup' => $product),$this->brandwsdl); | 
                                                        |
| 110 | + }  | 
                                                        |
| 111 | 111 | |
| 112 | - public function getStyle($brand = null)  | 
                                                        |
| 113 | -    { | 
                                                        |
| 114 | -    	return $this->apiCall('getStyle',array('locationNumber' => $this->location,'brand' => $brand),$this->brandwsdl); | 
                                                        |
| 115 | - }  | 
                                                        |
| 112 | + public function getStyle($brand = null)  | 
                                                        |
| 113 | +        { | 
                                                        |
| 114 | +                return $this->apiCall('getStyle',array('locationNumber' => $this->location,'brand' => $brand),$this->brandwsdl); | 
                                                        |
| 115 | + }  | 
                                                        |
| 116 | 116 | |
| 117 | 117 | |
| 118 | - //************************************************  | 
                                                        |
| 119 | - // Products Service  | 
                                                        |
| 120 | - //************************************************  | 
                                                        |
| 118 | + //************************************************  | 
                                                        |
| 119 | + // Products Service  | 
                                                        |
| 120 | + //************************************************  | 
                                                        |
| 121 | 121 | |
| 122 | 122 | |
| 123 | 123 | |
| 124 | 124 | |
| 125 | - public function getProdBrand($product = null)  | 
                                                        |
| 126 | -    { | 
                                                        |
| 127 | -    	return $this->apiCall('getProdBrand',array('locationNumber' => $this->location,'productGroup' => $product),$this->productwsdl); | 
                                                        |
| 128 | - }  | 
                                                        |
| 125 | + public function getProdBrand($product = null)  | 
                                                        |
| 126 | +        { | 
                                                        |
| 127 | +                return $this->apiCall('getProdBrand',array('locationNumber' => $this->location,'productGroup' => $product),$this->productwsdl); | 
                                                        |
| 128 | + }  | 
                                                        |
| 129 | 129 | |
| 130 | - public function getProductByCriteria($search)  | 
                                                        |
| 131 | -    { | 
                                                        |
| 130 | + public function getProductByCriteria($search)  | 
                                                        |
| 131 | +        { | 
                                                        |
| 132 | 132 |          return $this->apiCall('getProductByCriteria',$search,$this->productwsdl); | 
                                                        
| 133 | - }  | 
                                                        |
| 133 | + }  | 
                                                        |
| 134 | 134 | |
| 135 | - public function getProductByKeyword($search)  | 
                                                        |
| 136 | -    { | 
                                                        |
| 135 | + public function getProductByKeyword($search)  | 
                                                        |
| 136 | +        { | 
                                                        |
| 137 | 137 |          return $this->apiCall('getProductByKeyword',$search,$this->productwsdl); | 
                                                        
| 138 | - }  | 
                                                        |
| 138 | + }  | 
                                                        |
| 139 | 139 | |
| 140 | - //************************************************  | 
                                                        |
| 141 | - // Order Service  | 
                                                        |
| 142 | - //************************************************  | 
                                                        |
| 140 | + //************************************************  | 
                                                        |
| 141 | + // Order Service  | 
                                                        |
| 142 | + //************************************************  | 
                                                        |
| 143 | 143 | |
| 144 | - public function placeOrder($order)  | 
                                                        |
| 145 | -    { | 
                                                        |
| 144 | + public function placeOrder($order)  | 
                                                        |
| 145 | +        { | 
                                                        |
| 146 | 146 |          return $this->apiCall('placeOrder',$order,$this->orderwsdl); | 
                                                        
| 147 | - }  | 
                                                        |
| 147 | + }  | 
                                                        |
| 148 | 148 | |
| 149 | - public function previewOrder($order)  | 
                                                        |
| 150 | -    { | 
                                                        |
| 149 | + public function previewOrder($order)  | 
                                                        |
| 150 | +        { | 
                                                        |
| 151 | 151 |          return $this->apiCall('previewOrder',$order,$this->orderwsdl); | 
                                                        
| 152 | - }  | 
                                                        |
| 152 | + }  | 
                                                        |
| 153 | 153 | |
| 154 | - //************************************************  | 
                                                        |
| 155 | - // Order Status Service  | 
                                                        |
| 156 | - //************************************************  | 
                                                        |
| 154 | + //************************************************  | 
                                                        |
| 155 | + // Order Status Service  | 
                                                        |
| 156 | + //************************************************  | 
                                                        |
| 157 | 157 | |
| 158 | - public function getOrderDetail($status)  | 
                                                        |
| 159 | -    { | 
                                                        |
| 158 | + public function getOrderDetail($status)  | 
                                                        |
| 159 | +        { | 
                                                        |
| 160 | 160 |          return $this->apiCall('getOrderDetail',$status,$this->statuswsdl); | 
                                                        
| 161 | - }  | 
                                                        |
| 161 | + }  | 
                                                        |
| 162 | 162 | |
| 163 | - public function getOrderStatusByCriteria($criteria)  | 
                                                        |
| 164 | -    { | 
                                                        |
| 163 | + public function getOrderStatusByCriteria($criteria)  | 
                                                        |
| 164 | +        { | 
                                                        |
| 165 | 165 |          return $this->apiCall('getOrderStatusByCriteria',$status,$this->statuswsdl); | 
                                                        
| 166 | - }  | 
                                                        |
| 166 | + }  | 
                                                        |
| 167 | 167 | |
| 168 | 168 | |
| 169 | 169 | |
@@ -14,7 +14,7 @@ discard block  | 
                                                    ||
| 14 | 14 | private $brandwsdl = 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl';  | 
                                                        
| 15 | 15 | private $locationwsdl = 'https://testws.atdconnect.com/ws/3_4/locations.wsdl';  | 
                                                        
| 16 | 16 | private $productwsdl = 'https://testws.atdconnect.com/ws/3_4/products.wsdl';  | 
                                                        
| 17 | - private $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';  | 
                                                        |
| 17 | + private $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';  | 
                                                        |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | |
@@ -30,9 +30,9 @@ discard block  | 
                                                    ||
| 30 | 30 |      { | 
                                                        
| 31 | 31 | $xml = '  | 
                                                        
| 32 | 32 | <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">  | 
                                                        
| 33 | - <wsse:UsernameToken atd:clientId="' . $client . '" xmlns:atd="http://api.atdconnect.com/atd">  | 
                                                        |
| 34 | - <wsse:Username>' . $user . '</wsse:Username>  | 
                                                        |
| 35 | - <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $pass . '</wsse:Password>  | 
                                                        |
| 33 | + <wsse:UsernameToken atd:clientId="' . $client.'" xmlns:atd="http://api.atdconnect.com/atd">  | 
                                                        |
| 34 | + <wsse:Username>' . $user.'</wsse:Username>  | 
                                                        |
| 35 | + <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $pass.'</wsse:Password>  | 
                                                        |
| 36 | 36 | </wsse:UsernameToken>  | 
                                                        
| 37 | 37 | </wsse:Security>  | 
                                                        
| 38 | 38 | ';  | 
                                                        
@@ -40,11 +40,11 @@ discard block  | 
                                                    ||
| 40 | 40 |          return new \SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', new \SoapVar($xml, XSD_ANYXML), true); | 
                                                        
| 41 | 41 | }  | 
                                                        
| 42 | 42 | |
| 43 | - public function apiCall($call,$query,$service)  | 
                                                        |
| 43 | + public function apiCall($call, $query, $service)  | 
                                                        |
| 44 | 44 |      { | 
                                                        
| 45 | - $client = new \SoapClient($service);  | 
                                                        |
| 45 | + $client = new \SoapClient($service);  | 
                                                        |
| 46 | 46 | $client->__setSoapHeaders($this->wsshead);  | 
                                                        
| 47 | - $response = $client->$call($query);  | 
                                                        |
| 47 | + $response = $client->$call($query);  | 
                                                        |
| 48 | 48 | return $response;  | 
                                                        
| 49 | 49 | }  | 
                                                        
| 50 | 50 | |
@@ -85,17 +85,17 @@ discard block  | 
                                                    ||
| 85 | 85 | |
| 86 | 86 | public function getLocationByCriteria()  | 
                                                        
| 87 | 87 |      { | 
                                                        
| 88 | -        return $this->apiCall('getLocationByCriteria','',$this->locationwsdl); | 
                                                        |
| 88 | +        return $this->apiCall('getLocationByCriteria', '', $this->locationwsdl); | 
                                                        |
| 89 | 89 | }  | 
                                                        
| 90 | 90 | |
| 91 | 91 | public function getLocationCutoffTimes()  | 
                                                        
| 92 | 92 |      { | 
                                                        
| 93 | -        return $this->apiCall('getLocationCutoffTimes',['location' => $this->location],$this->locationwsdl); | 
                                                        |
| 93 | +        return $this->apiCall('getLocationCutoffTimes', ['location' => $this->location], $this->locationwsdl); | 
                                                        |
| 94 | 94 | }  | 
                                                        
| 95 | 95 | |
| 96 | 96 | public function getDistributionCenter($dc = '059')  | 
                                                        
| 97 | 97 |      { | 
                                                        
| 98 | -        return $this->apiCall('getDistributionCenter',array('servicingDC' => $dc),$this->locationwsdl); | 
                                                        |
| 98 | +        return $this->apiCall('getDistributionCenter', array('servicingDC' => $dc), $this->locationwsdl); | 
                                                        |
| 99 | 99 | }  | 
                                                        
| 100 | 100 | |
| 101 | 101 | |
@@ -106,12 +106,12 @@ discard block  | 
                                                    ||
| 106 | 106 | |
| 107 | 107 | public function getBrand($product = null)  | 
                                                        
| 108 | 108 |      { | 
                                                        
| 109 | -    	return $this->apiCall('getBrand',array('locationNumber' => $this->location,'productGroup' => $product),$this->brandwsdl); | 
                                                        |
| 109 | +    	return $this->apiCall('getBrand', array('locationNumber' => $this->location, 'productGroup' => $product), $this->brandwsdl); | 
                                                        |
| 110 | 110 | }  | 
                                                        
| 111 | 111 | |
| 112 | 112 | public function getStyle($brand = null)  | 
                                                        
| 113 | 113 |      { | 
                                                        
| 114 | -    	return $this->apiCall('getStyle',array('locationNumber' => $this->location,'brand' => $brand),$this->brandwsdl); | 
                                                        |
| 114 | +    	return $this->apiCall('getStyle', array('locationNumber' => $this->location, 'brand' => $brand), $this->brandwsdl); | 
                                                        |
| 115 | 115 | }  | 
                                                        
| 116 | 116 | |
| 117 | 117 | |
@@ -124,17 +124,17 @@ discard block  | 
                                                    ||
| 124 | 124 | |
| 125 | 125 | public function getProdBrand($product = null)  | 
                                                        
| 126 | 126 |      { | 
                                                        
| 127 | -    	return $this->apiCall('getProdBrand',array('locationNumber' => $this->location,'productGroup' => $product),$this->productwsdl); | 
                                                        |
| 127 | +    	return $this->apiCall('getProdBrand', array('locationNumber' => $this->location, 'productGroup' => $product), $this->productwsdl); | 
                                                        |
| 128 | 128 | }  | 
                                                        
| 129 | 129 | |
| 130 | 130 | public function getProductByCriteria($search)  | 
                                                        
| 131 | 131 |      { | 
                                                        
| 132 | -        return $this->apiCall('getProductByCriteria',$search,$this->productwsdl); | 
                                                        |
| 132 | +        return $this->apiCall('getProductByCriteria', $search, $this->productwsdl); | 
                                                        |
| 133 | 133 | }  | 
                                                        
| 134 | 134 | |
| 135 | 135 | public function getProductByKeyword($search)  | 
                                                        
| 136 | 136 |      { | 
                                                        
| 137 | -        return $this->apiCall('getProductByKeyword',$search,$this->productwsdl); | 
                                                        |
| 137 | +        return $this->apiCall('getProductByKeyword', $search, $this->productwsdl); | 
                                                        |
| 138 | 138 | }  | 
                                                        
| 139 | 139 | |
| 140 | 140 | //************************************************  | 
                                                        
@@ -143,12 +143,12 @@ discard block  | 
                                                    ||
| 143 | 143 | |
| 144 | 144 | public function placeOrder($order)  | 
                                                        
| 145 | 145 |      { | 
                                                        
| 146 | -        return $this->apiCall('placeOrder',$order,$this->orderwsdl); | 
                                                        |
| 146 | +        return $this->apiCall('placeOrder', $order, $this->orderwsdl); | 
                                                        |
| 147 | 147 | }  | 
                                                        
| 148 | 148 | |
| 149 | 149 | public function previewOrder($order)  | 
                                                        
| 150 | 150 |      { | 
                                                        
| 151 | -        return $this->apiCall('previewOrder',$order,$this->orderwsdl); | 
                                                        |
| 151 | +        return $this->apiCall('previewOrder', $order, $this->orderwsdl); | 
                                                        |
| 152 | 152 | }  | 
                                                        
| 153 | 153 | |
| 154 | 154 | //************************************************  | 
                                                        
@@ -157,12 +157,12 @@ discard block  | 
                                                    ||
| 157 | 157 | |
| 158 | 158 | public function getOrderDetail($status)  | 
                                                        
| 159 | 159 |      { | 
                                                        
| 160 | -        return $this->apiCall('getOrderDetail',$status,$this->statuswsdl); | 
                                                        |
| 160 | +        return $this->apiCall('getOrderDetail', $status, $this->statuswsdl); | 
                                                        |
| 161 | 161 | }  | 
                                                        
| 162 | 162 | |
| 163 | 163 | public function getOrderStatusByCriteria($criteria)  | 
                                                        
| 164 | 164 |      { | 
                                                        
| 165 | -        return $this->apiCall('getOrderStatusByCriteria',$status,$this->statuswsdl); | 
                                                        |
| 165 | +        return $this->apiCall('getOrderStatusByCriteria', $status, $this->statuswsdl); | 
                                                        |
| 166 | 166 | }  | 
                                                        
| 167 | 167 | |
| 168 | 168 | |