src/Bigcommerce/Api/Client.php
public static function configureOAuth($settings)
    {
        if (!isset($settings['auth_token'])) {
            throw new Exception("'auth_token' must be provided");
        }

        if (!isset($settings['store_hash'])) {
            throw new Exception("'store_hash' must be provided");
        }

        self::$client_id = $settings['client_id'];
        self::$auth_token = $settings['auth_token'];
        self::$store_hash = $settings['store_hash'];

        self::$client_secret = isset($settings['client_secret']) ? $settings['client_secret'] : null;

        self::$api_path = self::$api_url . sprintf(self::$stores_prefix, self::$store_hash);
        self::$connection = false;
    }
public static function configureOAuth($settings)
    {
        if (!isset($settings['auth_token'])) {
            throw new Exception("'auth_token' must be provided");
        }

        if (!isset($settings['store_hash'])) {
            throw new Exception("'store_hash' must be provided");
        }

        self::$client_id = $settings['client_id'];
        self::$auth_token = $settings['auth_token'];
        self::$store_hash = $settings['store_hash'];

        self::$client_secret = isset($settings['client_secret']) ? $settings['client_secret'] : null;

        self::$api_path = self::$api_url . sprintf(self::$stores_prefix, self::$store_hash);
        self::$connection = false;
    }
public static function configureOAuth ( $ settings ) { if ( ! isset ( $ settings [ 'auth_token' ] ) ) { throw new Exception ( "'auth_token' must be provided" ) ; } if ( ! isset ( $ settings [ 'store_hash' ] ) ) { throw new Exception ( "'store_hash' must be provided" ) ; } self :: $ client_id = $ settings [ 'client_id' ] ; self :: $ auth_token = $ settings [ 'auth_token' ] ; self :: $ store_hash = $ settings [ 'store_hash' ] ; self :: $ client_secret = isset ( $ settings [ 'client_secret' ] ) ? $ settings [ 'client_secret' ] : null ; self :: $ api_path = self :: $ api_url . sprintf ( self :: $ stores_prefix , self :: $ store_hash ) ; self :: $ connection = false ; }
Configure the API client with the required OAuth credentials.

Requires a settings array to be passed in with the following keys:

- client_id
- auth_token
- store_hash

@param array $settings
@throws \Exception
Configure the API client with the required OAuth credentials .