diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4e5907d0..2cdfc9f7 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,23 +1,23 @@ lockVersion: 2.0.0 id: ab657d60-207e-43a4-8cc8-692a672950ed management: - docChecksum: 4a5c88917edd89070470cd4cefad49fe + docChecksum: 33f6788ec2618041918ac47ba1eca8f2 docVersion: 0.0.1 - speakeasyVersion: 1.796.3 - generationVersion: 2.934.1 - releaseVersion: 0.38.6 - configChecksum: 5e84744bff3da25d0c4cfd94f62273c3 + speakeasyVersion: 1.797.0 + generationVersion: 2.937.18 + releaseVersion: 0.38.7 + configChecksum: 4df7585004ec911f19e544b5d53347af repoURL: https://github.com/dubinc/dub-python.git installationURL: https://github.com/dubinc/dub-python.git published: true persistentEdits: - generation_id: c4a22726-c70b-42b7-9382-d132f4f973bb - pristine_commit_hash: 55a668757894565c7fd052f2858060cf733397a2 - pristine_tree_hash: 81fdb400ae31213a39e4aec3aae81eb98e6e39a3 + generation_id: 597ccf1a-bca9-4aa6-92d5-cd339a261d5f + pristine_commit_hash: ed2a26472910a01f7670b7e079cc28bee3371da7 + pristine_tree_hash: 87e8db760da1c0c121d4504f907aa5778c948689 features: python: additionalDependencies: 1.1.0 - constsAndDefaults: 1.0.7 + constsAndDefaults: 1.0.8 core: 6.1.2 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 @@ -36,9 +36,9 @@ features: nullables: 1.0.2 pagination: 3.0.10 responseFormat: 1.1.0 - retries: 3.1.1 + retries: 3.1.2 sdkHooks: 1.3.0 - unions: 3.1.9 + unions: 3.1.10 trackedFiles: .gitattributes: id: 24139dae6567 @@ -50,8 +50,8 @@ trackedFiles: pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:28fe109f803a386effa3ed2c3e036661cbf59359 - pristine_git_object: e49aaf8025710153140d2795589fef98b27d8c3d + last_write_checksum: sha1:45e3cc34eae9f3cd7c885bac1032f899790f6331 + pristine_git_object: 6b2e1f6e085b2ddaf40c1e9a9827b143a81eed7c docs/models/components/accesslevel.md: id: 3e59708c73df last_write_checksum: sha1:4742d279db9bb6698573eb0cb185a7c0a845463c @@ -158,8 +158,8 @@ trackedFiles: pristine_git_object: 571a4e813789dfcaa38c1a64f17a9123ab6972da docs/models/components/commissioncreatedeventdata.md: id: 3354f5392594 - last_write_checksum: sha1:992895dfb11761957c81e16f6e0e7b4dc5cb3d84 - pristine_git_object: f0c5905e99c7996fca473422f3bb44e7e333ad5d + last_write_checksum: sha1:37a799bac55d27730660618ef729070a2d35d0a4 + pristine_git_object: 40fbc76e31e85762bf87f92de400f6aade5a64de docs/models/components/commissioncreatedeventevent.md: id: 4a349652cc27 last_write_checksum: sha1:8ba103f7b6c41b43e0e21662af6ceb2559a999ac @@ -414,8 +414,8 @@ trackedFiles: pristine_git_object: 491c40556703b738d7430a2b9a29e705a21a5685 docs/models/components/partnerenrolledeventdata.md: id: 505d7bbbf137 - last_write_checksum: sha1:9e3b0e4e511a859b6054cae18c0ab23b0f639406 - pristine_git_object: 0e608c1fad434f2d71a0d4e330e67ce7c614668b + last_write_checksum: sha1:50f44da27512f46e094eb93266b4971943781894 + pristine_git_object: a7b3c61b51062964b795b431e953edac0fcfa9d6 docs/models/components/partnerenrolledeventevent.md: id: 2e4e0307fc74 last_write_checksum: sha1:c6f25e24c6562e32d162bd2247aa84215b256b51 @@ -922,8 +922,8 @@ trackedFiles: pristine_git_object: 4f3c9ea99ebcd1c13e6f0afa6bfb0a5def800814 docs/models/operations/createpartnerlinkrequestbody.md: id: febe6fdd6895 - last_write_checksum: sha1:1e3bb536027565dd2e1cc58e425e4dbd6815ec27 - pristine_git_object: 756fcb1212fd06befffedf099ffd71988382c26d + last_write_checksum: sha1:1a98b55d92abe8100b73519d278c8dd234a3bb5c + pristine_git_object: d93b11b4a84ac9b5576d1d6c97828765764fe0ad docs/models/operations/createpartnerlinks.md: id: 1fd78f95d437 last_write_checksum: sha1:7f136f9e2a4d29fbf53ff5a52a9ee0c2d6101215 @@ -958,8 +958,8 @@ trackedFiles: pristine_git_object: 43005e3df9fe2a6fb96284b44e19c660f76a6d92 docs/models/operations/createpartnerresponsebody.md: id: 918e4dce0185 - last_write_checksum: sha1:7b95f412e901186c7e028a42d03e6fcf0dca9ce5 - pristine_git_object: f1d32b1168f1209716949388c6ee246c8f6157ed + last_write_checksum: sha1:9023725ad8b88b309f756d309c826f2a9411c489 + pristine_git_object: 1ffe664d1574b53d7dab0332d77a7a206ab3685b docs/models/operations/createpartnerstatus.md: id: ca5d508da415 last_write_checksum: sha1:f565fe01cff33af4b72ca67095b09e85eea2cdcf @@ -1330,8 +1330,8 @@ trackedFiles: pristine_git_object: 74b08ad0fd59610d8eddba66cf06393d1ab49721 docs/models/operations/listcommissionsresponsebody.md: id: 8c3436662e79 - last_write_checksum: sha1:a033e9790f84150e88d91903a8ef06fa86eac525 - pristine_git_object: 7d425462b6cd1a9529b26770a9a0fb0d1b6cecc4 + last_write_checksum: sha1:58d76b002433f3395202a2783de3251dc5e5452b + pristine_git_object: 782ceaec1002d5f61b4e0774427d6cbfc06b8036 docs/models/operations/listcommissionsstatus.md: id: 5204c1cc3f78 last_write_checksum: sha1:f6117c8acceead6dfbe8092b7d493a520d429b49 @@ -1466,8 +1466,8 @@ trackedFiles: pristine_git_object: d7ed12cb4a819696a8966057b4f04e847d7fe667 docs/models/operations/listpartnersresponsebody.md: id: e60469e13fe9 - last_write_checksum: sha1:46debe516d41d9ac1f81b1f1cf06545342e1e07b - pristine_git_object: 6097df9543d30fbe8524581b8d23d720cf5e2bc9 + last_write_checksum: sha1:ca534e6026fe0b6e279ae9b24bd6f2a250c8ef32 + pristine_git_object: 75e17efe2b8e6d65ea969734ee56f9d100a9bf98 docs/models/operations/listpartnersstatus.md: id: 952f16385320 last_write_checksum: sha1:002a6881c3e12bd7311b9489b9d6f30d7f320664 @@ -1834,8 +1834,8 @@ trackedFiles: pristine_git_object: a868919275f8c9651cb1878d432e9f87f705d1ec docs/models/operations/updatecommissionresponsebody.md: id: a22399ad4e94 - last_write_checksum: sha1:b226daf5c87341eaa194f3c396d522f12232fdab - pristine_git_object: 029ee15220c97c2bdee7daf9bc63b83cb74324f1 + last_write_checksum: sha1:196e8e87ae5b19a424d6fc1d999290414ef3fc2f + pristine_git_object: 27a5efab6e810dc1320a164175e33f8583de0b93 docs/models/operations/updatecommissionstatus.md: id: 89160707cc65 last_write_checksum: sha1:e4deb9310108dfff80509ed807fce323a1e54c85 @@ -1862,8 +1862,8 @@ trackedFiles: pristine_git_object: 585fee669e5e477d250735357da6a3a5986e0749 docs/models/operations/updatecustomerrequestbody.md: id: 1429cc32f823 - last_write_checksum: sha1:a644285c69f35308a2df5b8c8826f7a247d0bfb6 - pristine_git_object: 50f054976fdf330ddf430af81cd7ec61d3146512 + last_write_checksum: sha1:68c912b9d25cb552294a21616d097ac11ded6dae + pristine_git_object: 06484d2d80c60976507549e6f5adb9c7a1382661 docs/models/operations/updatecustomerresponsebody.md: id: 2239ad02e19c last_write_checksum: sha1:41f9515f6b250a641040743a243d0dc638eee49e @@ -1946,8 +1946,8 @@ trackedFiles: pristine_git_object: 6c4ee71d075bad697a38b07c693f8b389b4c36c9 docs/models/operations/upsertpartnerlinkrequestbody.md: id: c979f5a7d50e - last_write_checksum: sha1:6146b03080bc1ab820fa41951e80473960111b86 - pristine_git_object: 5c2ae71933a3ba92d8173ccfc5ba20525db0d7ea + last_write_checksum: sha1:f5db14d0706a67ee84d767ee73a74acdd0d93cb6 + pristine_git_object: a04083da0fdf69cafc62069830e40f3367bcbc03 docs/models/operations/upsertpartnerlinktagids.md: id: d5cd29a01c90 last_write_checksum: sha1:0c7c0b6dd53e01d2d4fa443f437c46f506462f6a @@ -1994,8 +1994,8 @@ trackedFiles: pristine_git_object: 9fd40da78140e9d65bbbecdbd0579e26851854c6 docs/sdks/embedtokens/README.md: id: 7b1657bdf3bc - last_write_checksum: sha1:db2800986b994c1d903d63bbafc42265645ddf70 - pristine_git_object: 0a989a967408df139f15b444ffef064e9923cbc2 + last_write_checksum: sha1:bdbbe0955813d52abe0cc0235dc13f108dd6d728 + pristine_git_object: 441a3e84a540d02b57de224ef5063569c43b025e docs/sdks/events/README.md: id: cf45a4390b9b last_write_checksum: sha1:398a874efb750e0b6948f30c101ae766619f4dab @@ -2006,16 +2006,16 @@ trackedFiles: pristine_git_object: a322266d9a29fe0fd523bfc81f603200039ebc25 docs/sdks/links/README.md: id: 8c355a557e3e - last_write_checksum: sha1:2b8504534617abc25aee00748808e62302b91959 - pristine_git_object: 9069cf970555683c5b3fa528113f10e97f33a121 + last_write_checksum: sha1:772cf7b57973db232e4cccaa98255b5538a880bb + pristine_git_object: 32f24525f29c6e57c517639f7b27d96ada84787d docs/sdks/partnerapplications/README.md: id: 6cf37e16d4c1 last_write_checksum: sha1:3578c5ee07ffb4515ea1a803151025a49f335e85 pristine_git_object: 60f64ec4ff10645d4eb486e92e358274925ed378 docs/sdks/partners/README.md: id: 85ac19d13270 - last_write_checksum: sha1:e822fe93ad5fe817421f4c3239821de3de036e85 - pristine_git_object: 15896f2e6571d4c8c8e9c7694360e49081046ea2 + last_write_checksum: sha1:c4847e912f92ae532ad1e7f6ac76a82d532e757a + pristine_git_object: 47ea80ec17fc06df16990e9a0c0436e2e20f6675 docs/sdks/payouts/README.md: id: 184ed4a74471 last_write_checksum: sha1:34ab994bcbde69a61c3d864c52dcd1b876870420 @@ -2046,8 +2046,8 @@ trackedFiles: pristine_git_object: 0694fc0429fe2e082727e6847677957b9027e81e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:bd8c7551a418bdc79ac7e2b05434e08138284211 - pristine_git_object: e2deb1c5910ca67b857d87d25bcbcb1a2aa34174 + last_write_checksum: sha1:3cb9f91bb67a1d897031d4843f17e6c78c37b5c8 + pristine_git_object: d3c74b493f1a32824554f43d75903e35c3113ab1 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:98ab0adc36f1ccd31422544b0dd94e008aa47804 @@ -2074,8 +2074,8 @@ trackedFiles: pristine_git_object: ea5bc2d7f189075f453b6e70c60f2eaa418ff18e src/dub/_version.py: id: 2e88e1f01047 - last_write_checksum: sha1:406bd72b342851dbce0750a1274ef5558192938e - pristine_git_object: 7eca31cadf834e7d9be8dffd107d455c30f804aa + last_write_checksum: sha1:726039056e24fd1c0f2a6bef1c8f9f5ff6fdc7e6 + pristine_git_object: 9bcfcd9ae0f81ce80c396d7d1b86fa5cb050d694 src/dub/analytics.py: id: b7a4fa47e744 last_write_checksum: sha1:483eac9a8044989991e4e6edf968ac9e8e0998cc @@ -2134,68 +2134,68 @@ trackedFiles: pristine_git_object: 17f75b369e0e97a1a8b63ee157b6ff67ff1c64a1 src/dub/models/components/analyticsbrowsers.py: id: 2d7aed63032d - last_write_checksum: sha1:242eff9c4d633d958c2d5b8cab336ec9e3d906c0 - pristine_git_object: 47a7ab291236c953ec551a4a44c23241250c8095 + last_write_checksum: sha1:c3979552645ef8da87f9cfb05a6385d8384905c1 + pristine_git_object: 290ef8c70d5cf5aa8b8be16c699a012a9cab089e src/dub/models/components/analyticscities.py: id: b3955b28b893 - last_write_checksum: sha1:544b46b0ad8a364fb4e6e8588a7534761e65e2b1 - pristine_git_object: fa5cbe56f061447bbf63f89c269a5af738c251a8 + last_write_checksum: sha1:3d21aec6656ad873ab3a842ced08c96e1ac7d30b + pristine_git_object: 4d12a2bf84ceed39c50d9f6fab96ffad0d3a587b src/dub/models/components/analyticscontinents.py: id: 4eff5073b1b2 - last_write_checksum: sha1:f8fcc9e29024195627ca44f2a01737bf2b108920 - pristine_git_object: b2713492dcbc42c37928b012a0e5cae297b34a15 + last_write_checksum: sha1:01e95c1f92d8aa496b43f7d015864c8575995ca7 + pristine_git_object: 1105ebfea497d1b2e1f3b9a6923a4da4bd9abdb9 src/dub/models/components/analyticscount.py: id: 3d4eaeca0dab - last_write_checksum: sha1:6636d622de1d3a8e14e6abbeb3e14e75443319f6 - pristine_git_object: ab5b49a3733856fb148a0168b176246e569ad324 + last_write_checksum: sha1:84e6e27a80f1fe6b7d9723e7cd3bfaa1c57aa102 + pristine_git_object: 6bd9f858dbdde93612809aea415335866ff02148 src/dub/models/components/analyticscountries.py: id: 7cde755b2b01 - last_write_checksum: sha1:59c0a8b634c771b39740d9b1727b8c300b2d55ab - pristine_git_object: ed2c199dd5abb53d417ec36408625a1057128e00 + last_write_checksum: sha1:3dab62422003a85b2948c5961c8b7e6500a343c2 + pristine_git_object: 5ab73953fb94edec00efcf843dbe6cc321948adf src/dub/models/components/analyticsdevices.py: id: 4d2149848454 - last_write_checksum: sha1:7d36ac16cf699fb4d44d0728b114d264e2788b72 - pristine_git_object: d372415d3b6feb912db5d4d9c4143d24482281bf + last_write_checksum: sha1:29d636c6b9187bb4748974c46ea75ddc9c953844 + pristine_git_object: bdeb0d3548e5bbc1cf5c4c84d1b4892d7e9fbbc7 src/dub/models/components/analyticseventnames.py: id: a659aed4a71d - last_write_checksum: sha1:c4e3d7a36650ef6c8e054058ebf26c58c009c526 - pristine_git_object: ab962824bd90472a10063cedb39be3c61dd96423 + last_write_checksum: sha1:0e1a8aa053a24f37759035f34c34af6896b6f0b8 + pristine_git_object: 9e6c2f363026558b392122127f2770cda2217b78 src/dub/models/components/analyticsos.py: id: e816bcb23c06 - last_write_checksum: sha1:5e271c2648cbfb847e99bfd1fcbc435a1ff9b375 - pristine_git_object: d7b5cbfa0cb2adb64d2322ba45bada8ca3022e27 + last_write_checksum: sha1:4003fb1966538b06b9f900a45e232ca9f1aa9a20 + pristine_git_object: bcce5209f76c996fd613a2e41323cd8c3b2717d9 src/dub/models/components/analyticsreferers.py: id: 01ab4c60eb52 - last_write_checksum: sha1:69c6b13a7cf3dd6589cd66598d1017dcdac26c95 - pristine_git_object: b4e5fb256ff4aa3998e76dd135375044b0607fe4 + last_write_checksum: sha1:7abd928032ead8adf61d9ac943cf5ec4000e67e9 + pristine_git_object: 8b82acdcee0484e4b8be7c048df62d3a346d0227 src/dub/models/components/analyticsrefererurls.py: id: bd959ed67a29 - last_write_checksum: sha1:226510b7108627045f0aa1396dca4ab0656decc9 - pristine_git_object: 27d0b2ac996cd7477d816ec87012118e2fff19a3 + last_write_checksum: sha1:9d6a0a3cb77d065889536d703e21df70317b4f12 + pristine_git_object: 780778b1b098fbf4c043d7ed0369841f30c83b4b src/dub/models/components/analyticsregions.py: id: 6e479d388cb3 - last_write_checksum: sha1:2326b96a8b444f9b91075e02f94e195b7315e64f - pristine_git_object: d2b8debeeefc84ecc9202b38b221c9b4360b606d + last_write_checksum: sha1:9df308362b9b537e9b2196f62b0fb2ac0a288398 + pristine_git_object: d80e672ae4d7aa6f3e23f51bb39fa7ee3bff4b8f src/dub/models/components/analyticstimeseries.py: id: 20e2f7b7ffdd - last_write_checksum: sha1:e79ab82dc2735479f5db2b89c855256b8163d1a7 - pristine_git_object: 90951b8257fc203bbfb84101330bd6cd64436f3b + last_write_checksum: sha1:31d298871caa1ab91da624ef7dfe5caa669997c2 + pristine_git_object: 294439a4584195d34ef72d84818995861efe417a src/dub/models/components/analyticstoplinks.py: id: dab95f625944 - last_write_checksum: sha1:1a1f3b3f049fb6a3a173e929594f4e56d8568aec - pristine_git_object: 2144bd6a3ba3c049097fc899373a1c696f8ee5cb + last_write_checksum: sha1:98953696e28273b6c506930d9b912fde0e9e2671 + pristine_git_object: ec8a988bb501c480e73be4b43c2c0880175ebd7f src/dub/models/components/analyticstopurls.py: id: 52fa0a259ac5 - last_write_checksum: sha1:3e1fe2f650c11e3612d91f9845a86a1c558ae676 - pristine_git_object: cad472f3e0c5a1cb45afd31f3c76309704d16f5e + last_write_checksum: sha1:6ea697995a0661937a6684d83a79e4dedc6f589d + pristine_git_object: edf9867a47d0865e58ef1afbbd855649f70feab6 src/dub/models/components/analyticstriggers.py: id: 324cadcdf250 - last_write_checksum: sha1:12e3bed037c0e38cdfbc7f6145e6af9d0bdaeb78 - pristine_git_object: aa84354d71f3872288504601aadca30702e0d441 + last_write_checksum: sha1:6bef0230d23fab64eec89a6f884dcf955fd45b5d + pristine_git_object: 8fa88349644592f5745a112c745a1da8ec07cbdd src/dub/models/components/commissioncreatedevent.py: id: b2f4948f1e5a - last_write_checksum: sha1:38eab0dbd52de0ea1e82d11419d0010fd9f09991 - pristine_git_object: 4fa74629f45e52f023f192cba7c2c8429f962ed4 + last_write_checksum: sha1:277d8816ac0f004302171ed9a66b8f934e426c56 + pristine_git_object: 73b2e6a368cea964b99d6635228fee0732520874 src/dub/models/components/discountcodeschema.py: id: 92699d32a123 last_write_checksum: sha1:805871814206ecf1c6e29e71d536a9c32962b764 @@ -2214,20 +2214,20 @@ trackedFiles: pristine_git_object: 158c38f3552545e24a802a31e5be8e09095c1cd7 src/dub/models/components/leadcreatedevent.py: id: 4a52002988a6 - last_write_checksum: sha1:a27aa3b099211baf3e4fec72e016306ff6c180a4 - pristine_git_object: ba8a5887d8324766bde573fbb479fd0dfd6bda27 + last_write_checksum: sha1:90cd4eac03e44cb83640b350df90f7c0c1931434 + pristine_git_object: fcff906b63a6b15109bafe7307a0dce0c6c4d5ba src/dub/models/components/linkclickedevent.py: id: 99d302fd7046 - last_write_checksum: sha1:230a8f711af72c82fd69e5ab87d032271bfd4270 - pristine_git_object: 7387efa4e9fa636e059f660c11f198f6d8e4c233 + last_write_checksum: sha1:19ca52e9485883dfe3b072ce28868f51554c9f48 + pristine_git_object: 62768df9017034a4b87f060020f7dd5ef9bdfc63 src/dub/models/components/linkerrorschema.py: id: 1b6e28417f64 last_write_checksum: sha1:3aab0fc168159e4e5cb67a23510cb67fa4804047 pristine_git_object: 85bb618523d7bb1362c770a84c3369f199af1ad7 src/dub/models/components/linkschema.py: id: 95dbe341d40e - last_write_checksum: sha1:7f7fab98639bec82f9a55f174a44764bdcb7482e - pristine_git_object: 34c0409c30139bd60a13eb9b29138906cc0fc35d + last_write_checksum: sha1:05c8278dad1aeb751e94c6c3110fc8c8739387e2 + pristine_git_object: dc3ad68a7b0ac06677b86755e42563f09498e236 src/dub/models/components/linktagschema.py: id: c22f69869712 last_write_checksum: sha1:73d025ec1d79dac05557f18db75679061bb33d8b @@ -2238,36 +2238,36 @@ trackedFiles: pristine_git_object: 20e3f40a4aa7b1a84e5798dc3dc453cc085ee70a src/dub/models/components/linkwebhookevent.py: id: c3defe8645fa - last_write_checksum: sha1:31ea66f93106833727f1ea340476404b2c06dbe6 - pristine_git_object: 4bdc00231eb332fba4b8c84e8cbe8cc6dc7b773f + last_write_checksum: sha1:c35b600eb4418d621bf6a5c59333a297ac8d2949 + pristine_git_object: 0c0153fee6315bf69daaaf591451691863815d34 src/dub/models/components/partneranalyticscount.py: id: 36ce3721a8b0 - last_write_checksum: sha1:8ac790bb4bd9770e3664aa3ee98da5bddaa5ef71 - pristine_git_object: e6d39054a1d5c4beee01db2cfe2694a8a5e81c30 + last_write_checksum: sha1:a03b2d711f8fd4dd8c35ec9f2152cabb26424754 + pristine_git_object: 0fa704b0eef3d355abd8b2aeb3716886b6cb792a src/dub/models/components/partneranalyticstimeseries.py: id: d8981cab2ab3 - last_write_checksum: sha1:6f4036c0ef87f653d79bf081e9b4f03a81b60280 - pristine_git_object: 69e6bcab06963c5eac9d815b089936d0b9062b9c + last_write_checksum: sha1:d932597776670435d5450338cab2c8b93b59ca7a + pristine_git_object: 435b6ee80b5297d57749f76670bb9bea486428a8 src/dub/models/components/partneranalyticstoplinks.py: id: cba2f13d748b - last_write_checksum: sha1:5714c12a41dd06c0c9a785c07fcf46d6b20199a6 - pristine_git_object: d905692867efd718e35dd1ffcccab6992a6b7afa + last_write_checksum: sha1:2b23f9f4c1278459d276cfe7327931f7381b205c + pristine_git_object: a89db4975c16d27b8f3318b232fa2e6fa1a5fa99 src/dub/models/components/partnerapplicationsubmittedevent.py: id: 20ff2657e9ca last_write_checksum: sha1:3d6a7f5dde1606883792c949430e305b8414d240 pristine_git_object: e7ab48ffb634603c44e6fe853b533d6576a2711f src/dub/models/components/partnerenrolledevent.py: id: 3f120ef09957 - last_write_checksum: sha1:70b6382845d0b3b1ed3b44527079956e476ecba4 - pristine_git_object: dbf5e3b8722e8eaca19ee6caf3c1e55e591b6fbe + last_write_checksum: sha1:89a8cd8c161342df80989f0415162a3c50f3f5cd + pristine_git_object: 86243084ee35c80801617221fb5386aa74092197 src/dub/models/components/partnermergedevent.py: id: 25d352de99f7 last_write_checksum: sha1:0f9a76fa3f0799a6db8a8bfc67fc339df69d8d3a pristine_git_object: 0aa64416d50450e60cc3914e68ff51b5792f33a0 src/dub/models/components/salecreatedevent.py: id: 216d1319967a - last_write_checksum: sha1:9ae756f26362f82851baaa16e14defb7fd02b5c0 - pristine_git_object: d0f623c933a920a56e24726b327440bd8058e2b6 + last_write_checksum: sha1:3c9fe3a9d3f9f5a8b45c149d2541ee780775c171 + pristine_git_object: c7a0a4c59ee553302aa1872dc4de7ac18fe820a9 src/dub/models/components/security.py: id: 4db1b42b747c last_write_checksum: sha1:63fc7ade491e00d45ed5bf960ddaf441cbd4a836 @@ -2390,12 +2390,12 @@ trackedFiles: pristine_git_object: edfdc7a083cc898ce9086349e5eae081ffd57d8c src/dub/models/operations/createpartner.py: id: 06fa07938a1b - last_write_checksum: sha1:b0286922395b18987aba170b938f7ba7c72a89f0 - pristine_git_object: 20fb0848ba88fdb0ca013dee67851442fba940b9 + last_write_checksum: sha1:2371801927d4c5eb51121f32f50a521bcb1c7325 + pristine_git_object: f97ceec70ff8d8c17876ccaa45585a5aede802a4 src/dub/models/operations/createpartnerlink.py: id: 8c33637a6d5d - last_write_checksum: sha1:b7aafa4c3967634327b9b293ff60715aee9acda1 - pristine_git_object: 2aa636c074833907622a2a09006715dd36e439e6 + last_write_checksum: sha1:4b3cd286fd28fd63e34d57bd50cc7e5790d252cd + pristine_git_object: 84aafcb88dcec58bf3660eb48816f8b11f83d104 src/dub/models/operations/createreferralsembedtoken.py: id: caed15d0ebb0 last_write_checksum: sha1:87a006466d031c4110a5c7606828f408d834d3f0 @@ -2454,8 +2454,8 @@ trackedFiles: pristine_git_object: 3f955d10016d3dc6673b530edfe7bae5be3d7845 src/dub/models/operations/getqrcode.py: id: 08fa40bcf360 - last_write_checksum: sha1:9c14ad20a2025e47595f52c707b8dc5c6aafedee - pristine_git_object: 4bef826aee15d2285da8928c903c879070f2f224 + last_write_checksum: sha1:75ecd436329e7e9e4e47cc83861831ae6c889cca + pristine_git_object: b9389cf21335f84f0b0b263ed7766a7fd290c466 src/dub/models/operations/gettags.py: id: 12c0d5709d34 last_write_checksum: sha1:d660a5d8dee75979304d57977640d61e822a166a @@ -2466,8 +2466,8 @@ trackedFiles: pristine_git_object: 313436a49dad4ed801b401adbfbbdb5dbe17b61b src/dub/models/operations/listcommissions.py: id: 992f4436b681 - last_write_checksum: sha1:4b26b276e945878063b8ff1a3170ac7df591a7c5 - pristine_git_object: 9071c0c5a84987c61782b32f078fa2be3eceef48 + last_write_checksum: sha1:b3f47d8f8dc5fca4ff8613c183576dfb2b5554e0 + pristine_git_object: 0631fab026eb2d8ad8e0f914e621e7a620f46c49 src/dub/models/operations/listdiscountcodes.py: id: 68d5de2415f6 last_write_checksum: sha1:c8ace4e3de98347749db20ec3450a6ba3a20d825 @@ -2478,8 +2478,8 @@ trackedFiles: pristine_git_object: 136233008f49eaaf20a5e18876f01e3117ef0430 src/dub/models/operations/listevents.py: id: e65c95de179b - last_write_checksum: sha1:c446133e8be1590dfd75f05934b51865a15a3772 - pristine_git_object: a6346c0b7a3667de7e8920018af89dcab5149ec1 + last_write_checksum: sha1:fa565c1522d0964e2e9fa444e2a400adf9a9c261 + pristine_git_object: 86f5ee78a82371a40993f715f98658b3155a0122 src/dub/models/operations/listfolders.py: id: 42dbcd5bbad8 last_write_checksum: sha1:08420cc586f65b6e87da0ef4194b22684ffa96c1 @@ -2490,8 +2490,8 @@ trackedFiles: pristine_git_object: 8c36ce00fccc3aff0199c2fe15ae99aca9adc169 src/dub/models/operations/listpartners.py: id: f5459d336462 - last_write_checksum: sha1:5a7598873fd6e1691542ce33a117f1e811443593 - pristine_git_object: 8f84c99e9dfc665c7baf71d15d949c1fef95fb71 + last_write_checksum: sha1:155ab7d9ba367d0f12fa36f189890606915f51b6 + pristine_git_object: 6c65abf9a543a69b7a1e46f4720a3b2636faf699 src/dub/models/operations/listpayouts.py: id: d5cd6d0e4a39 last_write_checksum: sha1:f0e8735f776cd5b996b44979a04439a85da57339 @@ -2518,8 +2518,8 @@ trackedFiles: pristine_git_object: c5cc6b155c687234710e163dae8b4350c662fb9e src/dub/models/operations/retrievepartnerlinks.py: id: c72f7fa74edd - last_write_checksum: sha1:ed5c57ecba04c5b6f31044280dd9ae552873fb24 - pristine_git_object: 43bb0d42835f1be2d98cebf29b25186aaaa366f4 + last_write_checksum: sha1:171e157d6fc889da025f18be557957f77c2d80d9 + pristine_git_object: 1187b4366c94f9b52e467e39384432decd0a7831 src/dub/models/operations/tracklead.py: id: 973525c261fc last_write_checksum: sha1:6c7e1e1521e899f1c91ed5a090be81ba6046b43a @@ -2530,12 +2530,12 @@ trackedFiles: pristine_git_object: 6cf96dabc90c13a3541330327e96d87fbcd98d71 src/dub/models/operations/updatecommission.py: id: 5efb92f68d93 - last_write_checksum: sha1:da485fb51fc2d425fe77e88e9fe7304d4450fae1 - pristine_git_object: 9987a433eabfb9c16fa29d4f0c675a4190941e18 + last_write_checksum: sha1:d574c3003a65a545db66e7cfd830aa55561538c7 + pristine_git_object: bc96e255ec844bde6a9c4662b42d467e114117f3 src/dub/models/operations/updatecustomer.py: id: 5487589e4e19 - last_write_checksum: sha1:abfcc3c5706856a5c4dc7627f43569e61669bf26 - pristine_git_object: ca2d6442f4c20c5a4bcc256255c080165f880b47 + last_write_checksum: sha1:b14de6ac62c1a1d3f3cc7f15550e11b75da7f5eb + pristine_git_object: 98cbdf1baaec906c782bb70dc6753f21a84649ff src/dub/models/operations/updatedomain.py: id: 8426ea3ac23f last_write_checksum: sha1:2ada08a0d62644182270ae6cc810b6cf5c6187e8 @@ -2558,8 +2558,8 @@ trackedFiles: pristine_git_object: 68109ffa31929478f0efc88b0017b6459bd2a81f src/dub/models/operations/upsertpartnerlink.py: id: 6eab8b4bb5c5 - last_write_checksum: sha1:3d01c5fe9e0a4987d0f09b74a53aeffeea218551 - pristine_git_object: b7590da8b61f6598e03f3face67255570a7fe4e6 + last_write_checksum: sha1:e7d434e736eeb0ff93b8b5ca2df14cc6aaab06c1 + pristine_git_object: ccf507934987d2a12cd02985edd81d5609928aab src/dub/partner_applications.py: id: bb23ca342d44 last_write_checksum: sha1:851abf1242e379ac40026e6c947711cf8f6578f6 @@ -2610,8 +2610,8 @@ trackedFiles: pristine_git_object: a9a640a1a7048736383f96c67c6290c86bf536ee src/dub/utils/__init__.py: id: 697102dbf447 - last_write_checksum: sha1:53c9544397bbc534c45a228feac3cdb2e9017fe6 - pristine_git_object: 7af3b82cf95edc2901bc85b2624c54f39b7f9724 + last_write_checksum: sha1:370ec05f8793eddc69ee21a4df8fb1b08d11561d + pristine_git_object: 6d6c5c3f9973b392924f0ee369a6c6bb5407ea02 src/dub/utils/annotations.py: id: ab0a38758bc4 last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc @@ -2666,8 +2666,8 @@ trackedFiles: pristine_git_object: 42d8d78e9981eed7507670014d99588e27ab325a src/dub/utils/serializers.py: id: daba26097d20 - last_write_checksum: sha1:7485f1425b0661fd84836186570df90207eec6af - pristine_git_object: 1031ed930bad5ece220cf7416a56c29f40f0588b + last_write_checksum: sha1:2fb543339b424a0818b126e69695df5c91cd4d7b + pristine_git_object: 5e57d36e8883501df8f6293e4c76ac337c4987eb src/dub/utils/unmarshal_json_response.py: id: bdf967ff27c1 last_write_checksum: sha1:56c483b569e2e3cea3d59a6948aedad865c4560f @@ -4369,7 +4369,7 @@ examples: application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `dub.commissions.create()`: \n * `request.union(sale).discount_code` **Added**\n" +releaseNotes: "## Python SDK Changes:\n* `dub.customers.update()`: \n * `request.request_body.subscription_canceled_at` **Added**\n* `dub.partners.list()`: `response.[].custom_reward_id` **Added**\n* `dub.partners.create()`: `response.custom_reward_id` **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 19fca30e..e954cbc5 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.38.6 + version: 0.38.7 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 65145dc2..3584f07a 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.796.3 +speakeasyVersion: 1.797.0 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:0b1c3e87e6cad03a8d50cbfcb08922fa4a62248cb2059df8fd7d7e2d61722828 - sourceBlobDigest: sha256:c16b7aed885fec38dd43ca897fe90cea862ea256602c1ab327f8e6d760d313d0 + sourceRevisionDigest: sha256:f97acfd89f30a862c17cb862397d804e28e99f231611746c4e05ca8de3034217 + sourceBlobDigest: sha256:72118b804e1c891814eb2d0bc72d421681cfc56d4793874028eed9de081e8774 tags: - latest - 0.0.1 @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:0b1c3e87e6cad03a8d50cbfcb08922fa4a62248cb2059df8fd7d7e2d61722828 - sourceBlobDigest: sha256:c16b7aed885fec38dd43ca897fe90cea862ea256602c1ab327f8e6d760d313d0 + sourceRevisionDigest: sha256:f97acfd89f30a862c17cb862397d804e28e99f231611746c4e05ca8de3034217 + sourceBlobDigest: sha256:72118b804e1c891814eb2d0bc72d421681cfc56d4793874028eed9de081e8774 codeSamplesNamespace: code-samples-python-my-first-target - codeSamplesRevisionDigest: sha256:51ff26e2ae952e2520f6925e789f69fc1f0e26ada33c950e3155b89714478259 + codeSamplesRevisionDigest: sha256:01f542bb8e539dff0adb7af92a3dea4a715585d31fb9a507e692caae3c688f0c workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 2cd781cb..37ae554f 100644 --- a/README.md +++ b/README.md @@ -126,11 +126,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -163,11 +163,11 @@ async def main(): "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -198,11 +198,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -235,11 +235,11 @@ async def main(): "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) diff --git a/RELEASES.md b/RELEASES.md index e980f9fd..f15860d5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1636,4 +1636,14 @@ Based on: ### Generated - [python v0.38.6] . ### Releases -- [PyPI v0.38.6] https://pypi.org/project/dub/0.38.6 - . \ No newline at end of file +- [PyPI v0.38.6] https://pypi.org/project/dub/0.38.6 - . + +## 2026-09-17 04:16:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.797.0 (2.937.18) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.38.7] . +### Releases +- [PyPI v0.38.7] https://pypi.org/project/dub/0.38.7 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index e49aaf80..6b2e1f6e 100644 --- a/USAGE.md +++ b/USAGE.md @@ -17,11 +17,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -54,11 +54,11 @@ async def main(): "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -87,11 +87,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -124,11 +124,11 @@ async def main(): "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) diff --git a/codeSamples.yaml b/codeSamples.yaml index c54faf9e..8a1eda39 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -572,11 +572,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -627,11 +627,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -662,11 +662,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -679,11 +679,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -750,11 +750,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -800,11 +800,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -861,11 +861,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -1026,11 +1026,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -1061,11 +1061,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -1207,11 +1207,11 @@ actions: "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, diff --git a/docs/models/components/commissioncreatedeventdata.md b/docs/models/components/commissioncreatedeventdata.md index f0c5905e..40fbc76e 100644 --- a/docs/models/components/commissioncreatedeventdata.md +++ b/docs/models/components/commissioncreatedeventdata.md @@ -15,7 +15,7 @@ | `description` | *Nullable[str]* | :heavy_check_mark: | An optional description of the commission. | | | `quantity` | *float* | :heavy_check_mark: | The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions. | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the manual commission. | | -| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`). | | +| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata. | | | `created_at` | *str* | :heavy_check_mark: | The date and time when the commission was created. | | | `updated_at` | *str* | :heavy_check_mark: | The date and time when the commission was last updated. | | | `partner` | [components.CommissionCreatedEventPartner](../../models/components/commissioncreatedeventpartner.md) | :heavy_check_mark: | N/A | | diff --git a/docs/models/components/partnerenrolledeventdata.md b/docs/models/components/partnerenrolledeventdata.md index 0e608c1f..a7b3c61b 100644 --- a/docs/models/components/partnerenrolledeventdata.md +++ b/docs/models/components/partnerenrolledeventdata.md @@ -31,6 +31,7 @@ | `lead_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `sale_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `referral_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `custom_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `discount_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `application_id` | *OptionalNullable[str]* | :heavy_minus_sign: | If the partner submitted an application to join the program, this is the ID of the application. | | `banned_at` | *OptionalNullable[str]* | :heavy_minus_sign: | If the partner was banned from the program, this is the date of the ban. | diff --git a/docs/models/operations/createpartnerlinkrequestbody.md b/docs/models/operations/createpartnerlinkrequestbody.md index 756fcb12..d93b11b4 100644 --- a/docs/models/operations/createpartnerlinkrequestbody.md +++ b/docs/models/operations/createpartnerlinkrequestbody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `partner_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the partner to create a link for. Will take precedence over `tenantId` if provided. | -| `tenant_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown. | -| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain. | -| `key` | *Optional[str]* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | -| `comments` | *OptionalNullable[str]* | :heavy_minus_sign: | The comments for the short link. | -| `link_props` | [Optional[operations.CreatePartnerLinkLinkProps]](../../models/operations/createpartnerlinklinkprops.md) | :heavy_minus_sign: | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `partner_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the partner to create a link for. Will take precedence over `tenantId` if provided. | +| `tenant_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown. | +| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | The URL to shorten (if not provided, the program's default URL will be used). | +| `key` | *Optional[str]* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `comments` | *OptionalNullable[str]* | :heavy_minus_sign: | The comments for the short link. | +| `link_props` | [Optional[operations.CreatePartnerLinkLinkProps]](../../models/operations/createpartnerlinklinkprops.md) | :heavy_minus_sign: | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | \ No newline at end of file diff --git a/docs/models/operations/createpartnerresponsebody.md b/docs/models/operations/createpartnerresponsebody.md index f1d32b11..1ffe664d 100644 --- a/docs/models/operations/createpartnerresponsebody.md +++ b/docs/models/operations/createpartnerresponsebody.md @@ -33,6 +33,7 @@ The created or updated partner | `lead_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `sale_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `referral_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `custom_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `discount_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `application_id` | *OptionalNullable[str]* | :heavy_minus_sign: | If the partner submitted an application to join the program, this is the ID of the application. | | `banned_at` | *OptionalNullable[str]* | :heavy_minus_sign: | If the partner was banned from the program, this is the date of the ban. | diff --git a/docs/models/operations/listcommissionsresponsebody.md b/docs/models/operations/listcommissionsresponsebody.md index 7d425462..782ceaec 100644 --- a/docs/models/operations/listcommissionsresponsebody.md +++ b/docs/models/operations/listcommissionsresponsebody.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The commission's unique ID on Dub. | cm_1JVR7XRCSR0EDBAF39FZ4PMYE | -| `type` | [operations.ListCommissionsType](../../models/operations/listcommissionstype.md) | :heavy_check_mark: | The type of commission. Can be `click`, `lead`, `sale`, `referral`, or `custom`. | | -| `amount` | *float* | :heavy_check_mark: | The associated event amount in cents. For sale commissions, this is the sale amount. | | -| `earnings` | *float* | :heavy_check_mark: | The amount earned by the partner, in cents. | | -| `currency` | *str* | :heavy_check_mark: | The currency of the commission, as an ISO 4217 currency code. | | -| `status` | [operations.ListCommissionsStatus](../../models/operations/listcommissionsstatus.md) | :heavy_check_mark: | The current status of the commission. | | -| `invoice_id` | *Nullable[str]* | :heavy_check_mark: | The associated invoice ID. Only set for sale commissions. | | -| `description` | *Nullable[str]* | :heavy_check_mark: | An optional description of the commission. | | -| `quantity` | *float* | :heavy_check_mark: | The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions. | | -| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the manual commission. | | -| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`). | | -| `created_at` | *str* | :heavy_check_mark: | The date and time when the commission was created. | | -| `updated_at` | *str* | :heavy_check_mark: | The date and time when the commission was last updated. | | -| `paid_at` | *Nullable[str]* | :heavy_check_mark: | The date the commission was paid out to the partner. Null if not paid yet. | | -| `partner` | [operations.ListCommissionsPartner](../../models/operations/listcommissionspartner.md) | :heavy_check_mark: | N/A | | -| `customer` | [OptionalNullable[operations.ListCommissionsCustomer]](../../models/operations/listcommissionscustomer.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The commission's unique ID on Dub. | cm_1JVR7XRCSR0EDBAF39FZ4PMYE | +| `type` | [operations.ListCommissionsType](../../models/operations/listcommissionstype.md) | :heavy_check_mark: | The type of commission. Can be `click`, `lead`, `sale`, `referral`, or `custom`. | | +| `amount` | *float* | :heavy_check_mark: | The associated event amount in cents. For sale commissions, this is the sale amount. | | +| `earnings` | *float* | :heavy_check_mark: | The amount earned by the partner, in cents. | | +| `currency` | *str* | :heavy_check_mark: | The currency of the commission, as an ISO 4217 currency code. | | +| `status` | [operations.ListCommissionsStatus](../../models/operations/listcommissionsstatus.md) | :heavy_check_mark: | The current status of the commission. | | +| `invoice_id` | *Nullable[str]* | :heavy_check_mark: | The associated invoice ID. Only set for sale commissions. | | +| `description` | *Nullable[str]* | :heavy_check_mark: | An optional description of the commission. | | +| `quantity` | *float* | :heavy_check_mark: | The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions. | | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the manual commission. | | +| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata. | | +| `created_at` | *str* | :heavy_check_mark: | The date and time when the commission was created. | | +| `updated_at` | *str* | :heavy_check_mark: | The date and time when the commission was last updated. | | +| `paid_at` | *Nullable[str]* | :heavy_check_mark: | The date the commission was paid out to the partner. Null if not paid yet. | | +| `partner` | [operations.ListCommissionsPartner](../../models/operations/listcommissionspartner.md) | :heavy_check_mark: | N/A | | +| `customer` | [OptionalNullable[operations.ListCommissionsCustomer]](../../models/operations/listcommissionscustomer.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/listpartnersresponsebody.md b/docs/models/operations/listpartnersresponsebody.md index 6097df95..75e17efe 100644 --- a/docs/models/operations/listpartnersresponsebody.md +++ b/docs/models/operations/listpartnersresponsebody.md @@ -31,6 +31,7 @@ | `lead_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `sale_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `referral_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `custom_reward_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `discount_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `application_id` | *OptionalNullable[str]* | :heavy_minus_sign: | If the partner submitted an application to join the program, this is the ID of the application. | | `banned_at` | *OptionalNullable[str]* | :heavy_minus_sign: | If the partner was banned from the program, this is the date of the ban. | diff --git a/docs/models/operations/updatecommissionresponsebody.md b/docs/models/operations/updatecommissionresponsebody.md index 029ee152..27a5efab 100644 --- a/docs/models/operations/updatecommissionresponsebody.md +++ b/docs/models/operations/updatecommissionresponsebody.md @@ -5,21 +5,21 @@ The updated commission. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `id` | *str* | :heavy_check_mark: | The commission's unique ID on Dub. | cm_1JVR7XRCSR0EDBAF39FZ4PMYE | -| `type` | [operations.UpdateCommissionType](../../models/operations/updatecommissiontype.md) | :heavy_check_mark: | The type of commission. Can be `click`, `lead`, `sale`, `referral`, or `custom`. | | -| `amount` | *float* | :heavy_check_mark: | The associated event amount in cents. For sale commissions, this is the sale amount. | | -| `earnings` | *float* | :heavy_check_mark: | The amount earned by the partner, in cents. | | -| `currency` | *str* | :heavy_check_mark: | The currency of the commission, as an ISO 4217 currency code. | | -| `status` | [operations.UpdateCommissionStatus](../../models/operations/updatecommissionstatus.md) | :heavy_check_mark: | The current status of the commission. | | -| `invoice_id` | *Nullable[str]* | :heavy_check_mark: | The associated invoice ID. Only set for sale commissions. | | -| `description` | *Nullable[str]* | :heavy_check_mark: | An optional description of the commission. | | -| `quantity` | *float* | :heavy_check_mark: | The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions. | | -| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the manual commission. | | -| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`). | | -| `created_at` | *str* | :heavy_check_mark: | The date and time when the commission was created. | | -| `updated_at` | *str* | :heavy_check_mark: | The date and time when the commission was last updated. | | -| `paid_at` | *Nullable[str]* | :heavy_check_mark: | The date the commission was paid out to the partner. Null if not paid yet. | | -| `partner` | [operations.UpdateCommissionPartner](../../models/operations/updatecommissionpartner.md) | :heavy_check_mark: | N/A | | -| `customer` | [OptionalNullable[operations.UpdateCommissionCustomer]](../../models/operations/updatecommissioncustomer.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The commission's unique ID on Dub. | cm_1JVR7XRCSR0EDBAF39FZ4PMYE | +| `type` | [operations.UpdateCommissionType](../../models/operations/updatecommissiontype.md) | :heavy_check_mark: | The type of commission. Can be `click`, `lead`, `sale`, `referral`, or `custom`. | | +| `amount` | *float* | :heavy_check_mark: | The associated event amount in cents. For sale commissions, this is the sale amount. | | +| `earnings` | *float* | :heavy_check_mark: | The amount earned by the partner, in cents. | | +| `currency` | *str* | :heavy_check_mark: | The currency of the commission, as an ISO 4217 currency code. | | +| `status` | [operations.UpdateCommissionStatus](../../models/operations/updatecommissionstatus.md) | :heavy_check_mark: | The current status of the commission. | | +| `invoice_id` | *Nullable[str]* | :heavy_check_mark: | The associated invoice ID. Only set for sale commissions. | | +| `description` | *Nullable[str]* | :heavy_check_mark: | An optional description of the commission. | | +| `quantity` | *float* | :heavy_check_mark: | The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions. | | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the manual commission. | | +| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata. | | +| `created_at` | *str* | :heavy_check_mark: | The date and time when the commission was created. | | +| `updated_at` | *str* | :heavy_check_mark: | The date and time when the commission was last updated. | | +| `paid_at` | *Nullable[str]* | :heavy_check_mark: | The date the commission was paid out to the partner. Null if not paid yet. | | +| `partner` | [operations.UpdateCommissionPartner](../../models/operations/updatecommissionpartner.md) | :heavy_check_mark: | N/A | | +| `customer` | [OptionalNullable[operations.UpdateCommissionCustomer]](../../models/operations/updatecommissioncustomer.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/updatecustomerrequestbody.md b/docs/models/operations/updatecustomerrequestbody.md index 50f05497..06484d2d 100644 --- a/docs/models/operations/updatecustomerrequestbody.md +++ b/docs/models/operations/updatecustomerrequestbody.md @@ -10,4 +10,5 @@ | `avatar` | *OptionalNullable[str]* | :heavy_minus_sign: | The customer's avatar URL. If not provided, a random avatar will be generated. | | `external_id` | *Optional[str]* | :heavy_minus_sign: | The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems. | | `stripe_customer_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer. | -| `country` | *Optional[str]* | :heavy_minus_sign: | The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events). | \ No newline at end of file +| `country` | *Optional[str]* | :heavy_minus_sign: | The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events). | +| `subscription_canceled_at` | *OptionalNullable[str]* | :heavy_minus_sign: | The date the customer canceled their subscription. Set to a timestamp to mark the subscription as canceled, or `null` to clear it (e.g. if they resubscribe). | \ No newline at end of file diff --git a/docs/models/operations/upsertpartnerlinkrequestbody.md b/docs/models/operations/upsertpartnerlinkrequestbody.md index 5c2ae719..a04083da 100644 --- a/docs/models/operations/upsertpartnerlinkrequestbody.md +++ b/docs/models/operations/upsertpartnerlinkrequestbody.md @@ -7,7 +7,7 @@ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `partner_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the partner to create a link for. Will take precedence over `tenantId` if provided. | | `tenant_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown. | -| `url` | *str* | :heavy_check_mark: | The URL to upsert for. Will throw an error if the domain doesn't match the program's default URL domain. | +| `url` | *str* | :heavy_check_mark: | The URL to upsert for. | | `key` | *Optional[str]* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | | `comments` | *OptionalNullable[str]* | :heavy_minus_sign: | The comments for the short link. | | `link_props` | [Optional[operations.UpsertPartnerLinkLinkProps]](../../models/operations/upsertpartnerlinklinkprops.md) | :heavy_minus_sign: | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | \ No newline at end of file diff --git a/docs/sdks/embedtokens/README.md b/docs/sdks/embedtokens/README.md index 0a989a96..441a3e84 100644 --- a/docs/sdks/embedtokens/README.md +++ b/docs/sdks/embedtokens/README.md @@ -32,11 +32,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 9069cf97..32f24525 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -94,11 +94,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -305,11 +305,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) @@ -371,11 +371,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -388,11 +388,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -506,11 +506,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -571,11 +571,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }) diff --git a/docs/sdks/partners/README.md b/docs/sdks/partners/README.md index 15896f2e..47ea80ec 100644 --- a/docs/sdks/partners/README.md +++ b/docs/sdks/partners/README.md @@ -96,11 +96,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -209,11 +209,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, @@ -275,11 +275,11 @@ with Dub( "test_variants": [ { "url": "https://example.com/variant-1", - "percentage": 50, + "percentage": 50.0, }, { "url": "https://example.com/variant-2", - "percentage": 50, + "percentage": 50.0, }, ], }, diff --git a/pyproject.toml b/pyproject.toml index e2deb1c5..d3c74b49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "dub" -version = "0.38.6" +version = "0.38.7" description = "Python Client SDK Generated by Speakeasy" authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/src/dub/_version.py b/src/dub/_version.py index 7eca31ca..9bcfcd9a 100644 --- a/src/dub/_version.py +++ b/src/dub/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "dub" -__version__: str = "0.38.6" +__version__: str = "0.38.7" __openapi_doc_version__: str = "0.0.1" -__gen_version__: str = "2.934.1" -__user_agent__: str = "speakeasy-sdk/python 0.38.6 2.934.1 0.0.1 dub" +__gen_version__: str = "2.937.18" +__user_agent__: str = "speakeasy-sdk/python 0.38.7 2.937.18 0.0.1 dub" try: if __package__ is not None: diff --git a/src/dub/models/components/analyticsbrowsers.py b/src/dub/models/components/analyticsbrowsers.py index 47a7ab29..290ef8c7 100644 --- a/src/dub/models/components/analyticsbrowsers.py +++ b/src/dub/models/components/analyticsbrowsers.py @@ -25,16 +25,16 @@ class AnalyticsBrowsers(BaseModel): browser: str r"""The name of the browser""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this browser""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this browser""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this browser""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this browser, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticscities.py b/src/dub/models/components/analyticscities.py index fa5cbe56..4d12a2bf 100644 --- a/src/dub/models/components/analyticscities.py +++ b/src/dub/models/components/analyticscities.py @@ -35,16 +35,16 @@ class AnalyticsCities(BaseModel): city: str r"""The name of the city""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this city""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this city""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this city""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this city, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticscontinents.py b/src/dub/models/components/analyticscontinents.py index b2713492..1105ebfe 100644 --- a/src/dub/models/components/analyticscontinents.py +++ b/src/dub/models/components/analyticscontinents.py @@ -38,16 +38,16 @@ class AnalyticsContinents(BaseModel): continent: Continent r"""The 2-letter ISO 3166-1 code representing the continent associated with the location of the user.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this continent""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this continent""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this continent""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this continent, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticscount.py b/src/dub/models/components/analyticscount.py index ab5b49a3..6bd9f858 100644 --- a/src/dub/models/components/analyticscount.py +++ b/src/dub/models/components/analyticscount.py @@ -20,16 +20,16 @@ class AnalyticsCountTypedDict(TypedDict): class AnalyticsCount(BaseModel): - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The total number of clicks""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The total number of leads""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticscountries.py b/src/dub/models/components/analyticscountries.py index ed2c199d..5ab73953 100644 --- a/src/dub/models/components/analyticscountries.py +++ b/src/dub/models/components/analyticscountries.py @@ -40,16 +40,16 @@ class AnalyticsCountries(BaseModel): city: Optional[City] = City.WILDCARD_ - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this country""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this country""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this country""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this country, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticsdevices.py b/src/dub/models/components/analyticsdevices.py index d372415d..bdeb0d35 100644 --- a/src/dub/models/components/analyticsdevices.py +++ b/src/dub/models/components/analyticsdevices.py @@ -25,16 +25,16 @@ class AnalyticsDevices(BaseModel): device: str r"""The name of the device""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this device""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this device""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this device""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this device, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticseventnames.py b/src/dub/models/components/analyticseventnames.py index ab962824..9e6c2f36 100644 --- a/src/dub/models/components/analyticseventnames.py +++ b/src/dub/models/components/analyticseventnames.py @@ -25,16 +25,16 @@ class AnalyticsEventNames(BaseModel): event_name: Annotated[str, pydantic.Field(alias="eventName")] r"""The name of the conversion event (lead or sale)""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this event name""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this event name""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this event name""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this event name, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticsos.py b/src/dub/models/components/analyticsos.py index d7b5cbfa..bcce5209 100644 --- a/src/dub/models/components/analyticsos.py +++ b/src/dub/models/components/analyticsos.py @@ -25,16 +25,16 @@ class AnalyticsOS(BaseModel): os: str r"""The name of the OS""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this OS""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this OS""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this OS""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this OS, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticsreferers.py b/src/dub/models/components/analyticsreferers.py index b4e5fb25..8b82acdc 100644 --- a/src/dub/models/components/analyticsreferers.py +++ b/src/dub/models/components/analyticsreferers.py @@ -25,16 +25,16 @@ class AnalyticsReferers(BaseModel): referer: str r"""The name of the referer. If unknown, this will be `(direct)`""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this referer""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this referer""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this referer""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this referer, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticsrefererurls.py b/src/dub/models/components/analyticsrefererurls.py index 27d0b2ac..780778b1 100644 --- a/src/dub/models/components/analyticsrefererurls.py +++ b/src/dub/models/components/analyticsrefererurls.py @@ -25,16 +25,16 @@ class AnalyticsRefererUrls(BaseModel): referer_url: Annotated[str, pydantic.Field(alias="refererUrl")] r"""The full URL of the referer. If unknown, this will be `(direct)`""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this referer to this URL""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this referer to this URL""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this referer to this URL""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this referer to this URL, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticsregions.py b/src/dub/models/components/analyticsregions.py index d2b8debe..d80e672a 100644 --- a/src/dub/models/components/analyticsregions.py +++ b/src/dub/models/components/analyticsregions.py @@ -38,16 +38,16 @@ class AnalyticsRegions(BaseModel): city: Optional[AnalyticsRegionsCity] = AnalyticsRegionsCity.WILDCARD_ - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this region""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this region""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this region""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this region, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticstimeseries.py b/src/dub/models/components/analyticstimeseries.py index 90951b82..294439a4 100644 --- a/src/dub/models/components/analyticstimeseries.py +++ b/src/dub/models/components/analyticstimeseries.py @@ -25,16 +25,16 @@ class AnalyticsTimeseries(BaseModel): start: str r"""The starting timestamp of the interval""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks in the interval""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads in the interval""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales in the interval""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales in the interval, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticstoplinks.py b/src/dub/models/components/analyticstoplinks.py index 2144bd6a..ec8a988b 100644 --- a/src/dub/models/components/analyticstoplinks.py +++ b/src/dub/models/components/analyticstoplinks.py @@ -84,16 +84,16 @@ class AnalyticsTopLinks(BaseModel): ) r"""The ID of the partner that the link belongs to (if applicable)""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this link""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this link""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this link""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this link, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticstopurls.py b/src/dub/models/components/analyticstopurls.py index cad472f3..edf9867a 100644 --- a/src/dub/models/components/analyticstopurls.py +++ b/src/dub/models/components/analyticstopurls.py @@ -25,16 +25,16 @@ class AnalyticsTopUrls(BaseModel): url: str r"""The full destination URL (including query parameters)""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this URL""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this URL""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this URL""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this URL, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/analyticstriggers.py b/src/dub/models/components/analyticstriggers.py index aa84354d..8fa88349 100644 --- a/src/dub/models/components/analyticstriggers.py +++ b/src/dub/models/components/analyticstriggers.py @@ -35,16 +35,16 @@ class AnalyticsTriggers(BaseModel): trigger: Trigger r"""The type of trigger method: link click or QR scan""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this trigger method""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this trigger method""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this trigger method""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this trigger method, in cents""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/commissioncreatedevent.py b/src/dub/models/components/commissioncreatedevent.py index 4fa74629..73b2e6a3 100644 --- a/src/dub/models/components/commissioncreatedevent.py +++ b/src/dub/models/components/commissioncreatedevent.py @@ -288,7 +288,7 @@ class CommissionCreatedEventDataTypedDict(TypedDict): quantity: float r"""The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.""" metadata: Nullable[Dict[str, Any]] - r"""User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).""" + r"""Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata.""" created_at: str r"""The date and time when the commission was created.""" updated_at: str @@ -329,7 +329,7 @@ class CommissionCreatedEventData(BaseModel): r"""The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.""" metadata: Nullable[Dict[str, Any]] - r"""User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).""" + r"""Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata.""" created_at: Annotated[str, pydantic.Field(alias="createdAt")] r"""The date and time when the commission was created.""" diff --git a/src/dub/models/components/leadcreatedevent.py b/src/dub/models/components/leadcreatedevent.py index ba8a5887..fcff906b 100644 --- a/src/dub/models/components/leadcreatedevent.py +++ b/src/dub/models/components/leadcreatedevent.py @@ -458,19 +458,19 @@ class LeadCreatedEventLink(BaseModel): ] = UNSET r"""An array of A/B test URLs and the percentage of traffic to send to each URL.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/linkclickedevent.py b/src/dub/models/components/linkclickedevent.py index 7387efa4..62768df9 100644 --- a/src/dub/models/components/linkclickedevent.py +++ b/src/dub/models/components/linkclickedevent.py @@ -336,19 +336,19 @@ class Link(BaseModel): ] = UNSET r"""An array of A/B test URLs and the percentage of traffic to send to each URL.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/linkschema.py b/src/dub/models/components/linkschema.py index 34c0409c..dc3ad68a 100644 --- a/src/dub/models/components/linkschema.py +++ b/src/dub/models/components/linkschema.py @@ -294,19 +294,19 @@ class LinkSchema(BaseModel): ] = UNSET r"""The date and time when the tests were or will be completed.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/linkwebhookevent.py b/src/dub/models/components/linkwebhookevent.py index 4bdc0023..0c0153fe 100644 --- a/src/dub/models/components/linkwebhookevent.py +++ b/src/dub/models/components/linkwebhookevent.py @@ -272,19 +272,19 @@ class Data(BaseModel): ] = UNSET r"""An array of A/B test URLs and the percentage of traffic to send to each URL.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") diff --git a/src/dub/models/components/partneranalyticscount.py b/src/dub/models/components/partneranalyticscount.py index e6d39054..0fa704b0 100644 --- a/src/dub/models/components/partneranalyticscount.py +++ b/src/dub/models/components/partneranalyticscount.py @@ -21,19 +21,19 @@ class PartnerAnalyticsCountTypedDict(TypedDict): class PartnerAnalyticsCount(BaseModel): - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The total number of clicks""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The total number of leads""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales, in cents""" - earnings: Optional[float] = 0 + earnings: Optional[float] = 0.0 @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/dub/models/components/partneranalyticstimeseries.py b/src/dub/models/components/partneranalyticstimeseries.py index 69e6bcab..435b6ee8 100644 --- a/src/dub/models/components/partneranalyticstimeseries.py +++ b/src/dub/models/components/partneranalyticstimeseries.py @@ -26,19 +26,19 @@ class PartnerAnalyticsTimeseries(BaseModel): start: str r"""The starting timestamp of the interval""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks in the interval""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads in the interval""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales in the interval""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales in the interval, in cents""" - earnings: Optional[float] = 0 + earnings: Optional[float] = 0.0 @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/dub/models/components/partneranalyticstoplinks.py b/src/dub/models/components/partneranalyticstoplinks.py index d9056928..a89db497 100644 --- a/src/dub/models/components/partneranalyticstoplinks.py +++ b/src/dub/models/components/partneranalyticstoplinks.py @@ -85,19 +85,19 @@ class PartnerAnalyticsTopLinks(BaseModel): ) r"""The ID of the partner that the link belongs to (if applicable)""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks from this link""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads from this link""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The number of sales from this link""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total amount of sales from this link, in cents""" - earnings: Optional[float] = 0 + earnings: Optional[float] = 0.0 @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/dub/models/components/partnerenrolledevent.py b/src/dub/models/components/partnerenrolledevent.py index dbf5e3b8..86243084 100644 --- a/src/dub/models/components/partnerenrolledevent.py +++ b/src/dub/models/components/partnerenrolledevent.py @@ -85,19 +85,19 @@ class Links(BaseModel): url: str r"""The destination URL of the short link.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") @@ -607,6 +607,7 @@ class PartnerEnrolledEventDataTypedDict(TypedDict): lead_reward_id: NotRequired[Nullable[str]] sale_reward_id: NotRequired[Nullable[str]] referral_reward_id: NotRequired[Nullable[str]] + custom_reward_id: NotRequired[Nullable[str]] discount_id: NotRequired[Nullable[str]] application_id: NotRequired[Nullable[str]] r"""If the partner submitted an application to join the program, this is the ID of the application.""" @@ -730,7 +731,7 @@ class PartnerEnrolledEventData(BaseModel): total_commissions: Annotated[ Optional[float], pydantic.Field(alias="totalCommissions") - ] = 0 + ] = 0.0 r"""The total commissions paid to the partner for their referrals""" click_reward_id: Annotated[ @@ -749,6 +750,10 @@ class PartnerEnrolledEventData(BaseModel): OptionalNullable[str], pydantic.Field(alias="referralRewardId") ] = UNSET + custom_reward_id: Annotated[ + OptionalNullable[str], pydantic.Field(alias="customRewardId") + ] = UNSET + discount_id: Annotated[ OptionalNullable[str], pydantic.Field(alias="discountId") ] = UNSET @@ -778,26 +783,26 @@ class PartnerEnrolledEventData(BaseModel): tags: Optional[List[Tags]] = None r"""The tags associated with the partner.""" - total_clicks: Annotated[Optional[float], pydantic.Field(alias="totalClicks")] = 0 + total_clicks: Annotated[Optional[float], pydantic.Field(alias="totalClicks")] = 0.0 r"""The total number of clicks on the partner's links""" - total_leads: Annotated[Optional[float], pydantic.Field(alias="totalLeads")] = 0 + total_leads: Annotated[Optional[float], pydantic.Field(alias="totalLeads")] = 0.0 r"""The total number of leads generated by the partner's links""" total_conversions: Annotated[ Optional[float], pydantic.Field(alias="totalConversions") - ] = 0 + ] = 0.0 r"""The total number of leads that converted to paying customers""" - total_sales: Annotated[Optional[float], pydantic.Field(alias="totalSales")] = 0 + total_sales: Annotated[Optional[float], pydantic.Field(alias="totalSales")] = 0.0 r"""The total number of sales generated by the partner's links (includes recurring sales)""" total_sale_amount: Annotated[ Optional[float], pydantic.Field(alias="totalSaleAmount") - ] = 0 + ] = 0.0 r"""Total revenue generated by the partner's links""" - net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0 + net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0.0 r"""Net revenue after commissions (`Total Revenue - Total Commissions`)""" earnings_per_click: Annotated[ @@ -868,6 +873,7 @@ def serialize_model(self, handler): "leadRewardId", "saleRewardId", "referralRewardId", + "customRewardId", "discountId", "applicationId", "bannedAt", @@ -916,6 +922,7 @@ def serialize_model(self, handler): "leadRewardId", "saleRewardId", "referralRewardId", + "customRewardId", "discountId", "applicationId", "bannedAt", diff --git a/src/dub/models/components/salecreatedevent.py b/src/dub/models/components/salecreatedevent.py index d0f623c9..c7a0a4c5 100644 --- a/src/dub/models/components/salecreatedevent.py +++ b/src/dub/models/components/salecreatedevent.py @@ -458,19 +458,19 @@ class SaleCreatedEventLink(BaseModel): ] = UNSET r"""An array of A/B test URLs and the percentage of traffic to send to each URL.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") diff --git a/src/dub/models/operations/createpartner.py b/src/dub/models/operations/createpartner.py index 20fb0848..f97ceec7 100644 --- a/src/dub/models/operations/createpartner.py +++ b/src/dub/models/operations/createpartner.py @@ -404,19 +404,19 @@ class CreatePartnerLinks(BaseModel): url: str r"""The destination URL of the short link.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") @@ -932,6 +932,7 @@ class CreatePartnerResponseBodyTypedDict(TypedDict): lead_reward_id: NotRequired[Nullable[str]] sale_reward_id: NotRequired[Nullable[str]] referral_reward_id: NotRequired[Nullable[str]] + custom_reward_id: NotRequired[Nullable[str]] discount_id: NotRequired[Nullable[str]] application_id: NotRequired[Nullable[str]] r"""If the partner submitted an application to join the program, this is the ID of the application.""" @@ -1060,7 +1061,7 @@ class CreatePartnerResponseBody(BaseModel): total_commissions: Annotated[ Optional[float], pydantic.Field(alias="totalCommissions") - ] = 0 + ] = 0.0 r"""The total commissions paid to the partner for their referrals""" click_reward_id: Annotated[ @@ -1079,6 +1080,10 @@ class CreatePartnerResponseBody(BaseModel): OptionalNullable[str], pydantic.Field(alias="referralRewardId") ] = UNSET + custom_reward_id: Annotated[ + OptionalNullable[str], pydantic.Field(alias="customRewardId") + ] = UNSET + discount_id: Annotated[ OptionalNullable[str], pydantic.Field(alias="discountId") ] = UNSET @@ -1110,26 +1115,26 @@ class CreatePartnerResponseBody(BaseModel): tags: Optional[List[CreatePartnerTags]] = None r"""The tags associated with the partner.""" - total_clicks: Annotated[Optional[float], pydantic.Field(alias="totalClicks")] = 0 + total_clicks: Annotated[Optional[float], pydantic.Field(alias="totalClicks")] = 0.0 r"""The total number of clicks on the partner's links""" - total_leads: Annotated[Optional[float], pydantic.Field(alias="totalLeads")] = 0 + total_leads: Annotated[Optional[float], pydantic.Field(alias="totalLeads")] = 0.0 r"""The total number of leads generated by the partner's links""" total_conversions: Annotated[ Optional[float], pydantic.Field(alias="totalConversions") - ] = 0 + ] = 0.0 r"""The total number of leads that converted to paying customers""" - total_sales: Annotated[Optional[float], pydantic.Field(alias="totalSales")] = 0 + total_sales: Annotated[Optional[float], pydantic.Field(alias="totalSales")] = 0.0 r"""The total number of sales generated by the partner's links (includes recurring sales)""" total_sale_amount: Annotated[ Optional[float], pydantic.Field(alias="totalSaleAmount") - ] = 0 + ] = 0.0 r"""Total revenue generated by the partner's links""" - net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0 + net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0.0 r"""Net revenue after commissions (`Total Revenue - Total Commissions`)""" earnings_per_click: Annotated[ @@ -1200,6 +1205,7 @@ def serialize_model(self, handler): "leadRewardId", "saleRewardId", "referralRewardId", + "customRewardId", "discountId", "applicationId", "bannedAt", @@ -1248,6 +1254,7 @@ def serialize_model(self, handler): "leadRewardId", "saleRewardId", "referralRewardId", + "customRewardId", "discountId", "applicationId", "bannedAt", diff --git a/src/dub/models/operations/createpartnerlink.py b/src/dub/models/operations/createpartnerlink.py index 2aa636c0..84aafcb8 100644 --- a/src/dub/models/operations/createpartnerlink.py +++ b/src/dub/models/operations/createpartnerlink.py @@ -255,7 +255,7 @@ class CreatePartnerLinkRequestBodyTypedDict(TypedDict): tenant_id: NotRequired[Nullable[str]] r"""The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.""" url: NotRequired[Nullable[str]] - r"""The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain.""" + r"""The URL to shorten (if not provided, the program's default URL will be used).""" key: NotRequired[str] r"""The short link slug. If not provided, a random 7-character slug will be generated.""" comments: NotRequired[Nullable[str]] @@ -276,7 +276,7 @@ class CreatePartnerLinkRequestBody(BaseModel): r"""The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.""" url: OptionalNullable[str] = UNSET - r"""The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain.""" + r"""The URL to shorten (if not provided, the program's default URL will be used).""" key: Optional[str] = None r"""The short link slug. If not provided, a random 7-character slug will be generated.""" diff --git a/src/dub/models/operations/getqrcode.py b/src/dub/models/operations/getqrcode.py index 4bef826a..b9389cf2 100644 --- a/src/dub/models/operations/getqrcode.py +++ b/src/dub/models/operations/getqrcode.py @@ -55,7 +55,7 @@ class GetQRCodeRequest(BaseModel): size: Annotated[ Optional[float], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = 600 + ] = 600.0 r"""The size of the QR code in pixels. Defaults to `600` if not provided.""" level: Annotated[ @@ -88,7 +88,7 @@ class GetQRCodeRequest(BaseModel): margin: Annotated[ Optional[float], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = 2 + ] = 2.0 r"""The size of the margin around the QR code. Defaults to 2 if not provided.""" include_margin: Annotated[ diff --git a/src/dub/models/operations/listcommissions.py b/src/dub/models/operations/listcommissions.py index 9071c0c5..0631fab0 100644 --- a/src/dub/models/operations/listcommissions.py +++ b/src/dub/models/operations/listcommissions.py @@ -566,7 +566,7 @@ class ListCommissionsResponseBodyTypedDict(TypedDict): quantity: float r"""The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.""" metadata: Nullable[Dict[str, Any]] - r"""User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).""" + r"""Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata.""" created_at: str r"""The date and time when the commission was created.""" updated_at: str @@ -608,7 +608,7 @@ class ListCommissionsResponseBody(BaseModel): r"""The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.""" metadata: Nullable[Dict[str, Any]] - r"""User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).""" + r"""Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata.""" created_at: Annotated[str, pydantic.Field(alias="createdAt")] r"""The date and time when the commission was created.""" diff --git a/src/dub/models/operations/listevents.py b/src/dub/models/operations/listevents.py index a6346c0b..86f5ee78 100644 --- a/src/dub/models/operations/listevents.py +++ b/src/dub/models/operations/listevents.py @@ -825,19 +825,19 @@ class ListEventsResponseBodyLink(BaseModel): ] = UNSET r"""An array of A/B test URLs and the percentage of traffic to send to each URL.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") @@ -1646,19 +1646,19 @@ class ResponseBodyLink(BaseModel): ] = UNSET r"""An array of A/B test URLs and the percentage of traffic to send to each URL.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") @@ -2353,19 +2353,19 @@ class ListEventsResponseBodyEventsLink(BaseModel): ] = UNSET r"""An array of A/B test URLs and the percentage of traffic to send to each URL.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") diff --git a/src/dub/models/operations/listpartners.py b/src/dub/models/operations/listpartners.py index 8f84c99e..6c65abf9 100644 --- a/src/dub/models/operations/listpartners.py +++ b/src/dub/models/operations/listpartners.py @@ -238,19 +238,19 @@ class Links(BaseModel): url: str r"""The destination URL of the short link.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") @@ -762,6 +762,7 @@ class ListPartnersResponseBodyTypedDict(TypedDict): lead_reward_id: NotRequired[Nullable[str]] sale_reward_id: NotRequired[Nullable[str]] referral_reward_id: NotRequired[Nullable[str]] + custom_reward_id: NotRequired[Nullable[str]] discount_id: NotRequired[Nullable[str]] application_id: NotRequired[Nullable[str]] r"""If the partner submitted an application to join the program, this is the ID of the application.""" @@ -885,7 +886,7 @@ class ListPartnersResponseBody(BaseModel): total_commissions: Annotated[ Optional[float], pydantic.Field(alias="totalCommissions") - ] = 0 + ] = 0.0 r"""The total commissions paid to the partner for their referrals""" click_reward_id: Annotated[ @@ -904,6 +905,10 @@ class ListPartnersResponseBody(BaseModel): OptionalNullable[str], pydantic.Field(alias="referralRewardId") ] = UNSET + custom_reward_id: Annotated[ + OptionalNullable[str], pydantic.Field(alias="customRewardId") + ] = UNSET + discount_id: Annotated[ OptionalNullable[str], pydantic.Field(alias="discountId") ] = UNSET @@ -933,26 +938,26 @@ class ListPartnersResponseBody(BaseModel): tags: Optional[List[Tags]] = None r"""The tags associated with the partner.""" - total_clicks: Annotated[Optional[float], pydantic.Field(alias="totalClicks")] = 0 + total_clicks: Annotated[Optional[float], pydantic.Field(alias="totalClicks")] = 0.0 r"""The total number of clicks on the partner's links""" - total_leads: Annotated[Optional[float], pydantic.Field(alias="totalLeads")] = 0 + total_leads: Annotated[Optional[float], pydantic.Field(alias="totalLeads")] = 0.0 r"""The total number of leads generated by the partner's links""" total_conversions: Annotated[ Optional[float], pydantic.Field(alias="totalConversions") - ] = 0 + ] = 0.0 r"""The total number of leads that converted to paying customers""" - total_sales: Annotated[Optional[float], pydantic.Field(alias="totalSales")] = 0 + total_sales: Annotated[Optional[float], pydantic.Field(alias="totalSales")] = 0.0 r"""The total number of sales generated by the partner's links (includes recurring sales)""" total_sale_amount: Annotated[ Optional[float], pydantic.Field(alias="totalSaleAmount") - ] = 0 + ] = 0.0 r"""Total revenue generated by the partner's links""" - net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0 + net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0.0 r"""Net revenue after commissions (`Total Revenue - Total Commissions`)""" earnings_per_click: Annotated[ @@ -1023,6 +1028,7 @@ def serialize_model(self, handler): "leadRewardId", "saleRewardId", "referralRewardId", + "customRewardId", "discountId", "applicationId", "bannedAt", @@ -1071,6 +1077,7 @@ def serialize_model(self, handler): "leadRewardId", "saleRewardId", "referralRewardId", + "customRewardId", "discountId", "applicationId", "bannedAt", diff --git a/src/dub/models/operations/retrievepartnerlinks.py b/src/dub/models/operations/retrievepartnerlinks.py index 43bb0d42..1187b436 100644 --- a/src/dub/models/operations/retrievepartnerlinks.py +++ b/src/dub/models/operations/retrievepartnerlinks.py @@ -96,19 +96,19 @@ class RetrievePartnerLinksResponseBody(BaseModel): url: str r"""The destination URL of the short link.""" - clicks: Optional[float] = 0 + clicks: Optional[float] = 0.0 r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 + leads: Optional[float] = 0.0 r"""The number of leads the short link has generated.""" - conversions: Optional[float] = 0 + conversions: Optional[float] = 0.0 r"""The number of leads that converted to paying customers.""" - sales: Optional[float] = 0 + sales: Optional[float] = 0.0 r"""The total number of sales (includes recurring sales) generated by the short link.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0.0 r"""The total dollar value of sales (in cents) generated by the short link.""" @model_serializer(mode="wrap") diff --git a/src/dub/models/operations/updatecommission.py b/src/dub/models/operations/updatecommission.py index 9987a433..bc96e255 100644 --- a/src/dub/models/operations/updatecommission.py +++ b/src/dub/models/operations/updatecommission.py @@ -369,7 +369,7 @@ class UpdateCommissionResponseBodyTypedDict(TypedDict): quantity: float r"""The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.""" metadata: Nullable[Dict[str, Any]] - r"""User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).""" + r"""Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata.""" created_at: str r"""The date and time when the commission was created.""" updated_at: str @@ -413,7 +413,7 @@ class UpdateCommissionResponseBody(BaseModel): r"""The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.""" metadata: Nullable[Dict[str, Any]] - r"""User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).""" + r"""Metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`), or from Stripe webhook metadata.""" created_at: Annotated[str, pydantic.Field(alias="createdAt")] r"""The date and time when the commission was created.""" diff --git a/src/dub/models/operations/updatecustomer.py b/src/dub/models/operations/updatecustomer.py index ca2d6442..98cbdf1b 100644 --- a/src/dub/models/operations/updatecustomer.py +++ b/src/dub/models/operations/updatecustomer.py @@ -28,6 +28,8 @@ class UpdateCustomerRequestBodyTypedDict(TypedDict): r"""The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.""" country: NotRequired[str] r"""The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).""" + subscription_canceled_at: NotRequired[Nullable[str]] + r"""The date the customer canceled their subscription. Set to a timestamp to mark the subscription as canceled, or `null` to clear it (e.g. if they resubscribe).""" class UpdateCustomerRequestBody(BaseModel): @@ -51,12 +53,27 @@ class UpdateCustomerRequestBody(BaseModel): country: Optional[str] = None r"""The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).""" + subscription_canceled_at: Annotated[ + OptionalNullable[str], pydantic.Field(alias="subscriptionCanceledAt") + ] = UNSET + r"""The date the customer canceled their subscription. Set to a timestamp to mark the subscription as canceled, or `null` to clear it (e.g. if they resubscribe).""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["email", "name", "avatar", "externalId", "stripeCustomerId", "country"] + [ + "email", + "name", + "avatar", + "externalId", + "stripeCustomerId", + "country", + "subscriptionCanceledAt", + ] + ) + nullable_fields = set( + ["email", "name", "avatar", "stripeCustomerId", "subscriptionCanceledAt"] ) - nullable_fields = set(["email", "name", "avatar", "stripeCustomerId"]) serialized = handler(self) m = {} diff --git a/src/dub/models/operations/upsertpartnerlink.py b/src/dub/models/operations/upsertpartnerlink.py index b7590da8..ccf50793 100644 --- a/src/dub/models/operations/upsertpartnerlink.py +++ b/src/dub/models/operations/upsertpartnerlink.py @@ -251,7 +251,7 @@ def serialize_model(self, handler): class UpsertPartnerLinkRequestBodyTypedDict(TypedDict): url: str - r"""The URL to upsert for. Will throw an error if the domain doesn't match the program's default URL domain.""" + r"""The URL to upsert for.""" partner_id: NotRequired[Nullable[str]] r"""The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.""" tenant_id: NotRequired[Nullable[str]] @@ -266,7 +266,7 @@ class UpsertPartnerLinkRequestBodyTypedDict(TypedDict): class UpsertPartnerLinkRequestBody(BaseModel): url: str - r"""The URL to upsert for. Will throw an error if the domain doesn't match the program's default URL domain.""" + r"""The URL to upsert for.""" partner_id: Annotated[OptionalNullable[str], pydantic.Field(alias="partnerId")] = ( UNSET diff --git a/src/dub/utils/__init__.py b/src/dub/utils/__init__.py index 7af3b82c..6d6c5c3f 100644 --- a/src/dub/utils/__init__.py +++ b/src/dub/utils/__init__.py @@ -34,6 +34,7 @@ async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: from .requestbodies import serialize_request_body, SerializedRequestBody from .security import get_security from .serializers import ( + ALLOW_UNKNOWN_UNION_VARIANTS, get_pydantic_model, marshal_json, unmarshal, @@ -104,6 +105,7 @@ async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: "stream_to_bytes", "stream_to_bytes_async", "template_url", + "ALLOW_UNKNOWN_UNION_VARIANTS", "unmarshal", "unmarshal_json", "validate_decimal", @@ -126,6 +128,7 @@ async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: "parse_duration": ".datetimes", "get_global_from_env": ".values", "get_headers": ".headers", + "ALLOW_UNKNOWN_UNION_VARIANTS": ".serializers", "get_pydantic_model": ".serializers", "get_query_params": ".queryparams", "get_response_headers": ".headers", diff --git a/src/dub/utils/serializers.py b/src/dub/utils/serializers.py index 1031ed93..5e57d36e 100644 --- a/src/dub/utils/serializers.py +++ b/src/dub/utils/serializers.py @@ -112,11 +112,26 @@ def validate(c): return validate +ALLOW_UNKNOWN_UNION_VARIANTS = "speakeasy_allow_unknown_union_variants" +"""Validation-context key enabling the Unknown fallback on open discriminated +unions. The SDK sets it when deserializing server responses; validation +without it (e.g. of user-constructed request payloads) stays strict. Pass +``context={ALLOW_UNKNOWN_UNION_VARIANTS: True}`` to ``model_validate`` to +opt in when parsing response payloads manually.""" + + def unmarshal_json(raw, typ: Any) -> Any: - return unmarshal(from_json(raw), typ, coerce_iterables=False) + return unmarshal( + from_json(raw), typ, coerce_iterables=False, allow_unknown_union_variants=True + ) -def unmarshal(val, typ: Any, coerce_iterables: bool = True) -> Any: +def unmarshal( + val, + typ: Any, + coerce_iterables: bool = True, + allow_unknown_union_variants: bool = False, +) -> Any: if coerce_iterables: val = _coerce_iterables_for_type(val, typ) unmarshaller = create_model( @@ -125,7 +140,12 @@ def unmarshal(val, typ: Any, coerce_iterables: bool = True) -> Any: __config__=ConfigDict(populate_by_name=True, arbitrary_types_allowed=True), ) - m = unmarshaller(body=val) + if allow_unknown_union_variants: + m = unmarshaller.model_validate( + {"body": val}, context={ALLOW_UNKNOWN_UNION_VARIANTS: True} + ) + else: + m = unmarshaller(body=val) # pyright: ignore[reportAttributeAccessIssue] return m.body # type: ignore