Skip to content

Transactions and Subscriptions#22

Merged
Rubiozito merged 36 commits intodevfrom
transactions
Jul 21, 2025
Merged

Transactions and Subscriptions#22
Rubiozito merged 36 commits intodevfrom
transactions

Conversation

@ViniciusBerti
Copy link
Copy Markdown
Contributor

Adiciona a entidade de transactions e subscriptions com suas rotas.

Comment thread src/modules/get_subscription/app/get_subscription_controller.py Outdated
Comment thread src/modules/get_subscription/app/get_subscription_controller.py Outdated
Comment thread src/modules/get_subscription/app/get_subscription_controller.py Outdated
Comment thread src/modules/get_subscription/app/get_subscription_controller.py Outdated
Comment thread src/modules/get_subscription/app/get_subscription_controller.py Outdated
Comment thread src/shared/domain/entities/subscription.py
Comment thread src/shared/domain/entities/transactions.py
Comment thread src/shared/infra/repositories/subscription_repository_dynamo.py Outdated
Comment thread src/shared/infra/repositories/subscription_repository_mock.py Outdated
from src.shared.helpers.errors.usecase_errors import NoItemsFound


observability = ObservabilityMock(module_name="get_subscription")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

observabilidade dnv

Comment thread src/modules/get_subscription/app/get_subscription_controller.py Outdated
Comment thread src/modules/get_subscription/app/get_subscription_controller.py
Comment thread src/modules/get_subscription/app/get_subscription_usecase.py Outdated
Comment thread src/modules/get_subscription/app/get_subscription_usecase.py Outdated
def __init__(self, repo: ISubscriptionRepository):
self.repo = repo

def __call__(self, subscription_id: str, new_plan: PLAN) -> Subscription:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Aqui no caso acredito que o correto seja receber o user_id e não o subscription id
A gente ta alterando o plano do usuario
Quando a gente der um update na subscription de um usuario, a gente ta criando um objeto novo de subscription
Se n der pra entender te explico dps em call


if not isinstance(new_plan, PLAN):
raise EntityError("new_plan")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

atualizar o plano do no usuario, adicionar erro para update para o mesmo plano

@Rubiozito Rubiozito merged commit 817e3e5 into dev Jul 21, 2025
2 checks passed
@Rubiozito Rubiozito deleted the transactions branch July 21, 2025 02:50
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