Skip to content
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

feat (anrok integration): add pull taxes service that is used in async mode #2984

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

lovrocolic
Copy link
Collaborator

Context

Currently Anrok calls are sync and performed during invoice generation

Description

The goal of this improvement is to make calls to Anrok in dedicated job so that we can implement throttling for rate limit issues.

This PR adds job and service that will be called in async mode. The main goal of the service is to fetch taxes and finalize the invoice. Service for retrying failed invoices is basically subset of the new service, so the new service will be also used there.

The next step is to adjust:

  • retry service
  • calculate_fees_service
  • refresh service
  • finalize service

As part of adjustment in the places where taxes are fetched in the synchronous way, we will call Invoice::ProviderTaxes::PullTaxesAndApplyJob and return TaxUnknownError

@lovrocolic lovrocolic merged commit 7d1ec9d into main Dec 20, 2024
6 checks passed
@lovrocolic lovrocolic deleted the ftr-anrok-pull-async branch December 20, 2024 12:27
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