Code Monkey home page Code Monkey logo

quaderno-php's People

Contributors

asiermarques avatar equinoxmatt avatar gerard-mailtrack avatar inacho avatar jhernandis avatar jorgerdg avatar jrub avatar jsenin avatar neilvs avatar peternijssen avatar polimorfico avatar vincentlanglet avatar xxswingxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quaderno-php's Issues

Calculate Tax Rate doesn't expose any errors

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:

  1. Is there a way to retrieve the error that I have missed?
  2. If my proposal is something that would likely be accepted and if you welcome pull requests.

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;
  }

public static function calculate($params) {

PHP 8.x support?

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.

Invoice save return false

Hi

I would like to know what can cause the saving of invoice creation to return false but does not show any errors? I have attached my sample data.

screen shot 2018-08-20 at 12 16 09 pm

Thanks

Get error messages out of the library

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.