Repository navigation
feat: add account, settings and API root endpoints - #272
Open
kierantaylorpaddle wants to merge 1 commit into
Open
kierantaylorpaddle wants to merge 1 commit into
kierantaylorpaddle wants to merge 1 commit into
Conversation
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.
Why
The Paddle API now lets you read and change account settings, but the Node SDK had no way to call those endpoints. This PR adds them, so the SDK now covers every endpoint in the public OpenAPI spec. Method names match the PHP and Python SDKs.
What changed
paddle.accountwithget()andupdate().paddle.settingswith a get and an update method for each of the 9 settings endpoints, such asgetTaxSettings()andupdateCheckoutRecovery().paddle.apiRoot.get(), which returns the API version and the caller's auth type, account and permissions.BalanceMovementTypefor payout reconciliation report filter values.Client.patchtakes an optionalpreserveKeyssetting, which sends the request body without snake_case conversion.For the reviewer
preserveKeysexists. The currency conversions body is keyed by currency code. Our snake_case conversion turnsUSDintousd, and the API rejects that with a400(invalid propertyName 'usd'). OnlyupdateCurrencyConversionsuses it, and a test checks the JSON sent.updateCheckoutUrlacceptsnullto clear the URL, as the public spec says. The PHP SDK 1.20.0 changelog says the API no longer acceptsnull. Needs an API team call: if PHP is right,defaultUrlshould be a required string.Testing
fetch, so they check the URL, method and JSON body sent.account.update()and clearing the checkout URL weren't run.🤖 Generated with Claude Code