Skip to content

PTHMINT-117: terminals and terminal-groups APIs and tests#56

Open
zulquer wants to merge 3 commits into
masterfrom
PTHMINT-117
Open

PTHMINT-117: terminals and terminal-groups APIs and tests#56
zulquer wants to merge 3 commits into
masterfrom
PTHMINT-117

Conversation

@zulquer
Copy link
Copy Markdown
Collaborator

@zulquer zulquer commented Apr 23, 2026

This pull request introduces a comprehensive implementation for POS terminal and terminal group management in the SDK, along with example scripts and supporting models. The changes include new managers, request and response models, and integration into the main SDK interface.

SDK Feature Additions:

  • Added TerminalManager and TerminalGroupManager classes to provide API operations for POS terminals and terminal groups, including listing and creation endpoints. [1] [2] [3] [4]
  • Integrated the new managers into the Sdk class, exposing get_terminal_manager and get_terminal_group_manager methods for easy access. [1] [2]

Request and Response Models:

  • Introduced CreateTerminalRequest for creating POS terminals, with validation for allowed providers and builder-style methods for setting attributes. [1] [2]
  • Added Terminal response model to represent terminal data returned by the API, including a static method for instantiation from dictionaries. [1] [2]

Examples and Usage:

  • Added example scripts demonstrating terminal creation, terminal listing, and fetching terminals by group, showcasing usage of the new SDK features and environment variable setup. [1] [2] [3]

Other Improvements:

  • Minor test utility improvement: _validate_e2e_base_url now takes the environment variable name for clearer error messages.

Base automatically changed from PTHMINT-116 to master April 27, 2026 09:18
zulquer added 2 commits May 11, 2026 16:32
Introduce Terminal and TerminalGroup API surface: TerminalManager and TerminalGroupManager, request/response models (CreateTerminalRequest, Terminal), and listing/creation flows. Expose new SDK getters (get_terminal_manager, get_terminal_group_manager). Add example scripts for creating and listing terminals and listing terminals by group, plus dedicated example E2E fixtures that selectively skip tests when required env vars are missing. Include comprehensive unit and E2E tests covering serialization, option filtering, auth scopes, endpoint URLs, and response mapping. Also adjust shared e2e conftest validation signature to accept env name for clearer error messages.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.96%. Comparing base (8954459) to head (e68d6d1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   92.83%   92.96%   +0.12%     
==========================================
  Files         164      172       +8     
  Lines        2889     3026     +137     
==========================================
+ Hits         2682     2813     +131     
- Misses        207      213       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add a pytest_collection_modifyitems hook in tests/multisafepay/e2e/conftest.py to skip all E2E tests when the E2E_API_KEY environment variable is not set, avoiding hard errors from real API calls during fixture setup. Also introduce EXAMPLE_E2E_NODE_PREFIX in tests/multisafepay/e2e/examples/conftest.py and restrict the example conftest's collection logic to only operate on example E2E tests.
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.

1 participant