Skip to content

Refactor/dynamic user agent and sdk structure#14

Open
viniciussantos02 wants to merge 4 commits into
AbacatePay:mainfrom
viniciussantos02:refactor/dynamic-user-agent-and-sdk-structure
Open

Refactor/dynamic user agent and sdk structure#14
viniciussantos02 wants to merge 4 commits into
AbacatePay:mainfrom
viniciussantos02:refactor/dynamic-user-agent-and-sdk-structure

Conversation

@viniciussantos02
Copy link
Copy Markdown

@viniciussantos02 viniciussantos02 commented May 17, 2026

Summary

Improved the SDK initialization flow, dynamic UserAgent resolution, and overall code structure.

Related Issue

Melhorias para o abacatepay-java-sdk

Why

This improves the SDK internal architecture, avoids invalid SDK initialization states, and adds dynamic User-Agent version resolution based on the package metadata.

It also improves maintainability and aligns the implementation with common Java SDK best practices.

What changed

  • Added fail-fast API key validation during SDK initialization
  • Added dynamic SDK version resolution using package metadata
  • Improved User-Agent generation with SDK, Java, and OS information
  • Refactored billing initialization into a reusable final instance
  • Converted helper methods to static where appropriate
  • Improved overall code readability and maintainability

Breaking changes

  • Yes
  • No

Checklist

  • Docs updated
  • CI passing
  • I followed the CONTRIBUTING guidelines
  • I added or updated tests (if applicable)

Additional context

This PR focuses only on internal improvements and does not introduce API changes.

Dynamic UserAgent Example

image

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