Giter Club home page Giter Club logo

fintoc-python's People

Contributors

daleal avatar jfcumsille avatar lezorich avatar nebil avatar nmassardot avatar npcastro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fintoc-python's Issues

Better errors for invalid manager actions

Right now, when a user tries to use an invalid action on a manager, the error returned is really bad (basically, there is no checking for invalid actions). For example, trying to get an invoice returns the following error:

Traceback (most recent call last):
  File "dist/main.py", line 16, in <module>
    invoice = link.invoices.get("inv_e7Qn499tZ6x14BW3")
  File "/home/epsilon/documents/work/fintoc/fintoc-python/fintoc/utils.py", line 71, in wrapper
    raise error(error_data["error"]) from None
fintoc.errors.InvalidRequestError: invalid_request_error: unrecognized_request
Unrecognized request: GET /v1/invoices/inv_e7Qn499tZ6x14BW3?link_token=link_5Vw1GBZiRaxGpORl_token_4aTYpCwxKRKcAntvHqHe4mTx. Please see https://docs.fintoc.com/ for valid routes.

This might be because the action validation is done through a __getattr__. The SDK should probably work similar to how the Node SDK works (have a method for each action and check on that method).

Broaden the dependency tolerances

Hi! While working with this library, I found myself having troubles with the httpx package dependency, due to its version being restricted to only the version 0.17.1 (previously it was the version 0.12.1), making other libraries I used very restricted on the version of httpx that they could rely on. I think that it might be a good idea to test that the fintoc-python library works with the latest patched version of every minor release of httpx from the version 0.12.1 (maybe, I just propose this version as it was the last required version) and allow any version of httpx between 0.12.1 to 0.17.x. I think that it might be a good idea because that would lighten the restriction on other libraries that might also depend on httpx. I also think that this shouldn't be hard, as fintoc-python isn't really using much of the features of httpx. In fact it is using practically just the core functionality, so older versions will probably work just fine.

The datetime parser is too aggressive

The datetime parser seems to be too aggressive, trying and parsing stuff like numbers (for example, the number 1105122 would get parsed into a number). This is because, when trying to determine how to parse an object, the SDK uses the get_resource_class function (located inside fintoc/utils.py), which uses the is_iso_datetime function (located inside the same file). This function uses the dateutil.parser.isoparse method to determine whether a string or isn't a valid ISO-formatted datetime string. Because the isoparse method is designed to be "relaxed", this results in non-ISO-formatted strings being returned as datetime objects.

Comments

Hello, there is a form to see the comments of the movements?

Add serializers

The SDK is fantastic to handle the data within the application, but the objects can't be serialized, so using it on the backend of a web application might be a bit tedious (as you would have to write serializers for every object). The ResourceMixin should include a serialize method (or at least a way to JSON serialize it by default) so that users can focus on writing business logic instead of countless serializers.

Getting unrecognized request for new payment intent creation

Hi!

I'm trying to create a payment intent with the following code:

payment_intent = fintoc_client.payment_intents.create(
currency="usd",
amount=1000,
recipient_account={'holder_id': 'XXXXXXXX', 'number': 'XXXXXXXX', 'type': 'sight_account', 'institution_id': 'cl_banco_estado'}
)

but i get the following error:
invalid_request_error: unrecognized_request
Unrecognized request: POST /payment_intents. Please see https://docs.fintoc.com/ for valid routes.

Any idea?

Thanks

isoparse TypeError cuando no existe transaction_date

Hola!

Al momento de utilizar account.update_movements, si el argumento transaction_date que recibe un Movement al instanciarse es None, entonces isoparse levanta un TypeError al intentar parsear el None y por lo tanto los movimientos no logran cargarse.

Handle dates

Right now, the automagic serializer only handles raw data like strings, integers and booleans. The thing is, dates are quite common across the API, and it would be nice for the dates to be parsed into a datetime object instead of being left as the raw date string.

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.