Repository navigation
Releases: d34ndev/paddle
Releases · d34ndev/paddle
Release list
v3.0
Breaking changes
- Ruby 3.3 or later is required. Ruby 3.2 has reached end of life.
- Responses are no longer OpenStructs.
Paddle::Objectis now a lightweight class, and nested objects are
Paddle::Objectrather thanOpenStruct. Dot access, hash access (obj[:id],obj["id"]), setters,nilfor
missing attributes,each_pairandupdatework as before. Code that checksis_a?(OpenStruct)or uses
OpenStruct-only methods, such asdelete_fieldorto_hwith a block, will need updating. Attributes named after
built-in methods, such ashashorclass, need to be read withobj[:hash]. to_hnow converts nested objects to hashes too, rather than only the top level.- The
ostructandcgidependencies have been removed. If your app uses either and relied on this gem to install
it, add it to your Gemfile. - Every non-2xx response now raises an error. Previously only a fixed list of status codes raised, so responses
like 422, 502 and 504 were returned as if they'd succeeded. Non-JSON error bodies, such as an HTML page from a
gateway, also raise now rather than causing aNoMethodError. - The environment is detected from the API key. Keys starting with
pdl_live_orpdl_sdbx_set the environment
automatically, so a sandbox key with no environment set now goes to the sandbox rather than production. Setting an
environment that doesn't match the key raises anArgumentError. Older keys without a prefix behave as before. - Config changes take effect straight away. The connection used to keep the API key, environment, version and
connection options from the first request, so later changes were ignored. - Array query params are sent as comma-separated lists, e.g.
status=active,past_due, as Paddle expects. They
were sent asstatus[]=active&status[]=past_due, which Paddle didn't read as intended. ServiceUnavailableError(503) now says the API is temporarily unavailable, rather than describing a rate limit.
Rate limits are raised asTooManyRequestsError(429).
Added
Paddle.with_configto make requests with a different API key, environment or version, such as for another
Paddle account. It's safe to use in multi-threaded servers and job runners.Paddle::Webhookfor verifying webhook signatures, withverify!,valid?andconstruct_event.Paddle::Metricfor the metrics API:monthly_recurring_revenue,monthly_recurring_revenue_change,
active_subscribers,revenue,refunds,chargebacksandcheckout_conversion.- The Explore metrics API, with
Metric.explore_entitiesandMetric.explore. Collection#has_more?,next_pageandauto_paging_eachfor paging through results.skip_count: trueon any list method, to skip counting results for faster responses.Subscription.history,Subscription.charge_previewandTransaction.revise.Customer.credit_balancesto return the credit balance for every currency.Notification.replayhas been restored.Adjustment.createno longer needsitems:whentype: "full"is given.Simulation.runsandSimulationRun.eventsaccept pagination params.Paddle::Object#to_json,as_json,digandkey?.
Changed
- Building response objects is around 20x faster and uses around 20x less memory.
- Faraday 2.14.3 or later is required, for GHSA-98m9-hrrm-r99r.
- The repository has moved to d34ndev/paddle.
- The Classic API docs have moved to docs/classic.md, and now cover every Classic endpoint.
Fixed
delete_requestpassed headers to Faraday as query params.- Calling
updateon an object whose model doesn't support updating now raises aNoMethodError.
Full Changelog: v2.10...v3.0
v2.9
What's Changed
- Add support for Discount Groups by @radanskoric in #16
New Contributors
- @radanskoric made their first contribution in #16
Full Changelog: v2.8...v2.9
v2.8
- Improved the error generator so it returns a list of errors
- Included
Enumerablein Collections - Added Customer Auth Tokens
- Added Payment Methods
- Added Client Tokens
Full Changelog: v2.7.1...v2.8
v2.7.0
- Added support for the Customer Portal Sessions API
Full Changelog: v2.6.0...v2.7.0
v2.6.0
- Added support for the Webhook Simulation APIs
- Added credit notes for adjustments
Full Changelog: v2.5.2...v2.6.0
v2.5.0
- Fixed issue where
Paddle::Errorswasn't being autoloaded
Full Changelog: v2.4.1...v2.5.0
v2.4.0
What's Changed
- Paddle::Object#update Readme Updates by @shettytejas in #7
- Fixes to the new error code by @deanpcmad in #8
Full Changelog: v2.3.0...v2.4.0
v2.3.0
What's Changed
- Add more detailed error handling by @nduplessis in #6
- Paddle::Object#update Method by @shettytejas in #5
New Contributors
- @nduplessis made their first contribution in #6
- @shettytejas made their first contribution in #5
Full Changelog: v2.2.1...v2.3.0
v2.2.1
- Added support for
each,firstandlaston Collections
Full Changelog: v2.2.0...v2.2.1