Skip to content

[PAY-7260] add support for disputes endpoints#126

Merged
mamunozcar merged 2 commits into
masterfrom
pay-7260-sdk-python-resource-disputes
May 19, 2026
Merged

[PAY-7260] add support for disputes endpoints#126
mamunozcar merged 2 commits into
masterfrom
pay-7260-sdk-python-resource-disputes

Conversation

@mamunozcar
Copy link
Copy Markdown
Contributor

Description

Add support for newly created /v1/disputes endpoints

Requirements

None.

Additional changes

None.

@mamunozcar mamunozcar requested a review from Gonzalo9823 May 19, 2026 15:48
from fintoc.mixins import ManagerMixin


# pylint: disable=duplicate-code
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Porque esto?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es porque el pylint puede detectar bloques de código muy parecidos entre diferentes archivos. Es algo que usamos en todos los managers

Comment thread fintoc/managers/disputes_manager.py Outdated

# pylint: disable=duplicate-code
class DisputesManager(ManagerMixin):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Salto de línea extra.

from .accounts_manager import AccountsManager
from .charges_manager import ChargesManager
from .checkout_sessions_manager import CheckoutSessionsManager
from .dispute_documents_manager import DisputeDocumentsManager
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Porque necesita su propio Manager los Documents?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lo separé por dos razones:

  1. Sigue el patrón de accounts.movements: recursos anidados en la API (/v1/disputes/:id/documents) tienen su propio manager en el SDK.
  2. _create del ManagerMixin usa self.__class__.resource para decidir qué clase instanciar. Si pongo create_document en DisputesManager (donde resource = "dispute"), tendría que bypassear _create y llamar a resource_create a mano con klass=DisputeDocument.

Además deja la puerta abierta a agregar list/get/delete de documentos sin tener que refactorizar.

Comment thread fintoc/resources/dispute.py Outdated


class Dispute(ResourceMixin):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Salto de línea extra.

@mamunozcar mamunozcar requested a review from Gonzalo9823 May 19, 2026 16:14
@mamunozcar mamunozcar merged commit e7b6481 into master May 19, 2026
5 checks passed
@mamunozcar mamunozcar deleted the pay-7260-sdk-python-resource-disputes branch May 19, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants