Refactor API tests to improve structure and functionality#331
Merged
Conversation
Contributor
fcarrero
commented
Apr 28, 2026
- Updated SubscriptionsCustomerPortalApiTest to utilize the SubscriptionsCustomerPortalApi class and handle exceptions properly.
- Refactored TaxesApiTest to implement actual test cases for creating, deleting, and updating taxes.
- Enhanced TokensApiTest to create a token and validate the response.
- Improved TransactionsApiTest to retrieve transaction details and validate the response structure.
- Updated TransfersApiTest to fetch transfer details and validate the response.
- Refactored WebhookKeysApiTest to implement create, delete, get, and update webhook key functionalities.
- Enhanced WebhooksApiTest to implement create, delete, get, and update webhook functionalities, including testing webhook events.
- Updated SubscriptionsCustomerPortalApiTest to utilize the SubscriptionsCustomerPortalApi class and handle exceptions properly. - Refactored TaxesApiTest to implement actual test cases for creating, deleting, and updating taxes. - Enhanced TokensApiTest to create a token and validate the response. - Improved TransactionsApiTest to retrieve transaction details and validate the response structure. - Updated TransfersApiTest to fetch transfer details and validate the response. - Refactored WebhookKeysApiTest to implement create, delete, get, and update webhook key functionalities. - Enhanced WebhooksApiTest to implement create, delete, get, and update webhook functionalities, including testing webhook events.
|
Agrega validaciones de estructura para: object, livemode, currency, createdAt y paymentStatus en todas las respuestas de orden. Para endpoints de lista, valida hasMore y tipo de items en data. Agrega validación del objeto paymentMethod dentro de charges, verificando type, object y campos específicos de tarjeta (last4, brand, expMonth, expYear) cuando aplica. testCancelOrder se salta temporalmente por inconsistencia entre el tipo de tax_lines en el modelo OrderResponse (espera array plano) vs la API real (devuelve objeto paginado). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Introduced ShippingLinesDataResponse class for handling shipping line data, including properties such as amount, carrier, tracking number, method, metadata, id, object, and parent_id. - Introduced TaxLinesDataResponse class for managing tax line data, with properties including amount, description, metadata, id, object, and parent_id. - Both classes implement ArrayAccess and JsonSerializable interfaces for better integration with PHP's array and JSON functionalities. - Added validation rules for properties to ensure data integrity.
… OrderCheckoutRequest models
luiscolorado-conekta
approved these changes
Apr 28, 2026
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
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.