Skip to content

Commit

Permalink
Merge pull request #1 from jaywilliams/patch-1
Browse files Browse the repository at this point in the history
Fix optional paramaters in listStores()
  • Loading branch information
zack6849 authored Jan 25, 2019
2 parents ce161b9 + 5557f42 commit e2a6d54
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Endpoints/Stores.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ public function update(Store $store)
*/
public function listStores($showInactive = false, $marketplaceId = '')
{
return $this->get('', ['query' => compact('showInactive', 'marketplaceId')]);
$params = array();
if($showInactive != false){
$params['showInactive'] = $showInactive;
}
if($marketplaceId != ''){
$params['marketplaceId'] = $marketplaceId;
}
return $this->get('', ['query' => $params]);
}

/**
Expand Down Expand Up @@ -99,4 +106,4 @@ public function reactivateStore($storeId = '')
{
return $this->post('reactivate', ['form_params' => compact('storeId')]);
}
}
}

0 comments on commit e2a6d54

Please sign in to comment.