Passed
Push — master ( 9861bf...8a602a )
by Nicholas
01:34
created

Product::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nickcheek\Atdconnect\Services;
4
5
class Product {
6
	use \Nickcheek\Atdconnect\Traits\ApiTrait;
0 ignored issues
show
introduced by
The trait Nickcheek\Atdconnect\Traits\ApiTrait requires some properties which are not provided by Nickcheek\Atdconnect\Services\Product: $user, $pass, $client
Loading history...
7
	
8
	private $location;
9
	private $wsdl;
10
11
	public function __construct()
12
	{
13
	    $config = include(realpath(dirname(__FILE__) . '/../config/config.php'));
14
	    $this->location = $config->location;
15
		$this->wsdl = 'https://testws.atdconnect.com/ws/3_4/products.wsdl';
16
	}
17
	
18
	//************************************************
19
    //               Products Service
20
    //************************************************
21
        
22
    public  function getProdBrand($product = null)
23
    {
24
    	return $this->apiCall('getProdBrand',array('locationNumber' => $this->location,'productGroup' => $product),$this->wsdl);
25
    }
26
    
27
    public  function getProductByCriteria($search)
28
    {
29
        return $this->apiCall('getProductByCriteria',$search,$this->wsdl);
30
    }
31
    
32
    public  function getProductByKeyword($search)
33
    {
34
        return $this->apiCall('getProductByKeyword',$search,$this->wsdl);
35
    }    
36
        
37
38
}