dodopayments 1.85.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +249 -0
  3. data/README.md +3 -3
  4. data/lib/dodopayments/internal/util.rb +31 -0
  5. data/lib/dodopayments/models/discount.rb +10 -1
  6. data/lib/dodopayments/models/discount_create_params.rb +10 -1
  7. data/lib/dodopayments/models/discount_update_params.rb +10 -1
  8. data/lib/dodopayments/models/update_subscription_plan_req.rb +12 -1
  9. data/lib/dodopayments/resources/addons.rb +2 -1
  10. data/lib/dodopayments/resources/balances.rb +2 -1
  11. data/lib/dodopayments/resources/credit_entitlements/balances.rb +6 -3
  12. data/lib/dodopayments/resources/credit_entitlements.rb +2 -1
  13. data/lib/dodopayments/resources/customers/customer_portal.rb +2 -1
  14. data/lib/dodopayments/resources/customers/wallets/ledger_entries.rb +2 -1
  15. data/lib/dodopayments/resources/customers.rb +2 -1
  16. data/lib/dodopayments/resources/discounts.rb +8 -3
  17. data/lib/dodopayments/resources/disputes.rb +2 -1
  18. data/lib/dodopayments/resources/license_key_instances.rb +2 -1
  19. data/lib/dodopayments/resources/license_keys.rb +2 -1
  20. data/lib/dodopayments/resources/meters.rb +2 -1
  21. data/lib/dodopayments/resources/payments.rb +2 -1
  22. data/lib/dodopayments/resources/payouts.rb +2 -1
  23. data/lib/dodopayments/resources/products/images.rb +2 -1
  24. data/lib/dodopayments/resources/products/short_links.rb +2 -1
  25. data/lib/dodopayments/resources/products.rb +2 -1
  26. data/lib/dodopayments/resources/refunds.rb +2 -1
  27. data/lib/dodopayments/resources/subscriptions.rb +10 -4
  28. data/lib/dodopayments/resources/usage_events.rb +2 -1
  29. data/lib/dodopayments/resources/webhooks.rb +2 -1
  30. data/lib/dodopayments/version.rb +1 -1
  31. data/rbi/dodopayments/internal/util.rbi +20 -0
  32. data/rbi/dodopayments/models/discount.rbi +10 -0
  33. data/rbi/dodopayments/models/discount_create_params.rbi +13 -0
  34. data/rbi/dodopayments/models/discount_update_params.rbi +10 -0
  35. data/rbi/dodopayments/models/update_subscription_plan_req.rbi +14 -0
  36. data/rbi/dodopayments/resources/discounts.rbi +8 -0
  37. data/rbi/dodopayments/resources/subscriptions.rbi +12 -0
  38. data/sig/dodopayments/internal/util.rbs +10 -0
  39. data/sig/dodopayments/models/discount.rbs +5 -0
  40. data/sig/dodopayments/models/discount_create_params.rbs +7 -0
  41. data/sig/dodopayments/models/discount_update_params.rbs +5 -0
  42. data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
  43. data/sig/dodopayments/resources/discounts.rbs +2 -0
  44. data/sig/dodopayments/resources/subscriptions.rbs +2 -0
  45. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1e00c7c77049728d82d7755400be48dfeb3669313e12fda7a3962fe59f77f86
4
- data.tar.gz: f73d45f276ce85879614a8a73e1e59c2fc042dd008156e884deadfbbc0496ed5
3
+ metadata.gz: 0c8a1a7552dbf00a74ffe8f37ac2511e453f65ff038ec7aa37805abfe6d5c84c
4
+ data.tar.gz: 23c2069b2faaadec6ae986dc781bf173751d306cd26f3c065658ccc733a5a297
5
5
  SHA512:
