Example #1
0
 /**
  * Returns the merchant associated with the client's access token
  *
  * @param string $id The id of the merchant to fetch
  *
  * @return object The merchant object
  */
 public function merchant($id = null)
 {
     if ($id == null) {
         $id = $this->account_details['merchant_id'];
     }
     return GoCardless_Merchant::find_with_client($this, $id);
 }
Example #2
0
 /**
  * Returns the merchant associated with the client's access token
  *
  * @param string $id The id of the merchant to fetch
  *
  * @return object The merchant object
  */
 public function merchant($id = null)
 {
     if ($id == null) {
         $id = $this->account_details['merchant_id'];
     }
     if (!isset($this->account_details['access_token'])) {
         throw new GoCardless_ClientException('Access token missing');
     }
     return GoCardless_Merchant::find_with_client($this, $id);
 }