public function initClient($custom_params = [], $custom_handler = null)
    {
        $config = [
            'base_uri' => $this->getBaseAPIEndpoint(),
            'headers'  => [
                'Accept'               => 'application/json',
                'User-Agent'           => self::USER_AGENT . ' ' . self::CLIENT_VERSION,
                self::APP_TOKEN_HEADER => $this->app_token,
                self::LANG_HEADER      => $this->language,
                self::TIMEZONE_HEADER  => $this->timezone,
                'X-Customer-IP'           => $this->getCustomerIP()
            ]
        ];

        $config = array_merge($config, $custom_params);

        $this->api_client = new ApiRequest($config);
    }
public function initClient($custom_params = [], $custom_handler = null)
    {
        $config = [
            'base_uri' => $this->getBaseAPIEndpoint(),
            'headers'  => [
                'Accept'               => 'application/json',
                'User-Agent'           => self::USER_AGENT . ' ' . self::CLIENT_VERSION,
                self::APP_TOKEN_HEADER => $this->app_token,
                self::LANG_HEADER      => $this->language,
                self::TIMEZONE_HEADER  => $this->timezone,
                'X-Customer-IP'           => $this->getCustomerIP()
            ]
        ];

        $config = array_merge($config, $custom_params);

        $this->api_client = new ApiRequest($config);
    }
public function initClient ( $ custom_params = [ ] , $ custom_handler = null ) { $ config = [ 'base_uri' => $ this -> getBaseAPIEndpoint ( ) , 'headers' => [ 'Accept' => 'application/json' , 'User-Agent' => self :: USER_AGENT . ' ' . self :: CLIENT_VERSION , self :: APP_TOKEN_HEADER => $ this -> app_token , self :: LANG_HEADER => $ this -> language , self :: TIMEZONE_HEADER => $ this -> timezone , 'X-Customer-IP' => $ this -> getCustomerIP ( ) ] ] ; $ config = array_merge ( $ config , $ custom_params ) ; $ this -> api_client = new ApiRequest ( $ config ) ; }
Initialize API client with custom params and custom handler, both empty by default
@param array $custom_params See ApiRequest->setOptions()
@param null $custom_handler
Initialize API client with custom params and custom handler both empty by default