quaderno / quaderno-php Goto Github PK
View Code? Open in Web Editor NEWA PHP wrapper for Quaderno API.
Home Page: https://quaderno.io
A PHP wrapper for Quaderno API.
Home Page: https://quaderno.io
Is there a way to know the pagination status when doing a "find" for a given resource?
The API is supposed to return this information in the response headers.
https://quaderno.io/docs/api/?php#pagination
I'm using this PHP library, and I can't find where this information is stored.
Occasionally the QuadernoTaxRate::calculate() method returns false. However I don't see a way to retrieve that error, and the Quaderno console doesn't appear to show any logs and shed any light on why the API call failed.
My proposal would be to add an optional callback parameter to the method to allow the consumer to do something upon failure. In my case log the error.
I am happy to submit a PR, but I wanted to check:
For context, the method in question:
public static function calculate($params) {
$return = false;
$response = QuadernoBase::apiCall('GET', 'tax_rates', 'calculate', $params);
if (QuadernoBase::responseIsValid($response))
$return = new self($response['data']);
return $return;
}
quaderno-php/quaderno_tax_rate.php
Line 15 in 0350c79
Hi!
There seems to be no way to get error messages out of the library. I would need to get this error for logging purposes.
During debugging i found, that the $this->errors
variable is set (in the QuadernoModel
) but not neither readable nor returned to the API consumer. Could you please add this functionality?
Thanks and best regards
I see the REST API exposes this endpoint (from the documentation).
https://quaderno.io/docs/api/?php#retrieve-get-a-single-contact-by-payment-gateway-id
Apparently, this is not available in the PHP library.
Is it going to be added any time soon?
Hello,
Do you officially support PHP 8? I are running code using this library in PHP 7.4, which works fine, but I am in the process of upgrading the application to PHP 8.1.
During testing, I have only found one issue so far:
https://www.php.net/releases/8.1/en.php#deprecations_and_bc_breaks
The QuadernoClass::jsonSerialize() throws a deprecated error. PHP internal functions now have return types, so the fix is simple:
/**
* Specify data which should be serialized to JSON.
*
* @return array
*/
public function jsonSerialize(): mixed
{
return $this->data;
}
My core question is, will there be an official release to make this library compatible with PHP 8?
I am happy to submit PRs for this particular issue, but I don't use all the elements of this library, just the tax.
The __isset() method is missing from the Quaderno_class.php
This method is needed if you want to use Quaderno objects in twig files; http://twig.sensiolabs.org/doc/2.x/recipes.html#using-dynamic-object-properties
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.