Skip to content

Refactor API tests to improve structure and functionality#331

Merged
fcarrero merged 5 commits into
masterfrom
update-entities-v4
Apr 28, 2026
Merged

Refactor API tests to improve structure and functionality#331
fcarrero merged 5 commits into
masterfrom
update-entities-v4

Conversation

@fcarrero
Copy link
Copy Markdown
Contributor

  • 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.
@atlantis-conekta
Copy link
Copy Markdown

Error: This repo is not allowlisted for Atlantis.

fcarrero and others added 4 commits April 28, 2026 09:49
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.
@fcarrero fcarrero merged commit 9b9d4ee into master Apr 28, 2026
8 checks passed
@fcarrero fcarrero deleted the update-entities-v4 branch April 28, 2026 15:53
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