as you see on the composer part
"name": "quickbooks/v3-php-sdk"
and
"autoload": {
"psr-4": {
"QuickBooksOnline\\API\\": "src/"
}
},
so the path of the vendor folder extension on the vendor, should be in :
<magento_root>/vendor/quickbooks/v3-php-sdk/
then, as the autoload describe in the psr-4 to be like this :
"QuickBooksOnline\\API\\": "src/"
that's mean you can access class in the folder quickbooks/v3-php-sdk/src/*
by defined namespace to be like this :
namespace QuickBooksOnline\API;
since you want override Class file vendor\quickbooks\v3-php-sdk\src\DataService\DataService.php
with the my explanation before, so the class should be to be like this :
QuickBooksOnline\API\DataService\Dataservice
to override that class, you just create di.xml inside folder app/code/MyCompany/MyModule/etc/
add this code to override Dataservice.php Class
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="QuickBooksOnline\API\DataService\Dataservice" type="MyCompany\MyModule\Model\DataService" />
</config>
the override class now on the MyCompany\MyModule\Model\DataService.php
and then to override sdk.config
I still cannot find to override this xml by similiar xml file again, but as the documentation on this link , you can modified the setting on the sdk.config by write php code, in the magento you can create helper file to connect based your setting
so create Helper Class Data.php
on the folder app/code/MyCompany/MyModule/Helper
add this code to the Data.php
<?php
namespace MyCompany\MyModule\Helper;
use QuickBooksOnline\API\DataService\DataService as DataService;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
protected $_dataService;
public function _construct(
DataService $dataService
){
$this->_dataService = $dataService;
}
public function getConfigurationSetting()
{
$settings = $this->_dataService::Configure(array(
'auth_mode' => 'oauth1',
'consumerKey' => "ConsumerKey",
'consumerSecret' => "ConsumerSecret",
'accessTokenKey' => "CccessTokenKey",
'accessTokenSecret' => "AccessTokenSecret",
'QBORealmID' => "RealmID"
'baseUrl' => "Development/Production"
));
return $settings
}
}
so you can call the method getConfigurationSetting()
from the helper Data.php
when you want checking your configuration, you can use this answer to call method on your helper class.
Hope it helps.