Comments (8)
My mistake, I did not include the class in my index.php. I was thinking it would be handled by autoload.php but this is not the case.
Thanks for looking into my problem and your tips.
from exact-php-client.
What do you mean by 'creating an instance of this class does not work'. Do you get an error message? All code looks fine to me, I had no problem running it.
Does the file-path match the name of the Namespace/Class (Picqer/Financials/Exact/ReportingBalance.php)? Otherwise the autoload function can't find the file.
from exact-php-client.
Yes the file-path is correct.
I do not get an error message. I have added some echo's for debugging purposes (See below). The '1' obviously is echoed, but the '2' does not echo. Also var_dump($RepBal) does not show anything.
try {
echo '1';
$RepBal = new \Picqer\Financials\Exact\ReportingBalance($connection);
echo '2';
}
from exact-php-client.
Try removing the try statement (no pun intended). You cannot use 'try' without 'catch' or 'finally'.
from exact-php-client.
I know, I have a catch statement in place, this is just part of my code. So that is not the problem.
from exact-php-client.
I started using this SDK today, I have successfully retrieved my userID. But trying the same tactic for the ReportingBalance does not work. This is both try statements:
//Get UserID
try {
$UserInfo = new \Picqer\Financials\Exact\Me($connection);
$UserID = $UserInfo->find()->UserID;
echo $UserID;
} catch (\Exception $e) {
echo get_class($e) . ' : ' . $e->getMessage();
}
try {
echo '1';
$RepBal = new \Picqer\Financials\Exact\ReportingBalance($connection);
var_dump($RepBal);
} catch (\Exception $e) {
echo get_class($e) . ' : ' . $e->getMessage();
}
from exact-php-client.
Hmm, strange. When I copy/paste your code into my project, it just works fine. Have no clue what goes wrong in your project.
from exact-php-client.
If you can see the '1' and not the '2' there has to be some kind of error that's happening. I also c/p your code into the client and it works fine :)
$reportingBalance = new \Picqer\Financials\Exact\ReportingBalance($connection);
$balances = $reportingBalance->filter('', '', '', ['$top' => 1]);
var_dump($balances);
from exact-php-client.
Related Issues (20)
- Not able to Authorize HOT 1
- Requesting AccountItem results in 400 Bad Request - Error in query syntax HOT 2
- SalesOrderLines and SalesOrderOrderChargeLines HOT 2
- Client with identifier 'xxx-yyy-zzz' not found. HOT 5
- SalesEntry payments HOT 1
- What endpoint to get all articles?
- cURL error 77 HOT 4
- Provide a way to let exceptions bubble through to application HOT 6
- Picqer\Financials\Exact\Connection::upload() is missing optional parameters. HOT 1
- Referenced page is empty. Perhaps the endpoint is also removed? HOT 1
- PurchaseEntry approve for payment HOT 1
- PSR 18 compatibility HOT 3
- Error: Typed property Picqer\Financials\Exact\Connection::$minutelyLimitReset must not be accessed before initialization HOT 4
- Weird problem with paging and Documents/DocumentAttachment HOT 1
- Exception "Error 500: Not allow to update in Basic : Warehouse." HOT 7
- Error 401 with the message: "Unauthorized Client: Old refresh token used." HOT 6
- Strict type error HOT 11
- Could not connect to Exact Error 401: {"error":"unauthorized_client","error_description":"Old refresh token used."} HOT 8
- how to do an orderby HOT 1
- 429 errors HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exact-php-client.