Skip to content

Commit

Permalink
Update SiteId dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
haroonkhan committed May 29, 2019
1 parent 5cb5d47 commit 141bad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Ebay.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function getAuthToken(){
/*
* Return configurations from Config
*/
public function getConfig(){
public function getConfig($args=[]){
$this->config['siteId'] = isset($args['siteId'])?$args['siteId']:$this->config['siteId'];
return $this->config;
}
}
4 changes: 2 additions & 2 deletions src/EbayServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class EbayServices
{
private $sdk;

function __construct()
function __construct($args=[])
{
$ebay = new Ebay();
$config = $ebay->getConfig();
$config = $ebay->getConfig($args);
$this->sdk = new Sdk($config);
}

Expand Down

0 comments on commit 141bad6

Please sign in to comment.