6
- metadata.gz: 57a1a632dec7dcbc70e7b14e299a67338532687b2ac68b0ab42bbae3b05651efc3de57c5a0051ade13b3f856dcb916e256a127b7de0bf05c76c71ddcec07152b
7
- data.tar.gz: 60e9c6790c07fce46e9df1d097cecad9de764f7fa5a8f66db7cf2220d3ea62ea61bdabe0a822ae1e16b7303871d71e5307f30f34da3c1e75614b3c0f33d92c4c
6
+ metadata.gz: 74a022cc640152d922283897557440a4176700635040f3f3943fe61448b7134d21f80ad83247e50943dcfabe0fafcf83543159166de6bbb5dfcc814cd2dc4772
7
+ data.tar.gz: 4e82edb5899c4178ac6d2b50a2c2214ddde00849fa715ccf85d68b18a74d151673f8c7025db373e966cb549d0bf5e1376a74d4ec2afa7347f290942b3e5a294e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,254 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.0 (2026-03-05)
4
+
5
+ Full Changelog: [v2.0.0...v2.1.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.0.0...v2.1.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** updated openapi spec to v1.87.0 ([80979e6](https://github.com/dodopayments/dodopayments-ruby/commit/80979e652cba6b1ff1a3efaea1ff42b45ec26f41))
10
+
11
+ ## 2.0.0 (2026-03-03)
12
+
13
+ Full Changelog: [v1.85.0...v2.0.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.85.0...v2.0.0)
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * bump min supported ruby version to 3.1 (oldest non-EOL)
18
+ * remove top level type aliases to relocated classes
19
+ * use tagged enums in sorbet type definitions
20
+ * support `for item in stream` style iteration on `Stream`s
21
+ * **model:** base model should recursively store coerced base models
22
+
23
+ ### Features
24
+
25
+ * add reference links in yard ([c8112ba](https://github.com/dodopayments/dodopayments-ruby/commit/c8112ba33ce5537fcb656fb1972615acb0823df2))
26
+ * allow all valid `JSON` types to be encoded ([0e60330](https://github.com/dodopayments/dodopayments-ruby/commit/0e603309b24c57adcd565fb1d12affc5a08f661a))
27
+ * **api:** added addons ([6d29514](https://github.com/dodopayments/dodopayments-ruby/commit/6d295142298075a2744d75e501ee890d5427a613))
28
+ * **api:** added change plan api ([06485c5](https://github.com/dodopayments/dodopayments-ruby/commit/06485c576b59861095081813dcf535dba8fcfd07))
29
+ * **api:** added more models ([4429a15](https://github.com/dodopayments/dodopayments-ruby/commit/4429a153ba8bdf2f3aa4f05f799ee48cbbbab126))
30
+ * **api:** added typescript sdk for migration and updated org info ([489108b](https://github.com/dodopayments/dodopayments-ruby/commit/489108bfe4baf4a353c0da3dce815d212bfdb090))
31
+ * **api:** added unwrap functions for webhooks ([0e30a51](https://github.com/dodopayments/dodopayments-ruby/commit/0e30a51eba44226b6294b5decd49d3a0c7336817))
32
+ * **api:** added update payment method and updated openapi spec to v1.60.0 ([2c3c8ae](https://github.com/dodopayments/dodopayments-ruby/commit/2c3c8aea82f9c23f6658acf0cf5e91a46ffd4525))
33
+ * **api:** fixed api key schema to bearer ([8bf9667](https://github.com/dodopayments/dodopayments-ruby/commit/8bf966735a616fcbcc917f0c28ba5082d62e421f))
34
+ * **api:** fixed license key pagination issues in openapi spec ([653b19c](https://github.com/dodopayments/dodopayments-ruby/commit/653b19c534d3954cee9cc1cf058a3a4eb5c71433))
35
+ * **api:** fixed openapi spec issues ([691e1e4](https://github.com/dodopayments/dodopayments-ruby/commit/691e1e49fc4dbe05c39f646ffc757af61667466b))
36
+ * **api:** manual updates ([2141274](https://github.com/dodopayments/dodopayments-ruby/commit/2141274ccbc22584fcfc0ca5277e9aefd8bbe145))
37
+ * **api:** manual updates ([49eccb8](https://github.com/dodopayments/dodopayments-ruby/commit/49eccb84f1566b2b6edaa8c39cfd7ce3d86819a6))
38
+ * **api:** manual updates ([6182b9a](https://github.com/dodopayments/dodopayments-ruby/commit/6182b9a4e3461fa6443ad97bab90b8f20a667760))
39
+ * **api:** manual updates ([7daa7e8](https://github.com/dodopayments/dodopayments-ruby/commit/7daa7e896881826dac08a394e87cabde631d51e2))
40
+ * **api:** manual updates ([1f8be64](https://github.com/dodopayments/dodopayments-ruby/commit/1f8be64bb2ec602b611c264ad91b4aa369c44ac2))
41
+ * **api:** manual updates ([83aca9d](https://github.com/dodopayments/dodopayments-ruby/commit/83aca9de3cd7b0793c10a183f2a4b65fe56e8cef))
42
+ * **api:** manual updates ([5705689](https://github.com/dodopayments/dodopayments-ruby/commit/5705689fd510749a717d4554087e2bbd60d580df))
43
+ * **api:** manual updates ([50d98ad](https://github.com/dodopayments/dodopayments-ruby/commit/50d98ad0a454affb6ec69f438f24839c5212e83b))
44
+ * **api:** manual updates ([947a59a](https://github.com/dodopayments/dodopayments-ruby/commit/947a59a614333bb6d39217ac0b11c782363ec70b))
45
+ * **api:** manual updates ([a9a01b1](https://github.com/dodopayments/dodopayments-ruby/commit/a9a01b1f814809be64e5fc9207fdc6035e10d009))
46
+ * **api:** manual updates ([0119f42](https://github.com/dodopayments/dodopayments-ruby/commit/0119f42a79e78801eaa1d4e06b9b40c1f1b07dd7))
47
+ * **api:** manual updates ([823e758](https://github.com/dodopayments/dodopayments-ruby/commit/823e7583f2b76f1297961bbc84bb76ffea6ff7c3))
48
+ * **api:** manual updates ([0ffd1d5](https://github.com/dodopayments/dodopayments-ruby/commit/0ffd1d5f131e3557162092cfcbf450ebb162e99c))
49
+ * **api:** manual updates ([1a32da1](https://github.com/dodopayments/dodopayments-ruby/commit/1a32da10c544bb0c44c502b648f7a16d2747dd63))
50
+ * **api:** manual updates ([f0b9884](https://github.com/dodopayments/dodopayments-ruby/commit/f0b98849b153d8daf323e69c9b87ab2b90f7af44))
51
+ * **api:** manual updates ([a680087](https://github.com/dodopayments/dodopayments-ruby/commit/a680087c8b50c3c7f28b58454a75e2a93e80ed7d))
52
+ * **api:** openapi spec updated ([31b931f](https://github.com/dodopayments/dodopayments-ruby/commit/31b931f84071a79e0112adc4437f9f9061fc3ce6))
53
+ * **api:** update openapi spec to v1.73.0 ([6bcd390](https://github.com/dodopayments/dodopayments-ruby/commit/6bcd390343ed9c3825daa272dab1da72e9dd28be))
54
+ * **api:** updated code for v1.49.0 ([c97f843](https://github.com/dodopayments/dodopayments-ruby/commit/c97f843bc46614912a773918f02a4c259177e3ad))
55
+ * **api:** updated example ([2868d55](https://github.com/dodopayments/dodopayments-ruby/commit/2868d551c55eae61ca7550dbbea08310c72e2b2d))
56
+ * **api:** updated openapi spec ([6afbaa1](https://github.com/dodopayments/dodopayments-ruby/commit/6afbaa1e9d5f534f3f665fb179c54271e206197c))
57
+ * **api:** updated openapi spec ([3992544](https://github.com/dodopayments/dodopayments-ruby/commit/3992544db65d3663124b02aa3bbb9675546d55e9))
58
+ * **api:** updated openapi spec ([1c3e4df](https://github.com/dodopayments/dodopayments-ruby/commit/1c3e4df6a91000598838dbb786594db7d8f3b1fd))
59
+ * **api:** updated openapi spec for v1.78.1 ([ca4badc](https://github.com/dodopayments/dodopayments-ruby/commit/ca4badc441145470b772c33afb1489a44324ef73))
60
+ * **api:** updated openapi spec to 1.67.0 ([5f5d546](https://github.com/dodopayments/dodopayments-ruby/commit/5f5d5468c55f7ea8f3c9435e5802c7644a1d46b7))
61
+ * **api:** updated openapi spec to v1.51.0 and added checkout sessions ([aa2e032](https://github.com/dodopayments/dodopayments-ruby/commit/aa2e0325739776d9ee554eedcfa0e92c905d0367))
62
+ * **api:** updated openapi spec to v1.52.4 ([e3d9359](https://github.com/dodopayments/dodopayments-ruby/commit/e3d93593da35aa3ca1b1b3e414d9079b5c5d293f))
63
+ * **api:** updated openapi spec to v1.53.2 with customer credits. ([083a066](https://github.com/dodopayments/dodopayments-ruby/commit/083a066e83930f76c9d43ef27f1b7bee266ff44c))
64
+ * **api:** updated openapi spec to v1.55.0 ([e914764](https://github.com/dodopayments/dodopayments-ruby/commit/e9147649280d2d4cd5c88a1c04d57641bc036964))
65
+ * **api:** updated openapi spec to v1.56.3 ([626f6cd](https://github.com/dodopayments/dodopayments-ruby/commit/626f6cdb199b722ac7db1b058f38746a27b2b9f9))
66
+ * **api:** updated openapi spec to v1.61.5 ([aec38e4](https://github.com/dodopayments/dodopayments-ruby/commit/aec38e43c9a1ca86192d5de38f1d206de00c88c2))
67
+ * **api:** updated openapi spec to v1.66.1 ([35b5610](https://github.com/dodopayments/dodopayments-ruby/commit/35b5610c44265981fe30c4d31033dbdaba832342))
68
+ * **api:** updated openapi spec to v1.68.4 ([f2f7a5f](https://github.com/dodopayments/dodopayments-ruby/commit/f2f7a5f93555582146b0ba723598cf828fd19caf))
69
+ * **api:** updated openapi spec to v1.70.0 ([4fcbed2](https://github.com/dodopayments/dodopayments-ruby/commit/4fcbed2e6a75ce855ec1bc5fd2df00a5fed6af47))
70
+ * **api:** updated openapi spec to v1.74.0 ([7f9eebc](https://github.com/dodopayments/dodopayments-ruby/commit/7f9eebcf163a687648670f1bff2843bff682c8e3))
71
+ * **api:** updated openapi spec to v1.75.0 ([7857e53](https://github.com/dodopayments/dodopayments-ruby/commit/7857e53f436efde2c71a5ac270a3d82e2840af35))
72
+ * **api:** updated openapi spec to v1.81.0 ([f39831a](https://github.com/dodopayments/dodopayments-ruby/commit/f39831a7c2a75cc30b751882c07c038afe5bac71))
73
+ * **api:** updated openapi spec to v1.84.0 ([8c23bba](https://github.com/dodopayments/dodopayments-ruby/commit/8c23bba22c7f3ccbf48a8d017546f88e4e1895b7))
74
+ * **api:** updated openapispec to v1.10.1 ([e1f3743](https://github.com/dodopayments/dodopayments-ruby/commit/e1f374352cc65104320f68bac8d4478ff04ee106))
75
+ * **api:** updated readme example ([474d767](https://github.com/dodopayments/dodopayments-ruby/commit/474d767e16ad6fb650649a4b97ff6914798255fe))
76
+ * **api:** updated readme example ([893aefd](https://github.com/dodopayments/dodopayments-ruby/commit/893aefd61fdb025607943402f3eb5e1643c5b7dc))
77
+ * **api:** updated stainless config ([bc00e20](https://github.com/dodopayments/dodopayments-ruby/commit/bc00e20f79d4b310b58e622f44ab7893e823351e))
78
+ * **api:** updated to openapi spec v1.56.0 ([64694fb](https://github.com/dodopayments/dodopayments-ruby/commit/64694fb58a294d3f46a94ed535532e7575a56cbb))
79
+ * **api:** updated to openapi spec v1.86.0 ([cf231f8](https://github.com/dodopayments/dodopayments-ruby/commit/cf231f82c910c2d282b8492edcf797062988afa5))
80
+ * **api:** updates for openapi spec v1.55.7 ([e4bb38c](https://github.com/dodopayments/dodopayments-ruby/commit/e4bb38cf92973a23061d918ed64145159f8925a4))
81
+ * bump min supported ruby version to 3.1 (oldest non-EOL) ([c66807f](https://github.com/dodopayments/dodopayments-ruby/commit/c66807fbeecfbdeaa750deb3c6a2fcf83554340e))
82
+ * **client:** enable setting base URL from environment variable ([200d8af](https://github.com/dodopayments/dodopayments-ruby/commit/200d8af9620aa8dd2f4680120dcb8b38505580d6))
83
+ * consistently accept `AnyHash` types in parameter positions in sorbet ([c059ee7](https://github.com/dodopayments/dodopayments-ruby/commit/c059ee7583d5e4fb2a8c4d77070458c2793d70e8))
84
+ * expose response headers for both streams and errors ([d563c51](https://github.com/dodopayments/dodopayments-ruby/commit/d563c51cf65c6e39f86efdd09921c2d806c58bc5))
85
+ * handle thread interrupts in the core HTTP client ([47fb552](https://github.com/dodopayments/dodopayments-ruby/commit/47fb552d838d56c867e70ef85797aa97f51b53dd))
86
+ * implement `#hash` for data containers ([5b2231f](https://github.com/dodopayments/dodopayments-ruby/commit/5b2231f3aba80e6dbc81f707ab700226e5187540))
87
+ * implement `to_json` for base model ([f49536b](https://github.com/dodopayments/dodopayments-ruby/commit/f49536b1f9b236ccc5e9a26311ada0dd78af8cdf))
88
+ * **internal:** converter interface should recurse without schema ([311fe61](https://github.com/dodopayments/dodopayments-ruby/commit/311fe6124811bd70e9c3db85db028c51d40a6251))
89
+ * link response models to their methods in yard doc ([3983431](https://github.com/dodopayments/dodopayments-ruby/commit/39834314129a57a1927fc69a3b74fb512132850e))
90
+ * prevent tapioca from introspecting the gem internals ([c8092f5](https://github.com/dodopayments/dodopayments-ruby/commit/c8092f5d5d283d1fb3ba40632bf91f6ed4f399a4))
91
+ * remove top level type aliases to relocated classes ([6f906f2](https://github.com/dodopayments/dodopayments-ruby/commit/6f906f28a9d5dfcbee5d014b15fc4978c2138e5d))
92
+ * support `for item in stream` style iteration on `Stream`s ([d3e29e7](https://github.com/dodopayments/dodopayments-ruby/commit/d3e29e700214c4d36a167f98650fa1abf00c299a))
93
+ * support query, header, and body params that have identical names ([cd22aac](https://github.com/dodopayments/dodopayments-ruby/commit/cd22aacb0ba88b375132f3ea04e01e2024c784ad))
94
+ * support solargraph generics ([6173376](https://github.com/dodopayments/dodopayments-ruby/commit/61733766c21195d99d78c11f77d6e92bf4bdb2eb))
95
+ * support specifying content-type with FilePart class ([6b0b818](https://github.com/dodopayments/dodopayments-ruby/commit/6b0b818d6b3bf77592e40fcf627c6b1ef59be2d1))
96
+ * support webmock for testing ([8a0a4fb](https://github.com/dodopayments/dodopayments-ruby/commit/8a0a4fbcc1a9c5b255a26f2b15d3d9fd03e89ab5))
97
+ * updated openapi spec and added model and API functions for Usage Based Billing ([52c39e0](https://github.com/dodopayments/dodopayments-ruby/commit/52c39e0183bae637270fba991325e4106293d4b3))
98
+ * use Pathname alongside raw IO handles for file uploads ([c3aba4a](https://github.com/dodopayments/dodopayments-ruby/commit/c3aba4a43a0e9f6c7e84e0c77123f54cb05fa36d))
99
+ * use tagged enums in sorbet type definitions ([3b11bb1](https://github.com/dodopayments/dodopayments-ruby/commit/3b11bb1787ef1d118197d70e27cb2306b3d675f2))
100
+
101
+
102
+ ### Bug Fixes
103
+
104
+ * absolutely qualified uris should always override the default ([5d4bb4e](https://github.com/dodopayments/dodopayments-ruby/commit/5d4bb4e6e48b5d21867412a3afce1388ecc99fc7))
105
+ * always send `filename=...` for multipart requests where a file is expected ([6169b9b](https://github.com/dodopayments/dodopayments-ruby/commit/6169b9bec49c46321ab629eb09a13224e6757894))
106
+ * always send idempotency header when specified as a request option ([aab61bc](https://github.com/dodopayments/dodopayments-ruby/commit/aab61bc66903ae92c611aab90114b0bf9ac5884c))
107
+ * bad documentation url for gemdocs.org ([8fe7986](https://github.com/dodopayments/dodopayments-ruby/commit/8fe79864826485aa32c908b29fe0678942a1f164))
108
+ * better thread safety via early initializing SSL store during HTTP client creation ([ce5600b](https://github.com/dodopayments/dodopayments-ruby/commit/ce5600b693a26023715321a0fcd9c5fa63d0a2ac))
109
+ * bump sorbet version and fix new type errors from the breaking change ([de1cef9](https://github.com/dodopayments/dodopayments-ruby/commit/de1cef9c2bde2aa0679c2bea738d1eff9050cfe8))
110
+ * calling `break` out of streams should be instantaneous ([e6930c8](https://github.com/dodopayments/dodopayments-ruby/commit/e6930c86daeb47b569797caa69d46946020098d3))
111
+ * **client:** always add content-length to post body, even when empty ([8a56334](https://github.com/dodopayments/dodopayments-ruby/commit/8a563349f95dc6457611808d35a70ae3e8c71f2d))
112
+ * **client:** loosen json header parsing ([84e3779](https://github.com/dodopayments/dodopayments-ruby/commit/84e377910377206d3fb2454a5dc4bc177bd8c44c))
113
+ * **client:** send correct HTTP path ([0d37b17](https://github.com/dodopayments/dodopayments-ruby/commit/0d37b1781b1cae981f046b3df361dd5e474509e2))
114
+ * converter should transform stringio into string where applicable ([fa77255](https://github.com/dodopayments/dodopayments-ruby/commit/fa7725542f6fa856262d343ccd0340a9c3436e49))
115
+ * coroutine leaks from connection pool ([5286357](https://github.com/dodopayments/dodopayments-ruby/commit/5286357844bc467be31b0581297437f1744f313f))
116
+ * **docs:** fix mcp installation instructions for remote servers ([f209cc0](https://github.com/dodopayments/dodopayments-ruby/commit/f209cc0840cac923a4afb9b760eef6a62f354431))
117
+ * ensure gem release is unaffected by renaming ([83c0ab0](https://github.com/dodopayments/dodopayments-ruby/commit/83c0ab0cde7876ccdcb448118f38385fa9d2fa68))
118
+ * **internal:** fix formatting script for macos ([d44d729](https://github.com/dodopayments/dodopayments-ruby/commit/d44d7293ce824c7cb16803cdbb89bb2830eb04c4))
119
+ * **internal:** remove duplicate imports ([9f5ba6c](https://github.com/dodopayments/dodopayments-ruby/commit/9f5ba6c2952d88400e64f9ebf27d669c4055d8fc))
120
+ * **internal:** update release-please to use ruby strategy for README.md ([b683ef0](https://github.com/dodopayments/dodopayments-ruby/commit/b683ef092ffeb43c64c5e0eec4d429e629ed6cd4))
121
+ * issue where json.parse errors when receiving HTTP 204 with nobody ([71adcdc](https://github.com/dodopayments/dodopayments-ruby/commit/71adcdc11ac2e81764d4c1bb591ea2c9978918f8))
122
+ * label optional keyword arguments in *.rbs type definitions ([0a8efde](https://github.com/dodopayments/dodopayments-ruby/commit/0a8efdecb15fe09b55dfebfe03f4abef43e05528))
123
+ * make a typo for `FilePart.content` ([af24ffc](https://github.com/dodopayments/dodopayments-ruby/commit/af24ffcb8218c2e39f5136abe53351fdcb74e635))
124
+ * **model:** base model should recursively store coerced base models ([7e3ec62](https://github.com/dodopayments/dodopayments-ruby/commit/7e3ec628b64c921afdecc5ed45a1a7bc905ee1ef))
125
+ * path interpolation template strings ([d5683b7](https://github.com/dodopayments/dodopayments-ruby/commit/d5683b7a6b2cb469327012d2553f019c2a24ef25))
126
+ * pre-release version string should match ruby, not semver conventions ([e7415da](https://github.com/dodopayments/dodopayments-ruby/commit/e7415da98e685ab504193d2827d863494c1f747e))
127
+ * properly mock time in ruby ci tests ([3ea2a0d](https://github.com/dodopayments/dodopayments-ruby/commit/3ea2a0d6f2fc09521b075f725fac3d335ae97bb0))
128
+ * raise connection error for errors that result from HTTP transports ([3834676](https://github.com/dodopayments/dodopayments-ruby/commit/38346761ee28f56d7daf487eb910ff9965e1bcb9))
129
+ * re-exported array and map models should typecheck in steep ([d171dd4](https://github.com/dodopayments/dodopayments-ruby/commit/d171dd4f41f8706c25e3dab58046e813cee966d4))
130
+ * resolve tapioca derived sorbet errors ([bc47cc1](https://github.com/dodopayments/dodopayments-ruby/commit/bc47cc1acbe47f1e037e3e29fd2be98c3693d81f))
131
+ * restore ability to configure server environment as string during client construction ([184b186](https://github.com/dodopayments/dodopayments-ruby/commit/184b186d51411d3373e54fad4e5226bd6e4241f5))
132
+ * shorten multipart boundary sep to less than RFC specificed max length ([98b379b](https://github.com/dodopayments/dodopayments-ruby/commit/98b379b5a0c1fad181fe3e89459b6dd8a531eb94))
133
+ * should not reuse buffers for `IO.copy_stream` interop ([b8baa35](https://github.com/dodopayments/dodopayments-ruby/commit/b8baa35262752b506c9c3029f1ce41b18db6f045))
134
+ * switch to github compatible markdown engine ([4acafa8](https://github.com/dodopayments/dodopayments-ruby/commit/4acafa8745b44f81e9520a47b761ceb69ba31639))
135
+ * yard example tag formatting ([884ae9d](https://github.com/dodopayments/dodopayments-ruby/commit/884ae9d9c8107228211f94e10494cf76cadb5117))
136
+
137
+
138
+ ### Performance Improvements
139
+
140
+ * faster code formatting ([8f5e413](https://github.com/dodopayments/dodopayments-ruby/commit/8f5e413c73524aa2ba73140b587fa75790c29ebc))
141
+
142
+
143
+ ### Chores
144
+
145
+ * `BaseModel` fields that are `BaseModel` typed should also accept `Hash` ([915e7e5](https://github.com/dodopayments/dodopayments-ruby/commit/915e7e50c6c6c991f7d3733b7842e1849255cfc8))
146
+ * accept all nd-json mimetype variants ([282cbb9](https://github.com/dodopayments/dodopayments-ruby/commit/282cbb9e1cb13018e6c9858001a267b44ae17771))
147
+ * add `[@yieldparam](https://github.com/yieldparam)` to yard doc ([764cd83](https://github.com/dodopayments/dodopayments-ruby/commit/764cd8326a3ac52090c77ad7e5ff9c54d2eedca2))
148
+ * add example directory ([9599dc0](https://github.com/dodopayments/dodopayments-ruby/commit/9599dc092fc1e61dc945aafe4ea056a7630f8545))
149
+ * add generator safe directory ([6925d9e](https://github.com/dodopayments/dodopayments-ruby/commit/6925d9e7464661902c5abadd1e10c43d30d166fd))
150
+ * add json schema comment for rubocop.yml ([bf58077](https://github.com/dodopayments/dodopayments-ruby/commit/bf5807710ba93f948b4425804ea5fe9ed859fa0f))
151
+ * add README docs for using solargraph when installing gem from git ([cc5afeb](https://github.com/dodopayments/dodopayments-ruby/commit/cc5afeb7168ff12bf8955aa594e5b51d8fe6f0ff))
152
+ * add type annotations for enum and union member listing methods ([933f18b](https://github.com/dodopayments/dodopayments-ruby/commit/933f18bd7e9e9a4f8a77992a8f3ce8fef6891247))
153
+ * allow fast-format to use bsd sed as well ([7da98a7](https://github.com/dodopayments/dodopayments-ruby/commit/7da98a7d5924257f7dcec54286a7db5728091f16))
154
+ * always check if current page is empty in `next_page?` ([8151945](https://github.com/dodopayments/dodopayments-ruby/commit/8151945f643a0eda5c2f7c5f2f820594e24f8d3b))
155
+ * always fold up method bodies in sorbet type definitions ([e838c12](https://github.com/dodopayments/dodopayments-ruby/commit/e838c12eaa9a85f91e52e4d84a7d8624aa68c68a))
156
+ * broadly detect json family of content-type headers ([8af10b9](https://github.com/dodopayments/dodopayments-ruby/commit/8af10b9ca2d106ff6079145efc33fa5a20d6fc5e))
157
+ * bump dependency version and update sorbet types ([194872c](https://github.com/dodopayments/dodopayments-ruby/commit/194872ca8a1918dfd212dc0a1e0a9afeda1d9b25))
158
+ * **ci:** add build step ([8b3e31e](https://github.com/dodopayments/dodopayments-ruby/commit/8b3e31e070dd3cd8ed6ff5d1b459e85bc198e49d))
159
+ * **ci:** add timeout thresholds for CI jobs ([6b2324e](https://github.com/dodopayments/dodopayments-ruby/commit/6b2324e00467e3ba31d1729f322fb769c5394e6a))
160
+ * **ci:** only use depot for staging repos ([adc65c4](https://github.com/dodopayments/dodopayments-ruby/commit/adc65c48fe043531e0b12735f59113318f95de3e))
161
+ * configure new SDK language ([fbf7c1f](https://github.com/dodopayments/dodopayments-ruby/commit/fbf7c1f3f1bb4cf298f8f5dd164afe1bc1bc2c72))
162
+ * demonstrate how to make undocumented requests in README ([15e30c1](https://github.com/dodopayments/dodopayments-ruby/commit/15e30c1fe450d03c0014458bf39488cdf82dc0ae))
163
+ * disable overloads in `*.rbs` definitions for readable LSP errors ([da0e8d5](https://github.com/dodopayments/dodopayments-ruby/commit/da0e8d5fac38f0af35105039338c45c2613d9145))
164
+ * disable unnecessary linter rules for sorbet manifests ([c76ef72](https://github.com/dodopayments/dodopayments-ruby/commit/c76ef72796447b336eee9c28408ba53444587c96))
165
+ * do not install brew dependencies in ./scripts/bootstrap by default ([f5efab0](https://github.com/dodopayments/dodopayments-ruby/commit/f5efab0b0ba3c3390f6812f4d1397641c2c045b3))
166
+ * do not label modules as abstract ([ee3ebf5](https://github.com/dodopayments/dodopayments-ruby/commit/ee3ebf5d5ea0431cfdf48eecbc4fc07fcb366962))
167
+ * do not use literals for version in type definitions ([ad10ce8](https://github.com/dodopayments/dodopayments-ruby/commit/ad10ce8575b706df56a34ae4ff8009cf7926ab0d))
168
+ * **docs:** remove www prefix ([9457927](https://github.com/dodopayments/dodopayments-ruby/commit/94579275f0ff94427953079ad865fdf9663a2923))
169
+ * document Client's concurrency capability ([58a127e](https://github.com/dodopayments/dodopayments-ruby/commit/58a127ea27a10f63e16846b4a71046c880fb6e9d))
170
+ * document LSP support in read me ([a47019f](https://github.com/dodopayments/dodopayments-ruby/commit/a47019f5c3fb191c195766f2bc9624db415647c0))
171
+ * documentation improvements ([7c1ca7a](https://github.com/dodopayments/dodopayments-ruby/commit/7c1ca7aa4f82584d3c4f89d69791ce867eb093b4))
172
+ * ensure readme.md is bumped when release please updates versions ([c1755a1](https://github.com/dodopayments/dodopayments-ruby/commit/c1755a176241ac4db602e03caaca1c9454f890c2))
173
+ * explicitly mark apis public under `Internal` module ([dc1c17b](https://github.com/dodopayments/dodopayments-ruby/commit/dc1c17be77d2bc1b0a4332c455199f5db26a47e6))
174
+ * explicitly require "base64" gem ([7e524c3](https://github.com/dodopayments/dodopayments-ruby/commit/7e524c31a95344581939439e2bbc7481543c439f))
175
+ * extract error classes into own module ([89bad55](https://github.com/dodopayments/dodopayments-ruby/commit/89bad555e5ef74c3511829882de8aede53f951c5))
176
+ * fix misc rubocop errors ([87f611e](https://github.com/dodopayments/dodopayments-ruby/commit/87f611e853867c1f8fc8db8bae91db4825bcdc89))
177
+ * ignore linter error for tests having large collections ([0ce86cf](https://github.com/dodopayments/dodopayments-ruby/commit/0ce86cf5a6418ddba749fc2231ee8ef47fe6f25d))
178
+ * ignore some spurious linter warnings and formatting changes ([d606be8](https://github.com/dodopayments/dodopayments-ruby/commit/d606be8d1462240437777a0daef7478402876eec))
179
+ * improve example values ([af9737c](https://github.com/dodopayments/dodopayments-ruby/commit/af9737c2e781e2f428ae69e88e0c9053ba0a018b))
180
+ * improve yard docs readability ([27ae393](https://github.com/dodopayments/dodopayments-ruby/commit/27ae3930726557ed9d8405c159625fd29285b4b7))
181
+ * **internal:** add sorbet config for SDK local development ([0c7073d](https://github.com/dodopayments/dodopayments-ruby/commit/0c7073d3ac559b2005bcb010e5e6317e397b82b8))
182
+ * **internal:** annotate request options with type aliases in sorbet ([ef9de86](https://github.com/dodopayments/dodopayments-ruby/commit/ef9de86cb6c37ef9486142baa2360334b8afd8f9))
183
+ * **internal:** codegen related update ([de72849](https://github.com/dodopayments/dodopayments-ruby/commit/de72849c70dc910fd8ade8dcdc822b6876415600))
184
+ * **internal:** codegen related update ([2ee3063](https://github.com/dodopayments/dodopayments-ruby/commit/2ee3063553979bce76598ae13706f54c42d9d65c))
185
+ * **internal:** codegen related update ([04b3973](https://github.com/dodopayments/dodopayments-ruby/commit/04b3973929484317dd187e8b7833c69a6afaf3a1))
186
+ * **internal:** codegen related update ([c8b13ca](https://github.com/dodopayments/dodopayments-ruby/commit/c8b13caad2127c6c46c5a81a0653d3fe7df18754))
187
+ * **internal:** codegen related update ([d3a61a4](https://github.com/dodopayments/dodopayments-ruby/commit/d3a61a416b95b731c08c2a5dbccf397b7c033437))
188
+ * **internal:** codegen related update ([37ac705](https://github.com/dodopayments/dodopayments-ruby/commit/37ac705c96dd862f68bd228c79f5b6fac85f09e2))
189
+ * **internal:** codegen related update ([7622434](https://github.com/dodopayments/dodopayments-ruby/commit/76224342d1d6457b5f3e952d4ef5a0fb4693e3bf))
190
+ * **internal:** codegen related update ([4b014a4](https://github.com/dodopayments/dodopayments-ruby/commit/4b014a45d6a41865ab79640f9aac71f3e96b2f40))
191
+ * **internal:** contribute.md and contributor QoL improvements ([faa951b](https://github.com/dodopayments/dodopayments-ruby/commit/faa951bda7f9bf602bddadd2897c626a2535e67e))
192
+ * **internal:** expand CI branch coverage ([57ab4ac](https://github.com/dodopayments/dodopayments-ruby/commit/57ab4ac4a2e82675cc4c363cb2a29e34557701dd))
193
+ * **internal:** improve response envelope unwrap functionality ([bd020e6](https://github.com/dodopayments/dodopayments-ruby/commit/bd020e6c47279426d937cc92f7778c178ba0e3b6))
194
+ * **internal:** minor refactoring of utils ([508daf1](https://github.com/dodopayments/dodopayments-ruby/commit/508daf14348624bedf613369b9ddcc54b4d4ca68))
195
+ * **internal:** minor type annotation improvements ([6e93642](https://github.com/dodopayments/dodopayments-ruby/commit/6e93642e7fe871d82bf61e42e19e0da2852613d4))
196
+ * **internal:** misc small improvements ([85b3cc3](https://github.com/dodopayments/dodopayments-ruby/commit/85b3cc39646cc103b5eda8d0125408bb71c3f2bf))
197
+ * **internal:** more concise handling of parameter naming conflicts ([b09b0d6](https://github.com/dodopayments/dodopayments-ruby/commit/b09b0d644db3406c5dd7a3d7b21c215886036aa3))
198
+ * **internal:** mostly README touch ups ([951c9ff](https://github.com/dodopayments/dodopayments-ruby/commit/951c9ffa2d054847edebd4c304c7f119e9185fc2))
199
+ * **internal:** protect SSE parsing pipeline from broken UTF-8 characters ([fd968b5](https://github.com/dodopayments/dodopayments-ruby/commit/fd968b5ed82938685d02b63503b2452d8019ac47))
200
+ * **internal:** reduce CI branch coverage ([442e1cc](https://github.com/dodopayments/dodopayments-ruby/commit/442e1ccf6ce7c934b15bdb642d2521c208becade))
201
+ * **internal:** remove unnecessary `rbi/lib` folder ([9f1568e](https://github.com/dodopayments/dodopayments-ruby/commit/9f1568e32d2085b50453c19995b608d351c69539))
202
+ * **internal:** remove workflow ([b8bdca8](https://github.com/dodopayments/dodopayments-ruby/commit/b8bdca868dc35cc6fa16f652c67dc51f0c05c776))
203
+ * **internal:** rubocop rules ([aa67a5c](https://github.com/dodopayments/dodopayments-ruby/commit/aa67a5c1b509bce6fd1d4a48f940165c32afbd6b))
204
+ * **internal:** run rubocop linter in parallel ([4a79ab0](https://github.com/dodopayments/dodopayments-ruby/commit/4a79ab084ca7a1838319ac21c636887e38f8aacb))
205
+ * **internal:** update `actions/checkout` version ([adf1e5e](https://github.com/dodopayments/dodopayments-ruby/commit/adf1e5e83e0cbbc01167161219e666b176d572ae))
206
+ * loosen const and integer coercion rules ([c8e265c](https://github.com/dodopayments/dodopayments-ruby/commit/c8e265c34a3a8d0638a5c1cf105ee2dafab57982))
207
+ * loosen rubocop rules that don't always make sense ([1fc8852](https://github.com/dodopayments/dodopayments-ruby/commit/1fc8852623eea594202ac41aa8d84dd671e5fd43))
208
+ * make client tests look prettier ([991a08d](https://github.com/dodopayments/dodopayments-ruby/commit/991a08df1c1d12f73f018e0a974723551950700c))
209
+ * make sorbet enums easier to read ([372e04c](https://github.com/dodopayments/dodopayments-ruby/commit/372e04caef9aa18483f20bb8cce40070c0c923de))
210
+ * mark non-inheritable SDK internal classes as final ([c2dc25e](https://github.com/dodopayments/dodopayments-ruby/commit/c2dc25ec48cb1132b7678c7cc71aa46f6335ac40))
211
+ * migrate away from deprecated `JSON#fast_generate` ([2408e07](https://github.com/dodopayments/dodopayments-ruby/commit/2408e07b26c4244ac2afd7201ecfbe61a402e62d))
212
+ * misc sdk polish ([5776dd3](https://github.com/dodopayments/dodopayments-ruby/commit/5776dd3a2eddfa0406d4405278209ec54cf57edd))
213
+ * more accurate type annotations and aliases ([bf44d64](https://github.com/dodopayments/dodopayments-ruby/commit/bf44d64b3e01b29f373a88b8a982773a1377a2a8))
214
+ * more accurate type annotations for SDK internals ([7e903b3](https://github.com/dodopayments/dodopayments-ruby/commit/7e903b3b37fc068d1827e4d9e1468d72afab5223))
215
+ * more aggressive tapioca detection logic for skipping compiler introspection ([7ee8b2a](https://github.com/dodopayments/dodopayments-ruby/commit/7ee8b2a2c94e80b10f82709e49782d9d80260e83))
216
+ * more readable output when tests fail ([77fd8e7](https://github.com/dodopayments/dodopayments-ruby/commit/77fd8e7b35d54b91a965351f65afd6c1cf32d3bb))
217
+ * move `cgi` into dependencies for ruby 4 ([4695906](https://github.com/dodopayments/dodopayments-ruby/commit/46959066824ae7478dd34708a36ed3cb3f50e7cc))
218
+ * move private classes into internal module ([75c8b88](https://github.com/dodopayments/dodopayments-ruby/commit/75c8b8878ea25dc59f35bee89818616395787208))
219
+ * order client variables by "importance" ([2b96cdd](https://github.com/dodopayments/dodopayments-ruby/commit/2b96cdd10698c9ca811a19dcdfad72a4c08657e4))
220
+ * re-export top level models under library namespace ([4e6afda](https://github.com/dodopayments/dodopayments-ruby/commit/4e6afda581eefa80e150d7c9fa440407e81d9378))
221
+ * refine `#inspect` and `#to_s` for model classes ([14cfc95](https://github.com/dodopayments/dodopayments-ruby/commit/14cfc957593d8bf9f1e1e09f95a07eb9a1cb07b8))
222
+ * relax sorbet enum parameters to allow `String` in addition to `Symbol` ([51bd455](https://github.com/dodopayments/dodopayments-ruby/commit/51bd45578f2bf23387b73d2c84560840db5c6acc))
223
+ * relocate internal modules ([68aff7a](https://github.com/dodopayments/dodopayments-ruby/commit/68aff7a9737ec724af95860697ab8706970b5efb))
224
+ * remove Gemfile.lock during bootstrap ([f1eccc7](https://github.com/dodopayments/dodopayments-ruby/commit/f1eccc75277114b50980245674aa8228e18ef166))
225
+ * remove unnecessary & confusing module ([727590d](https://github.com/dodopayments/dodopayments-ruby/commit/727590df76b9c011ea77adaf15e43407139bd063))
226
+ * rename confusing `Type::BooleanModel` to `Type::Boolean` ([71169db](https://github.com/dodopayments/dodopayments-ruby/commit/71169dbb04220c8bb6333d6f593874b01995117d))
227
+ * revert ignoring Gemfile.lock ([23de062](https://github.com/dodopayments/dodopayments-ruby/commit/23de062230bfeba7aa3080136bb63bcac551c39d))
228
+ * sdk client internal refactoring ([1c5f4d7](https://github.com/dodopayments/dodopayments-ruby/commit/1c5f4d7ed016ba10d9bdb24f3524c6cdcaef04cd))
229
+ * show truncated parameter docs in yard ([0a313c0](https://github.com/dodopayments/dodopayments-ruby/commit/0a313c068901d9474348fb484cd4b34b13d30915))
230
+ * simplify internal utils ([799832e](https://github.com/dodopayments/dodopayments-ruby/commit/799832e558aa816cf14312e4279cd01385c66c1b))
231
+ * simplify yard annotations by removing most `@!parse` directives ([dc949dd](https://github.com/dodopayments/dodopayments-ruby/commit/dc949dd935f43417d384bceb52220cd69c16a283))
232
+ * slightly more consistent type definition layout ([c43efe9](https://github.com/dodopayments/dodopayments-ruby/commit/c43efe948ab908714778e41b19f1bbf319c7f707))
233
+ * sync repo ([1506a07](https://github.com/dodopayments/dodopayments-ruby/commit/1506a070998cb16fae67c664c6cc6fa96d32cf79))
234
+ * update mock server docs ([ffeefff](https://github.com/dodopayments/dodopayments-ruby/commit/ffeefff8af6454b5d60e195100c8f31367db9cf0))
235
+ * update readme ([fe8ff7a](https://github.com/dodopayments/dodopayments-ruby/commit/fe8ff7a92854c9ec119a55ca26c291a501a31e78))
236
+ * update README with recommended editor plugins ([72adaa5](https://github.com/dodopayments/dodopayments-ruby/commit/72adaa58b737eb95a2a7a08d456419eec6c887bd))
237
+ * update SDK settings ([990f795](https://github.com/dodopayments/dodopayments-ruby/commit/990f795f48c1c6e8911fc72de58400652c6df806))
238
+ * update yard comment formatting ([3b01edb](https://github.com/dodopayments/dodopayments-ruby/commit/3b01edbe2622c31fe7c0de8b59aa68108042e1a8))
239
+ * use `@!method` instead of `@!parse` for virtual method type definitions ([a95e23a](https://github.com/dodopayments/dodopayments-ruby/commit/a95e23a9e8dbdc6f7452ae4f57094ef85349f62c))
240
+ * use fully qualified name in sorbet README example ([259f1d3](https://github.com/dodopayments/dodopayments-ruby/commit/259f1d3b92f7d58d52ac793a3d2aebc489ae927e))
241
+ * use generics instead of overloading for sorbet type definitions ([768b452](https://github.com/dodopayments/dodopayments-ruby/commit/768b4523e5e072d6062d181f5fe2ae2a277aaf47))
242
+ * use multi-line formatting style for really long lines ([9f3d5db](https://github.com/dodopayments/dodopayments-ruby/commit/9f3d5db8c4e81cccae8803b7343ab40ca05fc3dd))
243
+ * validate request option coercion correctness ([3f208de](https://github.com/dodopayments/dodopayments-ruby/commit/3f208de8e3829d6bfef9bd051c498ff81613cf75))
244
+
245
+
246
+ ### Documentation
247
+
248
+ * illustrate environmental defaults for auth variables ([84de4bd](https://github.com/dodopayments/dodopayments-ruby/commit/84de4bdfa02196ff504a5765b2d60379d41068f7))
249
+ * prominently feature MCP server setup in root SDK readmes ([c5fed17](https://github.com/dodopayments/dodopayments-ruby/commit/c5fed177a666f04c83cb321f306b198c9b6baa95))
250
+ * **readme:** fix typo ([af6f8f6](https://github.com/dodopayments/dodopayments-ruby/commit/af6f8f6a62d92b2ca6d69796a3d945c60dab8b1b))
251
+
3
252
  ## 1.85.0 (2026-03-01)
4
253
 
5
254
  Full Changelog: [v1.84.1...v1.85.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.84.1...v1.85.0)
data/README.md CHANGED
@@ -8,8 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/).
8
8
 
9
9
  Use the Dodo Payments MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
10
10
 
11
- [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dodopayments-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImRvZG9wYXltZW50cy1tY3AiXSwiZW52Ijp7IkRPRE9fUEFZTUVOVFNfQVBJX0tFWSI6Ik15IEJlYXJlciBUb2tlbiIsIkRPRE9fUEFZTUVOVFNfV0VCSE9PS19LRVkiOiJNeSBXZWJob29rIEtleSJ9fQ)
12
- [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dodopayments-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22dodopayments-mcp%22%5D%2C%22env%22%3A%7B%22DODO_PAYMENTS_API_KEY%22%3A%22My%20Bearer%20Token%22%2C%22DODO_PAYMENTS_WEBHOOK_KEY%22%3A%22My%20Webhook%20Key%22%7D%7D)
11
+ [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dodopayments-mcp&config=eyJuYW1lIjoiZG9kb3BheW1lbnRzLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2RvZG8tcGF5bWVudHMuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1kb2RvLXBheW1lbnRzLWFwaS1rZXkiOiJNeSBCZWFyZXIgVG9rZW4ifX0)
12
+ [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dodopayments-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdodo-payments.stlmcp.com%22%2C%22headers%22%3A%7B%22x-dodo-payments-api-key%22%3A%22My%20Bearer%20Token%22%7D%7D)
13
13
 
14
14
  > Note: You may need to set environment variables in your MCP client.
15
15
 
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "dodopayments", "~> 1.85.0"
29
+ gem "dodopayments", "~> 2.1.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -490,6 +490,37 @@ module Dodopayments
490
490
  JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491
491
 
492
492
  class << self
493
+ # @api private
494
+ #
495
+ # @param query [Hash{Symbol=>Object}]
496
+ #
497
+ # @return [Hash{Symbol=>Object}]
498
+ def encode_query_params(query)
499
+ out = {}
500
+ query.each { write_query_param_element!(out, _1, _2) }
501
+ out
502
+ end
503
+
504
+ # @api private
505
+ #
506
+ # @param collection [Hash{Symbol=>Object}]
507
+ # @param key [String]
508
+ # @param element [Object]
509
+ #
510
+ # @return [nil]
511
+ private def write_query_param_element!(collection, key, element)
512
+ case element
513
+ in Hash
514
+ element.each do |name, value|
515
+ write_query_param_element!(collection, "#{key}[#{name}]", value)
516
+ end
517
+ in Array
518
+ collection[key] = element.map(&:to_s).join(",")
519
+ else
520
+ collection[key] = element.to_s
521
+ end
522
+ end
523
+
493
524
  # @api private
494
525
  #
495
526
  # @param y [Enumerator::Yielder]
@@ -38,6 +38,13 @@ module Dodopayments
38
38
  # @return [String]
39
39
  required :discount_id, String
40
40
 
41
+ # @!attribute preserve_on_plan_change
42
+ # Whether this discount should be preserved when a subscription changes plans.
43
+ # Default: false (discount is removed on plan change)
44
+ #
45
+ # @return [Boolean]
46
+ required :preserve_on_plan_change, Dodopayments::Internal::Type::Boolean
47
+
41
48
  # @!attribute restricted_to
42
49
  # List of product IDs to which this discount is restricted.
43
50
  #
@@ -82,7 +89,7 @@ module Dodopayments
82
89
  # @return [Integer, nil]
83
90
  optional :usage_limit, Integer, nil?: true
84
91
 
85
- # @!method initialize(amount:, business_id:, code:, created_at:, discount_id:, restricted_to:, times_used:, type:, expires_at: nil, name: nil, subscription_cycles: nil, usage_limit: nil)
92
+ # @!method initialize(amount:, business_id:, code:, created_at:, discount_id:, preserve_on_plan_change:, restricted_to:, times_used:, type:, expires_at: nil, name: nil, subscription_cycles: nil, usage_limit: nil)
86
93
  # Some parameter documentations has been truncated, see
87
94
  # {Dodopayments::Models::Discount} for more details.
88
95
  #
@@ -96,6 +103,8 @@ module Dodopayments
96
103
  #
97
104
  # @param discount_id [String] The unique discount ID
98
105
  #
106
+ # @param preserve_on_plan_change [Boolean] Whether this discount should be preserved when a subscription changes plans.
107
+ #
99
108
  # @param restricted_to [Array<String>] List of product IDs to which this discount is restricted.
100
109
  #
101
110
  # @param times_used [Integer] How many times this discount has been used.
@@ -46,6 +46,13 @@ module Dodopayments
46
46
  # @return [String, nil]
47
47
  optional :name, String, nil?: true
48
48
 
49
+ # @!attribute preserve_on_plan_change
50
+ # Whether this discount should be preserved when a subscription changes plans.
51
+ # Default: false (discount is removed on plan change)
52
+ #
53
+ # @return [Boolean, nil]
54
+ optional :preserve_on_plan_change, Dodopayments::Internal::Type::Boolean
55
+
49
56
  # @!attribute restricted_to
50
57
  # List of product IDs to restrict usage (if any).
51
58
  #
@@ -66,7 +73,7 @@ module Dodopayments
66
73
  # @return [Integer, nil]
67
74
  optional :usage_limit, Integer, nil?: true
68
75
 
69
- # @!method initialize(amount:, type:, code: nil, expires_at: nil, name: nil, restricted_to: nil, subscription_cycles: nil, usage_limit: nil, request_options: {})
76
+ # @!method initialize(amount:, type:, code: nil, expires_at: nil, name: nil, preserve_on_plan_change: nil, restricted_to: nil, subscription_cycles: nil, usage_limit: nil, request_options: {})
70
77
  # Some parameter documentations has been truncated, see
71
78
  # {Dodopayments::Models::DiscountCreateParams} for more details.
72
79
  #
@@ -80,6 +87,8 @@ module Dodopayments
80
87
  #
81
88
  # @param name [String, nil]
82
89
  #
90
+ # @param preserve_on_plan_change [Boolean] Whether this discount should be preserved when a subscription changes plans.
91
+ #
83
92
  # @param restricted_to [Array<String>, nil] List of product IDs to restrict usage (if any).
84
93
  #
85
94
  # @param subscription_cycles [Integer, nil] Number of subscription billing cycles this discount is valid for.
@@ -35,6 +35,13 @@ module Dodopayments
35
35
  # @return [String, nil]
36
36
  optional :name, String, nil?: true
37
37
 
38
+ # @!attribute preserve_on_plan_change
39
+ # Whether this discount should be preserved when a subscription changes plans. If
40
+ # not provided, the existing value is kept.
41
+ #
42
+ # @return [Boolean, nil]
43
+ optional :preserve_on_plan_change, Dodopayments::Internal::Type::Boolean, nil?: true
44
+
38
45
  # @!attribute restricted_to
39
46
  # If present, replaces all restricted product IDs with this new set. To remove all
40
47
  # restrictions, send empty array
@@ -61,7 +68,7 @@ module Dodopayments
61
68
  # @return [Integer, nil]
62
69
  optional :usage_limit, Integer, nil?: true
63
70
 
64
- # @!method initialize(amount: nil, code: nil, expires_at: nil, name: nil, restricted_to: nil, subscription_cycles: nil, type: nil, usage_limit: nil, request_options: {})
71
+ # @!method initialize(amount: nil, code: nil, expires_at: nil, name: nil, preserve_on_plan_change: nil, restricted_to: nil, subscription_cycles: nil, type: nil, usage_limit: nil, request_options: {})
65
72
  # Some parameter documentations has been truncated, see
66
73
  # {Dodopayments::Models::DiscountUpdateParams} for more details.
67
74
  #
@@ -73,6 +80,8 @@ module Dodopayments
73
80
  #
74
81
  # @param name [String, nil]
75
82
  #
83
+ # @param preserve_on_plan_change [Boolean, nil] Whether this discount should be preserved when a subscription changes plans.
84
+ #
76
85
  # @param restricted_to [Array<String>, nil] If present, replaces all restricted product IDs with this new set.
77
86
  #
78
87
  # @param subscription_cycles [Integer, nil] Number of subscription billing cycles this discount is valid for.
@@ -29,6 +29,15 @@ module Dodopayments
29
29
  # @return [Array<Dodopayments::Models::AttachAddon>, nil]
30
30
  optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true
31
31
 
32
+ # @!attribute discount_code
33
+ # Optional discount code to apply to the new plan. If provided, validates and
34
+ # applies the discount to the plan change. If not provided and the subscription
35
+ # has an existing discount with `preserve_on_plan_change=true`, the existing
36
+ # discount will be preserved (if applicable to the new product).
37
+ #
38
+ # @return [String, nil]
39
+ optional :discount_code, String, nil?: true
40
+
32
41
  # @!attribute metadata
33
42
  # Metadata for the payment. If not passed, the metadata of the subscription will
34
43
  # be taken
@@ -50,7 +59,7 @@ module Dodopayments
50
59
  enum: -> { Dodopayments::UpdateSubscriptionPlanReq::OnPaymentFailure },
51
60
  nil?: true
52
61
 
53
- # @!method initialize(product_id:, proration_billing_mode:, quantity:, addons: nil, metadata: nil, on_payment_failure: nil)
62
+ # @!method initialize(product_id:, proration_billing_mode:, quantity:, addons: nil, discount_code: nil, metadata: nil, on_payment_failure: nil)
54
63
  # Some parameter documentations has been truncated, see
55
64
  # {Dodopayments::Models::UpdateSubscriptionPlanReq} for more details.
56
65
  #
@@ -62,6 +71,8 @@ module Dodopayments
62
71
  #
63
72
  # @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
64
73
  #
74
+ # @param discount_code [String, nil] Optional discount code to apply to the new plan.
75
+ #
65
76
  # @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
66
77
  #
67
78
  # @param on_payment_failure [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::OnPaymentFailure, nil] Controls behavior when the plan change payment fails.
@@ -94,10 +94,11 @@ module Dodopayments
94
94
  # @see Dodopayments::Models::AddonListParams
95
95
  def list(params = {})
96
96
  parsed, options = Dodopayments::AddonListParams.dump_request(params)
97
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
97
98
  @client.request(
98
99
  method: :get,
99
100
  path: "addons",
100
- query: parsed,
101
+ query: query,
101
102
  page: Dodopayments::Internal::DefaultPageNumberPagination,
102
103
  model: Dodopayments::AddonResponse,
103
104
  options: options
@@ -31,10 +31,11 @@ module Dodopayments
31
31
  # @see Dodopayments::Models::BalanceRetrieveLedgerParams
32
32
  def retrieve_ledger(params = {})
33
33
  parsed, options = Dodopayments::BalanceRetrieveLedgerParams.dump_request(params)
34
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
34
35
  @client.request(
35
36
  method: :get,
36
37
  path: "balances/ledger",
37
- query: parsed,
38
+ query: query,
38
39
  page: Dodopayments::Internal::DefaultPageNumberPagination,
39
40
  model: Dodopayments::BalanceLedgerEntry,
40
41
  options: options
@@ -87,10 +87,11 @@ module Dodopayments
87
87
  # @see Dodopayments::Models::CreditEntitlements::BalanceListParams
88
88
  def list(credit_entitlement_id, params = {})
89
89
  parsed, options = Dodopayments::CreditEntitlements::BalanceListParams.dump_request(params)
90
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
90
91
  @client.request(
91
92
  method: :get,
92
93
  path: ["credit-entitlements/%1$s/balances", credit_entitlement_id],
93
- query: parsed,
94
+ query: query,
94
95
  page: Dodopayments::Internal::DefaultPageNumberPagination,
95
96
  model: Dodopayments::CreditEntitlements::CustomerCreditBalance,
96
97
  options: options
@@ -213,6 +214,7 @@ module Dodopayments
213
214
  # @see Dodopayments::Models::CreditEntitlements::BalanceListGrantsParams
214
215
  def list_grants(customer_id, params)
215
216
  parsed, options = Dodopayments::CreditEntitlements::BalanceListGrantsParams.dump_request(params)
217
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
216
218
  credit_entitlement_id =
217
219
  parsed.delete(:credit_entitlement_id) do
218
220
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -220,7 +222,7 @@ module Dodopayments
220
222
  @client.request(
221
223
  method: :get,
222
224
  path: ["credit-entitlements/%1$s/balances/%2$s/grants", credit_entitlement_id, customer_id],
223
- query: parsed,
225
+ query: query,
224
226
  page: Dodopayments::Internal::DefaultPageNumberPagination,
225
227
  model: Dodopayments::Models::CreditEntitlements::BalanceListGrantsResponse,
226
228
  options: options
@@ -279,6 +281,7 @@ module Dodopayments
279
281
  # @see Dodopayments::Models::CreditEntitlements::BalanceListLedgerParams
280
282
  def list_ledger(customer_id, params)
281
283
  parsed, options = Dodopayments::CreditEntitlements::BalanceListLedgerParams.dump_request(params)
284
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
282
285
  credit_entitlement_id =
283
286
  parsed.delete(:credit_entitlement_id) do
284
287
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -286,7 +289,7 @@ module Dodopayments
286
289
  @client.request(
287
290
  method: :get,
288
291
  path: ["credit-entitlements/%1$s/balances/%2$s/ledger", credit_entitlement_id, customer_id],
289
- query: parsed,
292
+ query: query,
290
293
  page: Dodopayments::Internal::DefaultPageNumberPagination,
291
294
  model: Dodopayments::CreditEntitlements::CreditLedgerEntry,
292
295
  options: options
@@ -291,10 +291,11 @@ module Dodopayments
291
291
  # @see Dodopayments::Models::CreditEntitlementListParams
292
292
  def list(params = {})
293
293
  parsed, options = Dodopayments::CreditEntitlementListParams.dump_request(params)
294
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
294
295
  @client.request(
295
296
  method: :get,
296
297
  path: "credit-entitlements",
297
- query: parsed,
298
+ query: query,
298
299
  page: Dodopayments::Internal::DefaultPageNumberPagination,
299
300
  model: Dodopayments::CreditEntitlement,
300
301
  options: options
@@ -17,10 +17,11 @@ module Dodopayments
17
17
  # @see Dodopayments::Models::Customers::CustomerPortalCreateParams
18
18
  def create(customer_id, params = {})
19
19
  parsed, options = Dodopayments::Customers::CustomerPortalCreateParams.dump_request(params)
20
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
20
21
  @client.request(
21
22
  method: :post,
22
23
  path: ["customers/%1$s/customer-portal/session", customer_id],
23
- query: parsed,
24
+ query: query,
24
25
  model: Dodopayments::CustomerPortalSession,
25
26
  options: options
26
27
  )
@@ -52,10 +52,11 @@ module Dodopayments
52
52
  # @see Dodopayments::Models::Customers::Wallets::LedgerEntryListParams
53
53
  def list(customer_id, params = {})
54
54
  parsed, options = Dodopayments::Customers::Wallets::LedgerEntryListParams.dump_request(params)
55
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
55
56
  @client.request(
56
57
  method: :get,
57
58
  path: ["customers/%1$s/wallets/ledger-entries", customer_id],
58
- query: parsed,
59
+ query: query,
59
60
  page: Dodopayments::Internal::DefaultPageNumberPagination,
60
61
  model: Dodopayments::Customers::Wallets::CustomerWalletTransaction,
61
62
  options: options