diff --git a/.fern/metadata.json b/.fern/metadata.json index 53657ed2..f1041dfc 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "3.49.3", + "cliVersion": "3.98.5", "generatorName": "fernapi/fern-python-sdk", "generatorVersion": "4.55.4", "generatorConfig": { @@ -14,5 +14,5 @@ "use_typeddict_requests_for_file_upload": true, "exclude_types_from_init_exports": true }, - "sdkVersion": "44.0.1.20260122" + "sdkVersion": "44.1.0.20260520" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock new file mode 100644 index 00000000..276d1b4d --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 813313da9098aacfa234225449b0c67cf4a6284c + tree_hash: ade628ad7ca34fabeab9dae2384f31473e08fb0d + timestamp: 2026-05-19T21:17:07.449Z + cli_version: unknown + generator_versions: {} +current_generation: 813313da9098aacfa234225449b0c67cf4a6284c +patches: [] diff --git a/.fernignore b/.fernignore index 072c9072..246906a5 100644 --- a/.fernignore +++ b/.fernignore @@ -10,4 +10,7 @@ legacy src/square/core/api_error.py src/square/utils/webhooks_helper.py tests/integration -README.md \ No newline at end of file +README.md +.fern/replay.lock +.fern/replay.yml +.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..74928d6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.fern/replay.lock linguist-generated=true diff --git a/poetry.lock b/poetry.lock index 2f8666b3..dfc85896 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2026.1.4" +version = "2026.4.22" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"}, - {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"}, + {file = "certifi-2026.4.22-py3-none-any.whl", hash = "sha256:3cb2210c8f88ba2318d29b0388d1023c8492ff72ecdde4ebdaddbb13a31b1c4a"}, + {file = "certifi-2026.4.22.tar.gz", hash = "sha256:8d455352a37b71bf76a79caa83a3d6c25afee4a385d632127b6afb3963f1c580"}, ] [[package]] @@ -147,17 +147,17 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" -version = "3.11" +version = "3.15" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.8" files = [ - {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, - {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, + {file = "idna-3.15-py3-none-any.whl", hash = "sha256:048adeaf8c2d788c40fee287673ccaa74c24ffd8dcf09ffa555a2fbb59f10ac8"}, + {file = "idna-3.15.tar.gz", hash = "sha256:ca962446ea538f7092a95e057da437618e886f4d349216d2b1e294abfdb65fdc"}, ] [package.extras] -all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] +all = ["mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] [[package]] name = "iniconfig" @@ -236,13 +236,13 @@ files = [ [[package]] name = "packaging" -version = "26.0" +version = "26.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529"}, - {file = "packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4"}, + {file = "packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e"}, + {file = "packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661"}, ] [[package]] @@ -517,58 +517,58 @@ files = [ [[package]] name = "tomli" -version = "2.4.0" +version = "2.4.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" files = [ - {file = "tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867"}, - {file = "tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9"}, - {file = "tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95"}, - {file = "tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76"}, - {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d"}, - {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576"}, - {file = "tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a"}, - {file = "tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa"}, - {file = "tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614"}, - {file = "tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1"}, - {file = "tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8"}, - {file = "tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a"}, - {file = "tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1"}, - {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b"}, - {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51"}, - {file = "tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729"}, - {file = "tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da"}, - {file = "tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3"}, - {file = "tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0"}, - {file = "tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e"}, - {file = "tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4"}, - {file = "tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e"}, - {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c"}, - {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f"}, - {file = "tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86"}, - {file = "tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87"}, - {file = "tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132"}, - {file = "tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6"}, - {file = "tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc"}, - {file = "tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66"}, - {file = "tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d"}, - {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702"}, - {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8"}, - {file = "tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776"}, - {file = "tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475"}, - {file = "tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2"}, - {file = "tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9"}, - {file = "tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0"}, - {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df"}, - {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d"}, - {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f"}, - {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b"}, - {file = "tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087"}, - {file = "tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd"}, - {file = "tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4"}, - {file = "tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a"}, - {file = "tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c"}, + {file = "tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30"}, + {file = "tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a"}, + {file = "tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076"}, + {file = "tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9"}, + {file = "tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c"}, + {file = "tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc"}, + {file = "tomli-2.4.1-cp311-cp311-win32.whl", hash = "sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049"}, + {file = "tomli-2.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e"}, + {file = "tomli-2.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece"}, + {file = "tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a"}, + {file = "tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085"}, + {file = "tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9"}, + {file = "tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5"}, + {file = "tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585"}, + {file = "tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1"}, + {file = "tomli-2.4.1-cp312-cp312-win32.whl", hash = "sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917"}, + {file = "tomli-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9"}, + {file = "tomli-2.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257"}, + {file = "tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54"}, + {file = "tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a"}, + {file = "tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897"}, + {file = "tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f"}, + {file = "tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d"}, + {file = "tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5"}, + {file = "tomli-2.4.1-cp313-cp313-win32.whl", hash = "sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd"}, + {file = "tomli-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36"}, + {file = "tomli-2.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd"}, + {file = "tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf"}, + {file = "tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac"}, + {file = "tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662"}, + {file = "tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853"}, + {file = "tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15"}, + {file = "tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba"}, + {file = "tomli-2.4.1-cp314-cp314-win32.whl", hash = "sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6"}, + {file = "tomli-2.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7"}, + {file = "tomli-2.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232"}, + {file = "tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4"}, + {file = "tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c"}, + {file = "tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d"}, + {file = "tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41"}, + {file = "tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c"}, + {file = "tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f"}, + {file = "tomli-2.4.1-cp314-cp314t-win32.whl", hash = "sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8"}, + {file = "tomli-2.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26"}, + {file = "tomli-2.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396"}, + {file = "tomli-2.4.1-py3-none-any.whl", hash = "sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe"}, + {file = "tomli-2.4.1.tar.gz", hash = "sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index c3cd1492..98399848 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ dynamic = ["version"] [tool.poetry] name = "squareup" -version = "44.0.1.20260122" +version = "44.1.0.20260520" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 5000f939..d35be41d 100644 --- a/reference.md +++ b/reference.md @@ -12826,6 +12826,19 @@ For more information, see [Permissions](https://developer.squareup.com/docs/paym
+**app_fee_allocations:** `typing.Optional[typing.Sequence[typing.Any]]` + +Details pertaining to recipients of the application fee. The sum of the amounts in the +app_fee_allocations must equal the app_fee_money amount, if present. If populated, an +allocation must be present for every party that expects to receive a portion of the application +fee, including the application developer. + +
+
+ +
+
+ **delay_duration:** `typing.Optional[str]` The duration of time after the payment's creation when Square automatically @@ -14154,6 +14167,19 @@ For more information, see [Permissions](https://developer.squareup.com/docs/paym
+**app_fee_allocations:** `typing.Optional[typing.Sequence[typing.Any]]` + +Details pertaining to contributors to the refund of the application fee. +The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if +present. If populated, an allocation must be present for every party that expects to contribute +a portion of the refunded application fee, including the application developer. + +
+
+ +
+
+ **payment_id:** `typing.Optional[str]` The unique ID of the payment being refunded. diff --git a/src/square/core/client_wrapper.py b/src/square/core/client_wrapper.py index 529f819d..b4f6b9f0 100644 --- a/src/square/core/client_wrapper.py +++ b/src/square/core/client_wrapper.py @@ -26,18 +26,18 @@ def get_headers(self) -> typing.Dict[str, str]: import platform headers: typing.Dict[str, str] = { - "User-Agent": "squareup/44.0.1.20260122", + "User-Agent": "squareup/44.1.0.20260520", "X-Fern-Language": "Python", "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "squareup", - "X-Fern-SDK-Version": "44.0.1.20260122", + "X-Fern-SDK-Version": "44.1.0.20260520", **(self.get_custom_headers() or {}), } token = self._get_token() if token is not None: headers["Authorization"] = f"Bearer {token}" - headers["Square-Version"] = self._version if self._version is not None else "2026-01-22" + headers["Square-Version"] = self._version if self._version is not None else "2026-05-20" return headers def _get_token(self) -> typing.Optional[str]: diff --git a/src/square/payments/client.py b/src/square/payments/client.py index 58d6535c..89962a77 100644 --- a/src/square/payments/client.py +++ b/src/square/payments/client.py @@ -211,6 +211,7 @@ def create( amount_money: typing.Optional[MoneyParams] = OMIT, tip_money: typing.Optional[MoneyParams] = OMIT, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, delay_duration: typing.Optional[str] = OMIT, delay_action: typing.Optional[str] = OMIT, autocomplete: typing.Optional[bool] = OMIT, @@ -305,6 +306,12 @@ def create( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to recipients of the application fee. The sum of the amounts in the + app_fee_allocations must equal the app_fee_money amount, if present. If populated, an + allocation must be present for every party that expects to receive a portion of the application + fee, including the application developer. + delay_duration : typing.Optional[str] The duration of time after the payment's creation when Square automatically either completes or cancels the payment depending on the `delay_action` field value. @@ -452,6 +459,7 @@ def create( amount_money=amount_money, tip_money=tip_money, app_fee_money=app_fee_money, + app_fee_allocations=app_fee_allocations, delay_duration=delay_duration, delay_action=delay_action, autocomplete=autocomplete, @@ -881,6 +889,7 @@ async def create( amount_money: typing.Optional[MoneyParams] = OMIT, tip_money: typing.Optional[MoneyParams] = OMIT, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, delay_duration: typing.Optional[str] = OMIT, delay_action: typing.Optional[str] = OMIT, autocomplete: typing.Optional[bool] = OMIT, @@ -975,6 +984,12 @@ async def create( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to recipients of the application fee. The sum of the amounts in the + app_fee_allocations must equal the app_fee_money amount, if present. If populated, an + allocation must be present for every party that expects to receive a portion of the application + fee, including the application developer. + delay_duration : typing.Optional[str] The duration of time after the payment's creation when Square automatically either completes or cancels the payment depending on the `delay_action` field value. @@ -1130,6 +1145,7 @@ async def main() -> None: amount_money=amount_money, tip_money=tip_money, app_fee_money=app_fee_money, + app_fee_allocations=app_fee_allocations, delay_duration=delay_duration, delay_action=delay_action, autocomplete=autocomplete, diff --git a/src/square/payments/raw_client.py b/src/square/payments/raw_client.py index fd59722f..ef7add6d 100644 --- a/src/square/payments/raw_client.py +++ b/src/square/payments/raw_client.py @@ -214,6 +214,7 @@ def create( amount_money: typing.Optional[MoneyParams] = OMIT, tip_money: typing.Optional[MoneyParams] = OMIT, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, delay_duration: typing.Optional[str] = OMIT, delay_action: typing.Optional[str] = OMIT, autocomplete: typing.Optional[bool] = OMIT, @@ -308,6 +309,12 @@ def create( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to recipients of the application fee. The sum of the amounts in the + app_fee_allocations must equal the app_fee_money amount, if present. If populated, an + allocation must be present for every party that expects to receive a portion of the application + fee, including the application developer. + delay_duration : typing.Optional[str] The duration of time after the payment's creation when Square automatically either completes or cancels the payment depending on the `delay_action` field value. @@ -445,6 +452,7 @@ def create( "app_fee_money": convert_and_respect_annotation_metadata( object_=app_fee_money, annotation=MoneyParams, direction="write" ), + "app_fee_allocations": app_fee_allocations, "delay_duration": delay_duration, "delay_action": delay_action, "autocomplete": autocomplete, @@ -942,6 +950,7 @@ async def create( amount_money: typing.Optional[MoneyParams] = OMIT, tip_money: typing.Optional[MoneyParams] = OMIT, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, delay_duration: typing.Optional[str] = OMIT, delay_action: typing.Optional[str] = OMIT, autocomplete: typing.Optional[bool] = OMIT, @@ -1036,6 +1045,12 @@ async def create( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to recipients of the application fee. The sum of the amounts in the + app_fee_allocations must equal the app_fee_money amount, if present. If populated, an + allocation must be present for every party that expects to receive a portion of the application + fee, including the application developer. + delay_duration : typing.Optional[str] The duration of time after the payment's creation when Square automatically either completes or cancels the payment depending on the `delay_action` field value. @@ -1173,6 +1188,7 @@ async def create( "app_fee_money": convert_and_respect_annotation_metadata( object_=app_fee_money, annotation=MoneyParams, direction="write" ), + "app_fee_allocations": app_fee_allocations, "delay_duration": delay_duration, "delay_action": delay_action, "autocomplete": autocomplete, diff --git a/src/square/refunds/client.py b/src/square/refunds/client.py index f3aa76d2..d7081a3f 100644 --- a/src/square/refunds/client.py +++ b/src/square/refunds/client.py @@ -180,6 +180,7 @@ def refund_payment( idempotency_key: str, amount_money: MoneyParams, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, payment_id: typing.Optional[str] = OMIT, destination_id: typing.Optional[str] = OMIT, unlinked: typing.Optional[bool] = OMIT, @@ -236,6 +237,12 @@ def refund_payment( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to contributors to the refund of the application fee. + The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if + present. If populated, an allocation must be present for every party that expects to contribute + a portion of the refunded application fee, including the application developer. + payment_id : typing.Optional[str] The unique ID of the payment being refunded. Required when unlinked=false, otherwise must not be set. @@ -310,6 +317,7 @@ def refund_payment( idempotency_key=idempotency_key, amount_money=amount_money, app_fee_money=app_fee_money, + app_fee_allocations=app_fee_allocations, payment_id=payment_id, destination_id=destination_id, unlinked=unlinked, @@ -528,6 +536,7 @@ async def refund_payment( idempotency_key: str, amount_money: MoneyParams, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, payment_id: typing.Optional[str] = OMIT, destination_id: typing.Optional[str] = OMIT, unlinked: typing.Optional[bool] = OMIT, @@ -584,6 +593,12 @@ async def refund_payment( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to contributors to the refund of the application fee. + The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if + present. If populated, an allocation must be present for every party that expects to contribute + a portion of the refunded application fee, including the application developer. + payment_id : typing.Optional[str] The unique ID of the payment being refunded. Required when unlinked=false, otherwise must not be set. @@ -666,6 +681,7 @@ async def main() -> None: idempotency_key=idempotency_key, amount_money=amount_money, app_fee_money=app_fee_money, + app_fee_allocations=app_fee_allocations, payment_id=payment_id, destination_id=destination_id, unlinked=unlinked, diff --git a/src/square/refunds/raw_client.py b/src/square/refunds/raw_client.py index 9c19e203..ea7bd59c 100644 --- a/src/square/refunds/raw_client.py +++ b/src/square/refunds/raw_client.py @@ -183,6 +183,7 @@ def refund_payment( idempotency_key: str, amount_money: MoneyParams, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, payment_id: typing.Optional[str] = OMIT, destination_id: typing.Optional[str] = OMIT, unlinked: typing.Optional[bool] = OMIT, @@ -239,6 +240,12 @@ def refund_payment( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to contributors to the refund of the application fee. + The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if + present. If populated, an allocation must be present for every party that expects to contribute + a portion of the refunded application fee, including the application developer. + payment_id : typing.Optional[str] The unique ID of the payment being refunded. Required when unlinked=false, otherwise must not be set. @@ -305,6 +312,7 @@ def refund_payment( "app_fee_money": convert_and_respect_annotation_metadata( object_=app_fee_money, annotation=MoneyParams, direction="write" ), + "app_fee_allocations": app_fee_allocations, "payment_id": payment_id, "destination_id": destination_id, "unlinked": unlinked, @@ -545,6 +553,7 @@ async def refund_payment( idempotency_key: str, amount_money: MoneyParams, app_fee_money: typing.Optional[MoneyParams] = OMIT, + app_fee_allocations: typing.Optional[typing.Sequence[typing.Any]] = OMIT, payment_id: typing.Optional[str] = OMIT, destination_id: typing.Optional[str] = OMIT, unlinked: typing.Optional[bool] = OMIT, @@ -601,6 +610,12 @@ async def refund_payment( To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + app_fee_allocations : typing.Optional[typing.Sequence[typing.Any]] + Details pertaining to contributors to the refund of the application fee. + The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if + present. If populated, an allocation must be present for every party that expects to contribute + a portion of the refunded application fee, including the application developer. + payment_id : typing.Optional[str] The unique ID of the payment being refunded. Required when unlinked=false, otherwise must not be set. @@ -667,6 +682,7 @@ async def refund_payment( "app_fee_money": convert_and_respect_annotation_metadata( object_=app_fee_money, annotation=MoneyParams, direction="write" ), + "app_fee_allocations": app_fee_allocations, "payment_id": payment_id, "destination_id": destination_id, "unlinked": unlinked, diff --git a/src/square/requests/card_payment_details.py b/src/square/requests/card_payment_details.py index 1b2e1f36..5bf773ed 100644 --- a/src/square/requests/card_payment_details.py +++ b/src/square/requests/card_payment_details.py @@ -5,6 +5,7 @@ import typing_extensions from .card import CardParams from .card_payment_timeline import CardPaymentTimelineParams +from .card_surcharge_details import CardSurchargeDetailsParams from .device_details import DeviceDetailsParams from .error import ErrorParams @@ -106,3 +107,19 @@ class CardPaymentDetailsParams(typing_extensions.TypedDict): """ Information about errors encountered during the request. """ + + applied_card_surcharge_details: typing_extensions.NotRequired[CardSurchargeDetailsParams] + """ + Additional information about a card_surcharge on the payment. + """ + + wallet_type: typing_extensions.NotRequired[str] + """ + The type of digital wallet used for this card payment, if applicable. + Currently only populated for in-person Apple Pay payments. Detection has no false + positives but may have false negatives (some Apple Pay payments may not be detected). + + For payments with `source_type` of `WALLET`, see `DigitalWalletDetails` instead. + + Values: `APPLE_PAY` + """ diff --git a/src/square/requests/card_surcharge_details.py b/src/square/requests/card_surcharge_details.py new file mode 100644 index 00000000..dafded64 --- /dev/null +++ b/src/square/requests/card_surcharge_details.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions +from .money import MoneyParams + + +class CardSurchargeDetailsParams(typing_extensions.TypedDict): + """ + Details related to an attempt to apply a card surcharge to this payment. When surcharge + eligibility is not known in advance, such as when the card type (debit or credit) is required + to make the eligibility determination, proposed_card_surcharge_money and + proposed_additional_amount_money will match the values in the request, while card_surcharge_money + and additional_amount_money are present only when the payment has a surcharge applied. + """ + + card_surcharge_money: typing_extensions.NotRequired[MoneyParams] + """ + A specific surcharge levied by the merchant, if a card payment is used, instead of cash or + some other payment type. Should only include the base surcharge amount. Any additional fees related + to the surcharge (e.g. taxes on the surcharge) should only be included in the additional_amount_money. + This amount is specified in the smallest denomination of the applicable currency (for example, + US dollar amounts are specified in cents). For more information, see + [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + The currency code must match the currency associated with the business that is accepting the + payment. + """ diff --git a/src/square/requests/digital_wallet_details.py b/src/square/requests/digital_wallet_details.py index 77209f0d..9bdb4967 100644 --- a/src/square/requests/digital_wallet_details.py +++ b/src/square/requests/digital_wallet_details.py @@ -5,6 +5,7 @@ import typing_extensions from .cash_app_details import CashAppDetailsParams from .error import ErrorParams +from .lightning_details import LightningDetailsParams class DigitalWalletDetailsParams(typing_extensions.TypedDict): @@ -29,6 +30,11 @@ class DigitalWalletDetailsParams(typing_extensions.TypedDict): Brand-specific details for payments with the `brand` of `CASH_APP`. """ + lightning_details: typing_extensions.NotRequired[LightningDetailsParams] + """ + Brand-specific details for payments with the `brand` of `LIGHTNING`. + """ + errors: typing_extensions.NotRequired[typing.Sequence[ErrorParams]] """ Information about errors encountered during the payment. diff --git a/src/square/requests/electronic_money_details.py b/src/square/requests/electronic_money_details.py new file mode 100644 index 00000000..b7d4720a --- /dev/null +++ b/src/square/requests/electronic_money_details.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions +from .felica_details import FelicaDetailsParams + + +class ElectronicMoneyDetailsParams(typing_extensions.TypedDict): + """ + Details specific to electronic money payments. + """ + + felica_details: typing_extensions.NotRequired[FelicaDetailsParams] + """ + Details specific to FeliCa payments. + """ diff --git a/src/square/requests/felica_details.py b/src/square/requests/felica_details.py new file mode 100644 index 00000000..7c36008d --- /dev/null +++ b/src/square/requests/felica_details.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import typing_extensions +from ..types.felica_details_felica_brand import FelicaDetailsFelicaBrand + + +class FelicaDetailsParams(typing_extensions.TypedDict): + """ + Details for Felica payments. + """ + + terminal_id: typing_extensions.NotRequired[typing.Optional[str]] + """ + The terminal id for a Felica payment. + """ + + felica_masked_card_number: typing_extensions.NotRequired[typing.Optional[str]] + """ + The masked card number for a Felica payment. + """ + + felica_brand: typing_extensions.NotRequired[FelicaDetailsFelicaBrand] + """ + The Felica sub-brand of the payment. + See [FelicaBrand](#type-felicabrand) for possible values + """ diff --git a/src/square/requests/lightning_details.py b/src/square/requests/lightning_details.py new file mode 100644 index 00000000..f6a1d206 --- /dev/null +++ b/src/square/requests/lightning_details.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import typing_extensions + + +class LightningDetailsParams(typing_extensions.TypedDict): + """ + Additional details about `WALLET` type payments with the `brand` of `LIGHTNING`. + """ + + payment_url: typing_extensions.NotRequired[typing.Optional[str]] + """ + Payment URL for the lightning payment, a.k.a. the invoice. + """ diff --git a/src/square/requests/payment.py b/src/square/requests/payment.py index c0c5979e..c41ef4ce 100644 --- a/src/square/requests/payment.py +++ b/src/square/requests/payment.py @@ -11,6 +11,7 @@ from .cash_payment_details import CashPaymentDetailsParams from .device_details import DeviceDetailsParams from .digital_wallet_details import DigitalWalletDetailsParams +from .electronic_money_details import ElectronicMoneyDetailsParams from .external_payment_details import ExternalPaymentDetailsParams from .money import MoneyParams from .offline_payment_details import OfflinePaymentDetailsParams @@ -80,6 +81,11 @@ class PaymentParams(typing_extensions.TypedDict): For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). """ + app_fee_allocations: typing_extensions.NotRequired[typing.Optional[typing.Sequence[typing.Any]]] + """ + Details pertaining to recipients of the application fee. + """ + approved_money: typing_extensions.NotRequired[MoneyParams] """ The amount of money approved for this payment. This value may change if Square chooses to @@ -163,6 +169,11 @@ class PaymentParams(typing_extensions.TypedDict): Details about a bank account payment. These details are only populated if the source_type is `BANK_ACCOUNT`. """ + electronic_money_details: typing_extensions.NotRequired[ElectronicMoneyDetailsParams] + """ + Details specific to electronic money payments. + """ + external_details: typing_extensions.NotRequired[ExternalPaymentDetailsParams] """ Details about an external payment. The details are only populated @@ -312,6 +323,7 @@ class PaymentParams(typing_extensions.TypedDict): Details about the application that took the payment. """ + buyer_currency_exchange: typing_extensions.NotRequired[typing.Any] is_offline_payment: typing_extensions.NotRequired[bool] """ Whether or not this payment was taken offline. diff --git a/src/square/requests/payment_refund.py b/src/square/requests/payment_refund.py index 6eb94635..9251ae2f 100644 --- a/src/square/requests/payment_refund.py +++ b/src/square/requests/payment_refund.py @@ -66,6 +66,11 @@ class PaymentRefundParams(typing_extensions.TypedDict): [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). """ + app_fee_allocations: typing_extensions.NotRequired[typing.Sequence[typing.Any]] + """ + Details pertaining to contributors to the refund of the application fee. + """ + processing_fee: typing_extensions.NotRequired[typing.Optional[typing.Sequence[ProcessingFeeParams]]] """ Processing fees and fee adjustments assessed by Square for this refund. diff --git a/src/square/requests/search_orders_source_filter.py b/src/square/requests/search_orders_source_filter.py index b71b9fc7..673d6535 100644 --- a/src/square/requests/search_orders_source_filter.py +++ b/src/square/requests/search_orders_source_filter.py @@ -17,19 +17,3 @@ class SearchOrdersSourceFilterParams(typing_extensions.TypedDict): Max: 10 source names. """ - - source_application_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]] - """ - Filters by the [Source](entity:OrderSource) `applicationId`. The filter returns any orders - with a `source.applicationId` that matches any of the listed source applicationIds. - - Max: 100 source applicationIds. - """ - - source_client_ous: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]] - """ - Filters by the [Source](entity:OrderSource) `clientOu`. The filter returns any orders - with a `source.clientOu` that matches any of the listed source clientOus. - - Max: 100 source clientOus. - """ diff --git a/src/square/types/card_payment_details.py b/src/square/types/card_payment_details.py index f8c0eba0..58a5547e 100644 --- a/src/square/types/card_payment_details.py +++ b/src/square/types/card_payment_details.py @@ -7,6 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .card import Card from .card_payment_timeline import CardPaymentTimeline +from .card_surcharge_details import CardSurchargeDetails from .device_details import DeviceDetails from .error import Error @@ -109,6 +110,22 @@ class CardPaymentDetails(UncheckedBaseModel): Information about errors encountered during the request. """ + applied_card_surcharge_details: typing.Optional[CardSurchargeDetails] = pydantic.Field(default=None) + """ + Additional information about a card_surcharge on the payment. + """ + + wallet_type: typing.Optional[str] = pydantic.Field(default=None) + """ + The type of digital wallet used for this card payment, if applicable. + Currently only populated for in-person Apple Pay payments. Detection has no false + positives but may have false negatives (some Apple Pay payments may not be detected). + + For payments with `source_type` of `WALLET`, see `DigitalWalletDetails` instead. + + Values: `APPLE_PAY` + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/square/types/card_surcharge_details.py b/src/square/types/card_surcharge_details.py new file mode 100644 index 00000000..1ad958cd --- /dev/null +++ b/src/square/types/card_surcharge_details.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .money import Money + + +class CardSurchargeDetails(UncheckedBaseModel): + """ + Details related to an attempt to apply a card surcharge to this payment. When surcharge + eligibility is not known in advance, such as when the card type (debit or credit) is required + to make the eligibility determination, proposed_card_surcharge_money and + proposed_additional_amount_money will match the values in the request, while card_surcharge_money + and additional_amount_money are present only when the payment has a surcharge applied. + """ + + card_surcharge_money: typing.Optional[Money] = pydantic.Field(default=None) + """ + A specific surcharge levied by the merchant, if a card payment is used, instead of cash or + some other payment type. Should only include the base surcharge amount. Any additional fees related + to the surcharge (e.g. taxes on the surcharge) should only be included in the additional_amount_money. + This amount is specified in the smallest denomination of the applicable currency (for example, + US dollar amounts are specified in cents). For more information, see + [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + The currency code must match the currency associated with the business that is accepting the + payment. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/square/types/digital_wallet_details.py b/src/square/types/digital_wallet_details.py index b5df032a..6950d5c4 100644 --- a/src/square/types/digital_wallet_details.py +++ b/src/square/types/digital_wallet_details.py @@ -7,6 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .cash_app_details import CashAppDetails from .error import Error +from .lightning_details import LightningDetails class DigitalWalletDetails(UncheckedBaseModel): @@ -31,6 +32,11 @@ class DigitalWalletDetails(UncheckedBaseModel): Brand-specific details for payments with the `brand` of `CASH_APP`. """ + lightning_details: typing.Optional[LightningDetails] = pydantic.Field(default=None) + """ + Brand-specific details for payments with the `brand` of `LIGHTNING`. + """ + errors: typing.Optional[typing.List[Error]] = pydantic.Field(default=None) """ Information about errors encountered during the payment. diff --git a/src/square/types/electronic_money_details.py b/src/square/types/electronic_money_details.py new file mode 100644 index 00000000..11f47e77 --- /dev/null +++ b/src/square/types/electronic_money_details.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .felica_details import FelicaDetails + + +class ElectronicMoneyDetails(UncheckedBaseModel): + """ + Details specific to electronic money payments. + """ + + felica_details: typing.Optional[FelicaDetails] = pydantic.Field(default=None) + """ + Details specific to FeliCa payments. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/square/types/felica_details.py b/src/square/types/felica_details.py new file mode 100644 index 00000000..eda9ee2a --- /dev/null +++ b/src/square/types/felica_details.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .felica_details_felica_brand import FelicaDetailsFelicaBrand + + +class FelicaDetails(UncheckedBaseModel): + """ + Details for Felica payments. + """ + + terminal_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The terminal id for a Felica payment. + """ + + felica_masked_card_number: typing.Optional[str] = pydantic.Field(default=None) + """ + The masked card number for a Felica payment. + """ + + felica_brand: typing.Optional[FelicaDetailsFelicaBrand] = pydantic.Field(default=None) + """ + The Felica sub-brand of the payment. + See [FelicaBrand](#type-felicabrand) for possible values + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/square/types/felica_details_felica_brand.py b/src/square/types/felica_details_felica_brand.py new file mode 100644 index 00000000..fd6d3f15 --- /dev/null +++ b/src/square/types/felica_details_felica_brand.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FelicaDetailsFelicaBrand = typing.Union[ + typing.Literal["UNKNOWN", "FELICA_ID", "FELICA_TRANSPORTATION", "FELICA_QP"], typing.Any +] diff --git a/src/square/types/lightning_details.py b/src/square/types/lightning_details.py new file mode 100644 index 00000000..9066ad19 --- /dev/null +++ b/src/square/types/lightning_details.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LightningDetails(UncheckedBaseModel): + """ + Additional details about `WALLET` type payments with the `brand` of `LIGHTNING`. + """ + + payment_url: typing.Optional[str] = pydantic.Field(default=None) + """ + Payment URL for the lightning payment, a.k.a. the invoice. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/square/types/payment.py b/src/square/types/payment.py index 2ead708d..a24ca34f 100644 --- a/src/square/types/payment.py +++ b/src/square/types/payment.py @@ -13,6 +13,7 @@ from .cash_payment_details import CashPaymentDetails from .device_details import DeviceDetails from .digital_wallet_details import DigitalWalletDetails +from .electronic_money_details import ElectronicMoneyDetails from .external_payment_details import ExternalPaymentDetails from .money import Money from .offline_payment_details import OfflinePaymentDetails @@ -82,6 +83,11 @@ class Payment(UncheckedBaseModel): For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). """ + app_fee_allocations: typing.Optional[typing.List[typing.Any]] = pydantic.Field(default=None) + """ + Details pertaining to recipients of the application fee. + """ + approved_money: typing.Optional[Money] = pydantic.Field(default=None) """ The amount of money approved for this payment. This value may change if Square chooses to @@ -165,6 +171,11 @@ class Payment(UncheckedBaseModel): Details about a bank account payment. These details are only populated if the source_type is `BANK_ACCOUNT`. """ + electronic_money_details: typing.Optional[ElectronicMoneyDetails] = pydantic.Field(default=None) + """ + Details specific to electronic money payments. + """ + external_details: typing.Optional[ExternalPaymentDetails] = pydantic.Field(default=None) """ Details about an external payment. The details are only populated @@ -314,6 +325,7 @@ class Payment(UncheckedBaseModel): Details about the application that took the payment. """ + buyer_currency_exchange: typing.Optional[typing.Any] = None is_offline_payment: typing.Optional[bool] = pydantic.Field(default=None) """ Whether or not this payment was taken offline. diff --git a/src/square/types/payment_refund.py b/src/square/types/payment_refund.py index d8ca22d5..f1a2ffcf 100644 --- a/src/square/types/payment_refund.py +++ b/src/square/types/payment_refund.py @@ -68,6 +68,11 @@ class PaymentRefund(UncheckedBaseModel): [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). """ + app_fee_allocations: typing.Optional[typing.List[typing.Any]] = pydantic.Field(default=None) + """ + Details pertaining to contributors to the refund of the application fee. + """ + processing_fee: typing.Optional[typing.List[ProcessingFee]] = pydantic.Field(default=None) """ Processing fees and fee adjustments assessed by Square for this refund. diff --git a/src/square/types/search_orders_source_filter.py b/src/square/types/search_orders_source_filter.py index 6e2f6c3a..4dd471bf 100644 --- a/src/square/types/search_orders_source_filter.py +++ b/src/square/types/search_orders_source_filter.py @@ -20,22 +20,6 @@ class SearchOrdersSourceFilter(UncheckedBaseModel): Max: 10 source names. """ - source_application_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - Filters by the [Source](entity:OrderSource) `applicationId`. The filter returns any orders - with a `source.applicationId` that matches any of the listed source applicationIds. - - Max: 100 source applicationIds. - """ - - source_client_ous: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - Filters by the [Source](entity:OrderSource) `clientOu`. The filter returns any orders - with a `source.clientOu` that matches any of the listed source clientOus. - - Max: 100 source clientOus. - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: