Add integrator and child account support #6
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.
1️⃣ This feature was directly requested to add support for PrintNode Integrator accounts and child account management.
2️⃣ No, all changes are focused on adding Integrator/child account support.
3️⃣ Yes, new tests have been added for
AccountServiceandRequestOptionsto cover the new functionality.4️⃣ This PR introduces comprehensive support for PrintNode Integrator accounts, enabling the management and impersonation of child accounts. This is crucial for applications that need to provision and control printing for multiple end-users or customers through a single Integrator account.
Key improvements include:
child_account_by_id,child_account_by_email, andchild_account_by_creator_refoptions toRequestOptions, which translate toX-Child-Account-*headers. This allows any API request to be made on behalf of a specific child account.AccountServicehas been implemented, providing methods forcreate,update,setState(e.g., suspend/activate), anddeletechild accounts.PrintNodeApiRequestornow supportsPUTandPATCHHTTP methods, handles raw string bodies (specifically forsetState), and correctly processes204 No Contentresponses.docs/printnode/api.mdwith detailed usage examples for both impersonation and account management.This functionality is essential for developers building platforms that integrate deeply with PrintNode and manage multiple client accounts.
5️⃣ Thanks for contributing! 🙌