fintoc-com / fintoc-python Goto Github PK
View Code? Open in Web Editor NEWThe official Python library for the Fintoc API ๐
Home Page: https://fintoc.com
License: BSD 3-Clause "New" or "Revised" License
The official Python library for the Fintoc API ๐
Home Page: https://fintoc.com
License: BSD 3-Clause "New" or "Revised" License
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).
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 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.
Hello, there is a form to see the comments of the movements?
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.
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
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.
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.
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.