Repository navigation
[ONB-4066] Paridad con la API pública #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8aecf6f
feat: add generic request and multipart form support to managers
FranciscaOtero 8095c89
feat(v1): add missing public API operations
FranciscaOtero 4161d3f
feat(v2): add missing public API operations
FranciscaOtero 76ab73b
feat(v2): add payment methods create, cancel and mandate document
FranciscaOtero a3e0935
fix: send a filename for nameless file-like uploads
FranciscaOtero cc2b684
docs: document new operations in README
FranciscaOtero d9ac6a6
chore: remove unneeded pylint disables
FranciscaOtero 6a09cd8
fix: keep the collection path on resources returned by actions
FranciscaOtero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| """Module to hold the institutions manager.""" | ||
|
|
||
| from fintoc.mixins import ManagerMixin | ||
|
|
||
|
|
||
| class InstitutionsManager(ManagerMixin): | ||
|
|
||
| """Represents an institutions manager.""" | ||
|
|
||
| resource = "institution" | ||
| methods = ["list"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| """Module to hold the link intents manager.""" | ||
|
|
||
| from fintoc.mixins import ManagerMixin | ||
|
|
||
|
|
||
| class LinkIntentsManager(ManagerMixin): | ||
|
|
||
| """Represents a link intents manager.""" | ||
|
|
||
| resource = "link_intent" | ||
| methods = ["create"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| """Module to hold the payout resources manager.""" | ||
|
|
||
| from fintoc.mixins import ManagerMixin | ||
| from fintoc.resource_handlers import resource_list | ||
| from fintoc.utils import can_raise_fintoc_error, get_resource_class | ||
|
|
||
|
|
||
| class PayoutResourcesManager(ManagerMixin): | ||
|
|
||
| """Represents a payout resources manager.""" | ||
|
|
||
| resource = "generic_fintoc_resource" | ||
| methods = ["list"] | ||
|
|
||
| resource_types = { | ||
| "payment_intent": "payment_intent", | ||
| "charge": "charge", | ||
| "refund": "refund", | ||
| "refund_adjustment": "refund", | ||
| } | ||
|
|
||
| @can_raise_fintoc_error | ||
| def _list(self, **kwargs): | ||
| """List the resources of a payout of the given ``resource_type``.""" | ||
| resource = self.resource_types.get( | ||
| kwargs.get("resource_type"), self.__class__.resource | ||
| ) | ||
| return resource_list( | ||
| client=self._client, | ||
| path=self._build_path(**kwargs), | ||
| klass=get_resource_class(resource), | ||
| handlers={}, | ||
| methods=[], | ||
| params=kwargs, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| """Module to hold the payouts manager.""" | ||
|
|
||
| from fintoc.managers.payout_resources_manager import PayoutResourcesManager | ||
| from fintoc.mixins import ManagerMixin | ||
|
|
||
|
|
||
| class PayoutsManager(ManagerMixin): | ||
|
|
||
| """Represents a payouts manager.""" | ||
|
|
||
| resource = "payout" | ||
| methods = ["list", "get"] | ||
|
|
||
| def __init__(self, path, client): | ||
| super().__init__(path, client) | ||
| self.__resources_manager = None | ||
|
|
||
| @property | ||
| def resources(self): | ||
| """Proxies the payout resources manager.""" | ||
| if self.__resources_manager is None: | ||
| self.__resources_manager = PayoutResourcesManager( | ||
| "/v1/payouts/{payout_id}/resources", | ||
| self._client, | ||
| ) | ||
| return self.__resources_manager | ||
|
|
||
| @resources.setter | ||
| def resources(self, new_value): # pylint: disable=no-self-use | ||
| raise NameError("Attribute name corresponds to a manager") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| """Module to hold the tax_statements manager.""" | ||
|
|
||
| from fintoc.mixins import ManagerMixin | ||
|
|
||
|
|
||
| class TaxStatementsManager(ManagerMixin): | ||
|
|
||
| """Represents a tax_statements manager.""" | ||
|
|
||
| resource = "tax_statement" | ||
| methods = ["list", "get"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.