-
Notifications
You must be signed in to change notification settings - Fork 19
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
added endpoint for business registry api #2676
Open
OlegPhenomenon
wants to merge
43
commits into
master
Choose a base branch
from
business-registry-api
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
OlegPhenomenon
force-pushed
the
business-registry-api
branch
2 times, most recently
from
August 5, 2024 11:48
2a41048
to
c0915e7
Compare
OlegPhenomenon
force-pushed
the
business-registry-api
branch
from
September 30, 2024 12:38
cd1762e
to
9c2f186
Compare
warning on deploy: Your Gemfile lists the gem net-ftp (>= 0) more than once. |
|
put here from our discussion:
|
|
|
OlegPhenomenon
force-pushed
the
business-registry-api
branch
from
November 14, 2024 13:38
815d627
to
584008c
Compare
… ip constraint, added origin constraint, added test
…rl in statuses requests
Add success and failure callback URLs for business registry domain reservation process: - Add success_business_registry_customer_url and failed_business_registry_customer_url fields to reserve_domain_invoices table - Update ReserveDomainInvoice model to handle new callback URLs - Add URL validation in LongReserveDomainsController - Replace linkpay with oneoff_payment_link for consistency - Update tests to cover new functionality - Add wkhtmltopdf and xvfb setup in Dockerfile This change allows the business registry to specify URLs where users should be redirected after successful or failed domain reservation payments.
Add status tracking and update callback handling for domain reservations: - Add status enum to ReserveDomainInvoice (pending, paid, cancelled, failed) - Add status column to reserve_domain_invoices table with default 'pending' - Update ONE_OFF_CUSTOMER_URL to include callback path - Add callback route for EIS billing system - Update database structure for new status column This change enables tracking reservation payment status and proper callback handling for the business registry domain reservation process.
- Remove deprecated success/failed URL parameters and related validations - Add user_unique_id generation and tracking throughout the reservation process - Improve handling of intersecting domain reservations: - Add checks for existing paid/pending invoices - Implement cancellation of conflicting pending invoices - Add validation of domain availability before processing - Update invoice status checking to include user_unique_id - Refactor tests to cover new functionality: - Add tests for intersecting domains handling - Add tests for user_unique_id generation - Add tests for domain availability validation - Remove URL-related tests - Update EIS billing integration to handle user_unique_id in callbacks This change simplifies the domain reservation process while adding better handling of concurrent reservations and improved user tracking.
- Simplified DomainNameGeneratorService to generate only two variants (with and without hyphens) - Removed complex legal form handling in domain name generation - Removed unused controllers and tests related to domain release, refresh token, and status - Updated tests to match new domain name generation logic - Added return true to ReserveDomainInvoice after successful payment - Made user_unique_id optional in GetReservedDomainsInvoiceStatus - Fixed custom_field1 handling in EisBilling::AddDeposits This change simplifies the domain name generation process while maintaining core functionality.
- Add setup/teardown to properly handle method mocking across test suite - Add proper stubbing for Epp::Domain.check_availability in tests - Fix test data consistency in ReserveDomainInvoice test - Add teardown cleanup in related test files to prevent test pollution - Update test assertions to use more explicit domain name variables This change fixes flaky tests that were failing when run as part of the full test suite due to method mocking interference between tests.
- Rename oneoff_payment_link to linkpay_url for consistency - Add debug logging in domain name controllers and invoice status - Remove unused allowed_origins variable in domain names controller test - Remove empty registration code controller This change improves naming consistency for payment URLs and adds logging to help with troubleshooting domain registration flow.
- Add `expired?` method to `ReservedDomain` model to check if domain has expired - Add `destroy_if_expired` method to `ReservedDomain` model to remove expired domains - Add corresponding tests in `ReservedDomainTest` to verify expiration handling - Update database structure to include `expire_at` field in reserved_domains table Domains with null `expire_at` are considered non-expiring and will not be destroyed.
- Add expiration check in DomainAvailabilityCheckerService to automatically remove expired domains - Update InvoiceResponseStruct to include reserved_domain_names in response - Add tests for expired domain handling in DomainAvailabilityCheckerService - Add tests for expired domain handling in ReserveDomainInvoice - Remove debug logging from EisBilling service The changes ensure that expired reserved domains are automatically removed during availability checks, making them available for new reservations. Domains with null expire_at remain permanently reserved.
Add expiration time information to domain reservation responses across all endpoints: - Add FREE_RESERVATION_EXPIRY (7 days) and PAID_RESERVATION_EXPIRY (1 year) constants - Update ReservedDomain model to set expire_at on creation - Modify ReserveDomainInvoice#build_reserved_domains_output to include expire_at - Update API responses to include expire_at in reserved_domains data - Add comprehensive tests for expiration time handling This change ensures consistent expiration time handling across both free and paid domain reservations, with proper validation in the test suite.
…roller - Introduced AuthorizationError for handling token authentication failures. - Added before_action :authenticate_token! to ensure requests have valid tokens. - Implemented token validation logic using environment variable 'business_registry_api_tokens'. - Added error handling for unauthorized requests with render_unauthorized method. - Updated config/application.yml.sample to include sample API tokens.
Add Bearer token authentication to all business registry API tests: - Add valid_token setup in test environment - Update test headers to include Authorization token - Ensure consistent API authentication across all business registry endpoints - Maintain backward compatibility with existing IP and Origin restrictions
- Add user_unique_id to ReservedDomain.reserve_domains_without_payment response - Create FreeDomainReservationHolder with unique ID for free domain reservations - Add error handling for case when no domains are available - Update tests to cover new functionality and error cases - Increase unique ID length from 8 to 10 characters This change adds tracking of free domain reservations through unique IDs and improves error handling when no domains are available for reservation.
- Add GET /api/v1/business_registry/reserve_domains/:user_unique_id endpoint - Add output_reserved_domains method to FreeDomainReservationHolder model - Add before_action to validate user_unique_id and find holder - Add integration tests for new endpoint - Add model tests for output_reserved_domains method - Update routes to include new endpoint The endpoint returns information about previously reserved domains including names, passwords and expiration dates. Returns 404 if user_unique_id is invalid.
OlegPhenomenon
force-pushed
the
business-registry-api
branch
from
December 6, 2024 11:39
a1303df
to
a0c4fb1
Compare
- Add expire_at field to Reserved Domains form and permit it in controller - Add expire_at column to Reserved Domains index table with status indicators - Add expire date search filter using custom ransacker to ignore time component - Update translations and labels - Change "edit_pw" to "edit" in views and translations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.