aboutsummaryrefslogtreecommitdiffstats
path: root/gsxlib.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2014-04-10 12:31:47 +0300
committerFilipp Lepalaan <f@230.to>2014-04-10 12:31:47 +0300
commit612ee8577f5f64b0e82fefb4ba7db09e7ec7b6a3 (patch)
treef6967b5db5dbb51f4e74259ab3e91e277c66a766 /gsxlib.php
parent71d9f4c8abd4158eee11d758ab418e2ebcfa5c6d (diff)
downloadgsxlib-612ee8577f5f64b0e82fefb4ba7db09e7ec7b6a3.tar.gz
gsxlib-612ee8577f5f64b0e82fefb4ba7db09e7ec7b6a3.tar.bz2
gsxlib-612ee8577f5f64b0e82fefb4ba7db09e7ec7b6a3.zip
Added $lang argument
Diffstat (limited to 'gsxlib.php')
-rw-r--r--gsxlib.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/gsxlib.php b/gsxlib.php
index dfea4e3..b4eec45 100644
--- a/gsxlib.php
+++ b/gsxlib.php
@@ -32,7 +32,8 @@ class GsxLib
$password,
$environment = '',
$region = 'emea',
- $tz = 'CEST')
+ $tz = 'CEST',
+ $lang = 'en')
{
if(!(self::$_instance instanceof self)) {
self::$_instance = new self(
@@ -41,7 +42,8 @@ class GsxLib
$password,
$environment,
$region,
- $tz
+ $tz,
+ $lang
);
}
@@ -57,7 +59,8 @@ class GsxLib
$password,
$environment = '',
$region = 'emea',
- $tz = 'CEST' )
+ $tz = 'CEST',
+ $lang = 'en' )
{
if(!class_exists('SoapClient')) {
throw new GsxException('Looks like your PHP lacks SOAP support');
@@ -110,7 +113,7 @@ class GsxLib
'userId' => $username,
'password' => $password,
'serviceAccountNo' => $account,
- 'languageCode' => 'en',
+ 'languageCode' => $lang,
'userTimeZone' => $tz,
)
);
@@ -124,7 +127,7 @@ class GsxLib
if($environment == '2') $environment = 'production';
$error = 'Authentication with GSX failed. Does this account have access to '
- .$environment."?\n";
+ .$environment." environment?\n";
throw new GsxException($error);
}
@@ -290,8 +293,7 @@ class GsxLib
'lookupRequestData' => $query
));
- $response = $this->client->RepairLookup($req)
- ->RepairLookupResponse;
+ $response = $this->client->RepairLookup($req)->RepairLookupResponse;
return $response->lookupResponseData;
}
@@ -436,9 +438,7 @@ class GsxLib
}
- $req = array('PartsLookup' => array(
- 'lookupRequestData' => $query
- ));
+ $req = array('PartsLookup' => array('lookupRequestData' => $query));
$result = $this->request($req)->parts;
// always return an array