diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index a5cd90f9..a9dde029 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 833c6a67-4a4a-4ef1-ba24-165a29264e4a management: - docChecksum: 40aa39a2ef0c9fb33177ea164f1effac + docChecksum: 3f15bffbd0f3551a3bffaa29aa53dec8 docVersion: 1.0.0 - speakeasyVersion: 1.767.0 - generationVersion: 2.888.0 - releaseVersion: 2.0.44 - configChecksum: dc4459a31dc90593c6ff0a0db2cf42e2 + speakeasyVersion: 1.768.0 + generationVersion: 2.889.1 + releaseVersion: 2.0.45 + configChecksum: 7e07dfd608b6a3cda35e83254ed5f179 repoURL: https://github.com/gr4vy/gr4vy-python.git installationURL: https://github.com/gr4vy/gr4vy-python.git published: true persistentEdits: - generation_id: fb88d19c-b5d7-4989-b72f-9d470d1ea774 - pristine_commit_hash: 083ca80fb846fe23ddaab606ccbf0fc380da2485 - pristine_tree_hash: cab3ae233c9fa7b068fba10a347a7c2c52a67b20 + generation_id: d9d02a93-663e-463f-9a83-286e34380465 + pristine_commit_hash: 3bf0f4ac9a7dea448c6f4686d4d18bcc2a2d6616 + pristine_tree_hash: f56ec92545560cd310f7e57b103656d51a03cd0e features: python: additionalDependencies: 1.0.0 @@ -290,10 +290,6 @@ trackedFiles: id: a8229b1a4946 last_write_checksum: sha1:d598484fb8838b91fb06b3d2a28a2a6ef7dcdc72 pristine_git_object: 977c51160a38001225cf7faa25172d7e32464d0f - docs/models/billingpreference.md: - id: e9d8b6149f6d - last_write_checksum: sha1:329e377d16bc5334f772cd507b855df3104e3ade - pristine_git_object: 2e9ad7ffdbaddcad1b2a39e4597263af92805c5e docs/models/body.md: id: 3612a7201bb5 last_write_checksum: sha1:2c31e1921c852df524a4f431e1eaedbb2ae8a621 @@ -430,6 +426,14 @@ trackedFiles: id: e841afec562c last_write_checksum: sha1:bfa89ed7607ba0d8d80522469d177c55d2d0f812 pristine_git_object: 0e493b5fa49ba96f9556c43f24a3074ff6010a92 + docs/models/completepazemobilesessionglobals.md: + id: 344c55909f4d + last_write_checksum: sha1:d08650aec48dbb8b41c823e4dd12734d5ee9903f + pristine_git_object: 15bedbf7b76d525ddb5818ae3d1d0c1149c35e6e + docs/models/completepazemobilesessionrequest.md: + id: 098d4c9bae30 + last_write_checksum: sha1:0f56d16e7eab63f56ff4d4b6d20f6d0d7437c5cd + pristine_git_object: 384d5b1a3fb3700f4ce9b5ea3fb29e98a7fba6ae docs/models/configuredigitalwalletglobals.md: id: 7119b8547b67 last_write_checksum: sha1:72f901cf38de462aa5530f360e1964a42622fe73 @@ -1558,6 +1562,10 @@ trackedFiles: id: 61c2b266cca5 last_write_checksum: sha1:b40aa7d1d743067d90c65fa16e3b5dfda214257e pristine_git_object: e9ed05f71f900dc8b1ff14742840ef837e8e5a28 + docs/models/payloadtypeindicator.md: + id: 9305b82d6ab1 + last_write_checksum: sha1:5c4335afce4594db1cf770d559f2c2c568d90b05 + pristine_git_object: b55cb3832f5340c4984396a95a341b6a2534167d docs/models/paymentcardbrand.md: id: 7ebe6c523e4c last_write_checksum: sha1:8bd3549572eb6c40bc2696a8a0a06e855dd9597d @@ -1748,8 +1756,8 @@ trackedFiles: pristine_git_object: c8fc3c2b5ce8eb927d426e9ab1f147aac8f935c6 docs/models/pazebillingaddress.md: id: c13f75f36035 - last_write_checksum: sha1:599fc28271a611ba3f6e89ab0dc41948c83d23ff - pristine_git_object: a4697f4a7dea505b397e91977df97d91efd43f83 + last_write_checksum: sha1:d66d6281fbd553e3f5c46b010f3079cb6507d6c1 + pristine_git_object: 3fb19afa11f595bd094f00adbedeb21b34820198 docs/models/pazeclient.md: id: 9a60f9840875 last_write_checksum: sha1:1e69a6c38591c8328e6eff0c36e325d0ce9f5b56 @@ -1770,6 +1778,18 @@ trackedFiles: id: 40d45878e1dd last_write_checksum: sha1:606e74453c7cc702afa721eb59b5d45af0b1f1ca pristine_git_object: 3d02aaf6f766765529861e89e58b1a601ac5ae65 + docs/models/pazeecomdata.md: + id: 4c2daf976ddd + last_write_checksum: sha1:e0891d7922d22f7ac6cb328aabb88f909887e32d + pristine_git_object: 24d73db1411a6b9a5754b0d2f1db066d153b08cb + docs/models/pazeenhancedtransactiondata.md: + id: 27c9fa5f3964 + last_write_checksum: sha1:e2e153de5be16597c8c9b2197c284124a64d0307 + pristine_git_object: 41a86f6d9b8aab37dd6ae9bd6d0ce840d436cfac + docs/models/pazelocationaddress.md: + id: fb6ed26124cd + last_write_checksum: sha1:4fb1d0ea1fc784e506df1e35e219c8840b57a2a6 + pristine_git_object: 99b71a5c51238bfc09d7fef271f151b7e1d2bffd docs/models/pazemaskedcard.md: id: 876d33fcc623 last_write_checksum: sha1:beeba5c404a6f7ecd090bd5a4acce963fe0665c8 @@ -1788,12 +1808,32 @@ trackedFiles: pristine_git_object: 5cec362eb497b228d403bdb5474a5691094b752b docs/models/pazemobilesessioncreaterequest.md: id: f94d8e88402d - last_write_checksum: sha1:8d67bd20f1760d1ad9fc43b7c3662896fffcf89a - pristine_git_object: aba747217e788fb5d4bf9f8a5752a9e2b96268d2 + last_write_checksum: sha1:1c843bbfe3b56958807e3c347ff37ffe378f1a11 + pristine_git_object: 2dc7112c1c1ed14279c864d2b7deb40ed13b9e9d + docs/models/pazemobilesessioncreaterequestbillingpreference.md: + id: 2de9f8656ea3 + last_write_checksum: sha1:2e595efe7a301e93dbcc0e9dfcd43f198f44f494 + pristine_git_object: 3d6ff97e365906cbf15986451ea6e06ccf033aef + docs/models/pazemobilesessioncreaterequesttransactiontype.md: + id: e7a113f16931 + last_write_checksum: sha1:df41c157a8aca36ef53f693227c29451af9ab475 + pristine_git_object: 5c65d0a3dba7c38359d0f0a9b820da39981c7f76 docs/models/pazepaymentmethodcreate.md: id: e91f142e2031 last_write_checksum: sha1:de57e22303809c696eab46e60811e58f7898a5dd pristine_git_object: 3c62fecff35af492e2d95123bf9084948ac40a92 + docs/models/pazesessioncomplete.md: + id: 4ac9195ccbf7 + last_write_checksum: sha1:651ce8bf862868a346a4ade26e1355310dcd6d2d + pristine_git_object: 0e590d6740cff57c3729cf22c6b60142d4496f19 + docs/models/pazesessioncompleterequest.md: + id: 29ab30c44d81 + last_write_checksum: sha1:bdd5173a46d4aa0cf44c054eb13a47bb33f4beb5 + pristine_git_object: e1c3942f9ed69c7b1f289cb87b535ad71787d83c + docs/models/pazesessioncompleterequesttransactiontype.md: + id: 29198c095ac5 + last_write_checksum: sha1:bab251d5fa2aa171438dbfde78047b691ab7713f + pristine_git_object: 527db08de8f864d78758838385635afe05957b6f docs/models/pazesessionrequest.md: id: 12915bfe80e4 last_write_checksum: sha1:8697118987dd08a4b04eb1b649d2dd64415299d9 @@ -1812,12 +1852,24 @@ trackedFiles: pristine_git_object: 420cda3ae4695372936f77fb28a6d970a4dc7e0d docs/models/pazeshippingaddress.md: id: b282d58d9cd9 - last_write_checksum: sha1:005fbdea0a785c4ca724d2916756bfb4a7ba5085 - pristine_git_object: dd2121da3ef0fae3521be57cea098875c50430ff + last_write_checksum: sha1:7451c4abd570567be2915e39e4b77b5cd69040e1 + pristine_git_object: 06ca61f12a314505c519eb33445b104da77ecf70 + docs/models/pazetransactionoptions.md: + id: 93a9903abc04 + last_write_checksum: sha1:55c22c3f6bf26d3ae9549a83a5eb229ba275d30b + pristine_git_object: 735034fed7bfcdc881e234f2d373848a0f2441fd + docs/models/pazetransactionoptionsbillingpreference.md: + id: 222126eef0a3 + last_write_checksum: sha1:1d49454d5f942fd4432c53b324f8ab290c2e256d + pristine_git_object: cdbf602d9ed63699da50b9c434bd2890c257541a docs/models/pazetransactionvalue.md: id: 12d74d2e7356 last_write_checksum: sha1:8bf6cb35b3c281855405369eaa6e2b3c1cffd8e6 pristine_git_object: 42ea5eaa67dbd27b7a5405f21f1d5cbe20c79f00 + docs/models/pazetraveldata.md: + id: bdd6e982d3bb + last_write_checksum: sha1:ad06de4849a1f838fc33c145f5689a5b643e41ef + pristine_git_object: 9a4b72523c3ea88621f522afa56fae821681380e docs/models/pazewebsession.md: id: e929e29bee74 last_write_checksum: sha1:8f0b4045e83532e0147e548c8fabe106324ced7f @@ -1830,6 +1882,10 @@ trackedFiles: id: 1a0f16fb3d6e last_write_checksum: sha1:6d7a446478a1dd9e744d6709bcaaa5745986b7ea pristine_git_object: 3b11abae2651d0afc6b39f5ffb9daa73c91e134a + docs/models/processingnetwork.md: + id: a98013215fef + last_write_checksum: sha1:7ca5df2075b05d783275e179903d7b0da7865050 + pristine_git_object: fda245c9f50f4300adef697914ba3edbf69376a3 docs/models/producttype.md: id: 2c019befb41d last_write_checksum: sha1:9dcf4de7e7d2106a4796f6cf24450e179e858208 @@ -2270,10 +2326,6 @@ trackedFiles: id: 3440c6822ffe last_write_checksum: sha1:aee89cd9a9ed83b580c09150e14767db6cff3880 pristine_git_object: 4ab902804abbfe4d99ecd330b3334b6a26368e38 - docs/models/transactiontype.md: - id: 1efa7d59dbe4 - last_write_checksum: sha1:3eefab304119806a4fa0fad561192127ecc106bf - pristine_git_object: c23cd7b947d3657c38e7f0136182118e48fd8ff3 docs/models/transactionupdate.md: id: 845d149ccaed last_write_checksum: sha1:5010cf29ad26fd3a8929e4eb4a1253c056966006 @@ -2564,8 +2616,8 @@ trackedFiles: pristine_git_object: 0651fa727dee9a6ccde51039f59cb8db3347d5cd docs/sdks/sessions/README.md: id: 57ad62844f79 - last_write_checksum: sha1:74f1afd85dc207179130a123970e9358b824582d - pristine_git_object: df9e7ab28643fe9a59ce99b822a67770bdf4c937 + last_write_checksum: sha1:065cc3cbecf4b33ae242ffc26fcd8f4f611e5797 + pristine_git_object: 8d1969f4287637e6737f7a558d25d8561ba00a1a docs/sdks/threedsconfiguration/README.md: id: 86aa349ed0d5 last_write_checksum: sha1:eb880815995889d811a03a52adf476fc92625ed3 @@ -2600,8 +2652,8 @@ trackedFiles: pristine_git_object: cb9c15d314c1930557401074329ed7a737147919 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:928f2711a920687d1da13e0609360028c5e685b6 - pristine_git_object: 170d3e73d396e9034d99c06430a5c46bcce631d8 + last_write_checksum: sha1:285a4178373d7e76048f0b0ba411c27a4ba3c5f6 + pristine_git_object: 2c4b95c5ef84d6855e5b85754a71b7e0b0cd5bc5 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:63a92abbd1de3323613f0d4c1ae4412076577710 @@ -2628,8 +2680,8 @@ trackedFiles: pristine_git_object: 83a0d00f9b5b1a6d837643a32bfd0f82cd4f98ce src/gr4vy/_version.py: id: 1b5ad1da47aa - last_write_checksum: sha1:4b2456add684447e2d168852f4e951ea32e18130 - pristine_git_object: 4e5baf748b51407d39dac9c3b69e0588f6e6eb91 + last_write_checksum: sha1:718bd39942b11b5aa707ae0eeae31c2a90ba5839 + pristine_git_object: 4c8c3c95ed1b74473b0defa7c54370d72ef04c79 src/gr4vy/account_updater.py: id: 6dc8f39e2fb9 last_write_checksum: sha1:fabc79a59dd06fb927ce2d834fbafbcad5836a4b @@ -2780,8 +2832,8 @@ trackedFiles: pristine_git_object: 144c6e3df212d6877a0986b726460ff2dead777d src/gr4vy/models/__init__.py: id: 427cc7fddfe2 - last_write_checksum: sha1:a3c13fbec96c679ba1617a1ad30bd84542c8ea90 - pristine_git_object: 2e0c99d2960c00f6b43dc126a1815e7afa06c4b1 + last_write_checksum: sha1:8f17c5104c0001a2b85b71799de5e67ccf28123c + pristine_git_object: 6d35d101afc9c73da8cb3c373fea4b0e38f47ccc src/gr4vy/models/accountsreceivablesreportspec.py: id: cc6a9368f988 last_write_checksum: sha1:1ce9432ce7ae682a7fff1e0fe1ddc7f82dc937e7 @@ -3062,6 +3114,10 @@ trackedFiles: id: ada8fe08bbd0 last_write_checksum: sha1:49a6cced955db7c80c9feaa3bf94786b7d5e6ed6 pristine_git_object: 2772e0589d8cfd763ad30098680d213f0db6b211 + src/gr4vy/models/complete_paze_mobile_sessionop.py: + id: 77d97525df33 + last_write_checksum: sha1:085fb62fd353fdbe536ebaa614def421bc316fb2 + pristine_git_object: 16b9584e718382729bee44ee4e8c263763759e62 src/gr4vy/models/configure_digital_walletop.py: id: d71cc153c5f2 last_write_checksum: sha1:edc68b455074802114f61fbfaf6dd6010d448182 @@ -3956,8 +4012,8 @@ trackedFiles: pristine_git_object: 9bf9e6bdd2cd7141686d377c08f84393292a23c2 src/gr4vy/models/pazebillingaddress.py: id: 2f5e9128ce24 - last_write_checksum: sha1:5e5eec7d556691cb9f308453416247cdc4431ac9 - pristine_git_object: 4a753dd73ef418c0535ee8b3bf2674e949fec1af + last_write_checksum: sha1:2c63d11020a368effdeb73f56a4cf77683201b71 + pristine_git_object: f5d20dbcf239f52042c88cf17c3cdae3c846952c src/gr4vy/models/pazeclient.py: id: d5e0ad4058d6 last_write_checksum: sha1:eb1ba000744118640a90617e75b0179808d2646d @@ -3978,6 +4034,18 @@ trackedFiles: id: 1efe6d56d2cd last_write_checksum: sha1:64fd586424424ac804d59916110c4945e397c3dd pristine_git_object: 1c91d9ee80c91a93d2f8ab6087c743f9609b1128 + src/gr4vy/models/pazeecomdata.py: + id: 2a302eb7cb10 + last_write_checksum: sha1:ab4a3b2dfa2e4d1b10c794c88b6d0a645bd90b82 + pristine_git_object: 27914233f3169ba1b540551a4065582225634bfb + src/gr4vy/models/pazeenhancedtransactiondata.py: + id: d3c792fc084d + last_write_checksum: sha1:81d1732565c71f5a7f462ad3308eada19478fec4 + pristine_git_object: 4e627bf8c14ec25ef57aa462b9d6ca73e8ffb34d + src/gr4vy/models/pazelocationaddress.py: + id: 6cf13ca2fe6a + last_write_checksum: sha1:e3dc87d1ad887b7f22e309ea039e4136ef4466f3 + pristine_git_object: 6d01baf8d2376e678ab9b5584a20a922dc9b7603 src/gr4vy/models/pazemaskedcard.py: id: 1cc7a7d45759 last_write_checksum: sha1:ac3c4d16c67b39d3cd85849268443e5818de0b7c @@ -3996,12 +4064,20 @@ trackedFiles: pristine_git_object: 9865b4255a29709f7a171638cbc78f89149e998e src/gr4vy/models/pazemobilesessioncreaterequest.py: id: 66d99b9b04a7 - last_write_checksum: sha1:c4286cebeb6f37743eda5415b4e6b55435f450e1 - pristine_git_object: 5d5efa75e75ff306378960570df2b3153f115817 + last_write_checksum: sha1:a70000ae2f03eec2058a003b8acb15311fcaf4f9 + pristine_git_object: 658419c8118aea628ee55be3e26c57ef64db6d08 src/gr4vy/models/pazepaymentmethodcreate.py: id: 3a2aaa58f905 last_write_checksum: sha1:ec864989f809f5af2d133450d618ad4b4c4897e4 pristine_git_object: 9c808640b3ea3385a6390c9736be120d9b39baa7 + src/gr4vy/models/pazesessioncomplete.py: + id: 283234ab19b4 + last_write_checksum: sha1:65c3f10916bb960c5cb698c12fadfdec429e3fcc + pristine_git_object: ba04522b42a9fb04912161f7d77ac85c4cd5fa79 + src/gr4vy/models/pazesessioncompleterequest.py: + id: c1555db81595 + last_write_checksum: sha1:3fabe0c7e1d70cd4c72374a962b1e59754d8224e + pristine_git_object: d1ae4e1cd68d6ba43d26869e76c3e6590c6e4d29 src/gr4vy/models/pazesessionrequest.py: id: a6e3fec5e32a last_write_checksum: sha1:a7f8a6a0f7a7e49ed6407722760c889814827307 @@ -4020,12 +4096,20 @@ trackedFiles: pristine_git_object: a78e659dd6adce45cc508156cbcee8d586c34ddc src/gr4vy/models/pazeshippingaddress.py: id: 5fddba12cfb5 - last_write_checksum: sha1:23830d22bbc8b819b19e669c3bf3f18e3634d8d6 - pristine_git_object: fa4d66b18fcee31755783d44fa09d53d361dbe4d + last_write_checksum: sha1:d13ec65596510cce3b3e886968a1e3e7eff32739 + pristine_git_object: 926218da6b081fc8fe2d02052ef3f80ca7526bd6 + src/gr4vy/models/pazetransactionoptions.py: + id: da7b10a10a00 + last_write_checksum: sha1:84ce763339f19656ea496e2ad84903e9d6bb94cb + pristine_git_object: a7813715216b7f250ed5161298a428fe9efc505d src/gr4vy/models/pazetransactionvalue.py: id: cb757291b699 last_write_checksum: sha1:d52e231b38f7ca9e92d4f337a4fe467215585b52 pristine_git_object: 18257cd5045070f749b00865aa76a193bb7a9774 + src/gr4vy/models/pazetraveldata.py: + id: 66f18a34df49 + last_write_checksum: sha1:b3bc5b91b25c49a125be7a2d442b7e9f63b090f3 + pristine_git_object: 0d635ff76e9c3baa6e9b200aa2f3fa4214183c52 src/gr4vy/models/pazewebsession.py: id: 69ba1b8bdc62 last_write_checksum: sha1:fe325d81e48ad348fd2d8c43a4955fd7ad51d0f1 @@ -4556,8 +4640,8 @@ trackedFiles: pristine_git_object: 19632df8f8460b48a6422f28640a7256352c6766 src/gr4vy/sessions.py: id: c10d3c9c5eec - last_write_checksum: sha1:506568d8ef0654ff49c67320bc983fc36657c7ed - pristine_git_object: 7eaeca26e3b1c52c3d2a02e3fa62dc7506a8f040 + last_write_checksum: sha1:339577c41c26ed459cab0dc2df206bc2066ed81d + pristine_git_object: 109f97ff9d4fe10c8a9bd41d3a7de05cd7179b60 src/gr4vy/three_ds_configuration.py: id: 408758b2e6fd last_write_checksum: sha1:40e532dee2618c1573fb7219bdc42bc6381a20a8 @@ -8465,7 +8549,7 @@ examples: application/json: {"sessionId": "7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2", "code": "eyJhdWQiOm51bGwsImtpZCI6IjE3...", "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."} responses: "200": - application/json: {"consumer": {"firstName": "Team", "lastName": "Integrations", "fullName": "Team Integrations", "countryCode": "US", "languageCode": "EN", "emailAddress": "integrations@gr4vy.com", "mobileNumber": {"countryCode": "1", "phoneNumber": "3213213211"}}, "shippingAddress": null, "maskedCard": {"panLastFour": "2121", "paymentAccountReference": "V0010013023108318841413393850", "panExpirationMonth": "05", "panExpirationYear": "2032", "paymentCardDescriptor": "Visa Hero Card", "paymentCardType": "CREDIT", "paymentCardBrand": "VISA", "paymentCardNetwork": "VISA", "digitalCardData": {"artUri": "https://sandbox.assets.vims.visa.com/vims/cardart/8f64614def1a41d39ea8acae4616bf6f_imageC", "artHeight": 50, "artWidth": 80}, "billingAddress": {"name": "", "line1": "", "line2": "", "line3": "", "city": "Kutchmouth", "state": "Iowa", "zip": "23324-5917", "countryCode": "MU"}}, "links": {"CHANGE_CARD": "https://checkout.wallet.uat.earlywarning.io/...", "CHANGE_SHIPPING_ADDRESS": "https://checkout.wallet.uat.earlywarning.io/..."}, "code": "eyJhdWQiOm51bGwsImtpZCI6IjE3..."} + application/json: {"consumer": {"firstName": "Team", "lastName": "Integrations", "fullName": "Team Integrations", "countryCode": "US", "languageCode": "EN", "emailAddress": "integrations@gr4vy.com", "mobileNumber": {"countryCode": "1", "phoneNumber": "3213213211"}}, "shippingAddress": null, "maskedCard": {"panLastFour": "2121", "paymentAccountReference": "V0010013023108318841413393850", "panExpirationMonth": "05", "panExpirationYear": "2032", "paymentCardDescriptor": "Visa Hero Card", "paymentCardType": "CREDIT", "paymentCardBrand": "VISA", "paymentCardNetwork": "VISA", "digitalCardData": {"artUri": "https://sandbox.assets.vims.visa.com/vims/cardart/8f64614def1a41d39ea8acae4616bf6f_imageC", "artHeight": 50, "artWidth": 80}, "billingAddress": {"line1": "", "city": "Kutchmouth", "state": "Iowa", "zip": "23324-5917"}}, "links": {"CHANGE_CARD": "https://checkout.wallet.uat.earlywarning.io/...", "CHANGE_SHIPPING_ADDRESS": "https://checkout.wallet.uat.earlywarning.io/..."}, "code": "eyJhdWQiOm51bGwsImtpZCI6IjE3..."} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -8521,11 +8605,43 @@ examples: application/json: {"type": "error", "code": "bad_gateway", "status": 502, "message": "Request could not be processed"} "504": application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"} + complete_paze_mobile_session: + speakeasy-default-complete-paze-mobile-session: + requestBody: + application/json: {"sessionId": "7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2", "code": "eyJhdWQiOm51bGwsImtpZCI6IjE3...", "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", "transactionType": "PURCHASE"} + responses: + "200": + application/json: {"payloadId": "5C90F1500800f8dc1ce2-2b49-9d82-823e-111195cd4301", "completeResponse": "eyJhdWQiOm51bGwsImtpZCI6IjE3...", "securePayload": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", "clientContext": "7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2", "ewSID": "c4b5e9fa-9d35-4cf2-bfc2-2cb1b9f1f6ab", "timestampISO8601": "2026-05-25T12:18:09Z"} + "400": + application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} + "401": + application/json: {"type": "error", "code": "unauthorized", "status": 401, "message": "No valid API authentication found"} + "403": + application/json: {"type": "error", "code": "forbidden", "status": 403, "message": "Request failed validation"} + "404": + application/json: {"type": "error", "code": "not_found", "status": 404, "message": "The resource could not be found"} + "405": + application/json: {"type": "error", "code": "method_not_allowed", "status": 405, "message": "Method Not Allowed"} + "409": + application/json: {"type": "error", "code": "duplicate_record", "status": 409, "message": "Request failed validation"} + "422": + application/json: {} + "425": + application/json: {"type": "error", "code": "too_early", "status": 425, "message": "Request failed validation"} + "429": + application/json: {"type": "error", "code": "too_many_requests", "status": 429, "message": "Request failed validation"} + "500": + application/json: {"type": "error", "code": "server_error", "status": 500, "message": "Request could not be processed"} + "502": + application/json: {"type": "error", "code": "bad_gateway", "status": 502, "message": "Request could not be processed"} + "504": + application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"} examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Python SDK Changes: - * `gr4vy.transactions.capture()`: `request.cart_items` **Added** + * `gr4vy.digital_wallets.sessions.paze_mobile_session_complete()`: **Added** + * `gr4vy.digital_wallets.sessions.paze_mobile_session_review()`: `response` **Changed** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8425f295..42d7e0d0 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.44 + version: 2.0.45 additionalDependencies: dev: freezegun: ^1.5.1 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e15bbdea..d2f16d38 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.767.0 +speakeasyVersion: 1.768.0 sources: openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:e35b6d52d30df5f6dd94845c8b081f628ebf8dd826ebd090720c8e820aef89c5 - sourceBlobDigest: sha256:9918085964b5cff8b60ccf0dece90c8eda1eb85831e32b6dbc1800d7da8b29ff + sourceRevisionDigest: sha256:446d9d28f66bf600a1100c14e63817eb4bd8159b6458fec8bae8084392dbd178 + sourceBlobDigest: sha256:c32c0c235aaf79bf7ed3a134097f90b30cb502227250f9e5b39e175b0b60c75c tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: python: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:e35b6d52d30df5f6dd94845c8b081f628ebf8dd826ebd090720c8e820aef89c5 - sourceBlobDigest: sha256:9918085964b5cff8b60ccf0dece90c8eda1eb85831e32b6dbc1800d7da8b29ff + sourceRevisionDigest: sha256:446d9d28f66bf600a1100c14e63817eb4bd8159b6458fec8bae8084392dbd178 + sourceBlobDigest: sha256:c32c0c235aaf79bf7ed3a134097f90b30cb502227250f9e5b39e175b0b60c75c codeSamplesNamespace: openapi-python-code-samples - codeSamplesRevisionDigest: sha256:cb3f86904a92d22a9fd0eef553208cc2dd0fac028c0722a71b85838748905b78 + codeSamplesRevisionDigest: sha256:5f7773be3415797e24e1ec6b3aa6e4517f58d988d1dac6e17d04d683bf658f03 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 3570ccae..b8a194e2 100644 --- a/README.md +++ b/README.md @@ -361,6 +361,7 @@ except ValueError as error: * [paze_mobile_session_create](docs/sdks/sessions/README.md#paze_mobile_session_create) - Create a Paze mobile session * [paze](docs/sdks/sessions/README.md#paze) - Create a Paze session * [paze_mobile_session_review](docs/sdks/sessions/README.md#paze_mobile_session_review) - Review a Paze session +* [paze_mobile_session_complete](docs/sdks/sessions/README.md#paze_mobile_session_complete) - Complete a Paze session * [click_to_pay](docs/sdks/sessions/README.md#click_to_pay) - Create a Click to Pay session ### [GiftCards](docs/sdks/giftcardssdk/README.md) diff --git a/RELEASES.md b/RELEASES.md index 9d1a3897..2368c8ec 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1878,4 +1878,14 @@ Based on: ### Generated - [python v2.0.44] . ### Releases -- [PyPI v2.0.44] https://pypi.org/project/gr4vy/2.0.44 - . \ No newline at end of file +- [PyPI v2.0.44] https://pypi.org/project/gr4vy/2.0.44 - . + +## 2026-05-27 15:34:08 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.768.0 (2.889.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.45] . +### Releases +- [PyPI v2.0.45] https://pypi.org/project/gr4vy/2.0.45 - . \ No newline at end of file diff --git a/docs/models/completepazemobilesessionglobals.md b/docs/models/completepazemobilesessionglobals.md new file mode 100644 index 00000000..15bedbf7 --- /dev/null +++ b/docs/models/completepazemobilesessionglobals.md @@ -0,0 +1,8 @@ +# CompletePazeMobileSessionGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `merchant_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | default | \ No newline at end of file diff --git a/docs/models/completepazemobilesessionrequest.md b/docs/models/completepazemobilesessionrequest.md new file mode 100644 index 00000000..384d5b1a --- /dev/null +++ b/docs/models/completepazemobilesessionrequest.md @@ -0,0 +1,9 @@ +# CompletePazeMobileSessionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `merchant_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | default | +| `paze_session_complete_request` | [models.PazeSessionCompleteRequest](../models/pazesessioncompleterequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/billingpreference.md b/docs/models/payloadtypeindicator.md similarity index 57% rename from docs/models/billingpreference.md rename to docs/models/payloadtypeindicator.md index 2e9ad7ff..b55cb383 100644 --- a/docs/models/billingpreference.md +++ b/docs/models/payloadtypeindicator.md @@ -1,12 +1,12 @@ -# BillingPreference +# PayloadTypeIndicator ## Example Usage ```python -from gr4vy.models import BillingPreference +from gr4vy.models import PayloadTypeIndicator # Open enum: unrecognized values are captured as UnrecognizedStr -value: BillingPreference = "ALL" +value: PayloadTypeIndicator = "ID" ``` @@ -14,6 +14,5 @@ value: BillingPreference = "ALL" This is an open enum. Unrecognized values will not fail type checks. -- `"ALL"` -- `"ZIP_COUNTRY"` -- `"NONE"` +- `"ID"` +- `"PAYMENT"` diff --git a/docs/models/pazebillingaddress.md b/docs/models/pazebillingaddress.md index a4697f4a..3fb19afa 100644 --- a/docs/models/pazebillingaddress.md +++ b/docs/models/pazebillingaddress.md @@ -5,11 +5,11 @@ | Field | Type | Required | Description | | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `name` | *Nullable[str]* | :heavy_check_mark: | Name of the organization or entity at the address. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the organization or entity at the address. | | `line1` | *str* | :heavy_check_mark: | Line 1 of the address. | -| `line2` | *Nullable[str]* | :heavy_check_mark: | Line 2 of the address. | -| `line3` | *Nullable[str]* | :heavy_check_mark: | Line 3 of the address. | +| `line2` | *OptionalNullable[str]* | :heavy_minus_sign: | Line 2 of the address. | +| `line3` | *OptionalNullable[str]* | :heavy_minus_sign: | Line 3 of the address. | | `city` | *str* | :heavy_check_mark: | City. | | `state` | *str* | :heavy_check_mark: | State or region. | | `zip` | *str* | :heavy_check_mark: | Postal code. | -| `country_code` | *Nullable[str]* | :heavy_check_mark: | ISO 3166-1 alpha-2 country code. | \ No newline at end of file +| `country_code` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 3166-1 alpha-2 country code. | \ No newline at end of file diff --git a/docs/models/pazeecomdata.md b/docs/models/pazeecomdata.md new file mode 100644 index 00000000..24d73db1 --- /dev/null +++ b/docs/models/pazeecomdata.md @@ -0,0 +1,12 @@ +# PazeEcomData + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `cart_contains_gift_card` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the current transaction includes a gift card purchase. | false | +| `order_for_pickup` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the consumer order will be picked up rather than shipped. | false | +| `order_highest_cost` | *OptionalNullable[str]* | :heavy_minus_sign: | Dollar value of the most expensive item ordered. | 99.99 | +| `order_quantity` | *OptionalNullable[str]* | :heavy_minus_sign: | Number of items ordered. | 3 | +| `final_shipping_address` | [OptionalNullable[models.PazeShippingAddress]](../models/pazeshippingaddress.md) | :heavy_minus_sign: | The selected shipping address. Returned only when `shippingPreference` is not `NONE`. | | \ No newline at end of file diff --git a/docs/models/pazeenhancedtransactiondata.md b/docs/models/pazeenhancedtransactiondata.md new file mode 100644 index 00000000..41a86f6d --- /dev/null +++ b/docs/models/pazeenhancedtransactiondata.md @@ -0,0 +1,9 @@ +# PazeEnhancedTransactionData + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ecom_data` | [OptionalNullable[models.PazeEcomData]](../models/pazeecomdata.md) | :heavy_minus_sign: | Details pertaining to electronic commerce purchases. | +| `travel_data` | [OptionalNullable[models.PazeTravelData]](../models/pazetraveldata.md) | :heavy_minus_sign: | Details pertaining to travel bookings. | \ No newline at end of file diff --git a/docs/models/pazelocationaddress.md b/docs/models/pazelocationaddress.md new file mode 100644 index 00000000..99b71a5c --- /dev/null +++ b/docs/models/pazelocationaddress.md @@ -0,0 +1,15 @@ +# PazeLocationAddress + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the organization or entity at the address. | +| `line1` | *str* | :heavy_check_mark: | Line 1 of the address. | +| `line2` | *OptionalNullable[str]* | :heavy_minus_sign: | Line 2 of the address. | +| `line3` | *OptionalNullable[str]* | :heavy_minus_sign: | Line 3 of the address. | +| `city` | *str* | :heavy_check_mark: | City. | +| `state` | *str* | :heavy_check_mark: | State or region. | +| `zip` | *str* | :heavy_check_mark: | Postal code. | +| `country_code` | *str* | :heavy_check_mark: | ISO 3166-1 alpha-2 country code. | \ No newline at end of file diff --git a/docs/models/pazemobilesessioncreaterequest.md b/docs/models/pazemobilesessioncreaterequest.md index aba74721..2dc7112c 100644 --- a/docs/models/pazemobilesessioncreaterequest.md +++ b/docs/models/pazemobilesessioncreaterequest.md @@ -3,20 +3,20 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `client` | [models.PazeClient](../models/pazeclient.md) | :heavy_check_mark: | N/A | | -| `session_id` | *str* | :heavy_check_mark: | Session reference identifier generated by the merchant. Must be reused across all Paze APIs in a checkout session. | 24e4dbb9-4f5e-43e8-8375-e9fd45650bc9 | -| `access_token` | *str* | :heavy_check_mark: | Access token obtained from the Paze session endpoint with source=mobile. | | -| `callback_url_scheme` | *str* | :heavy_check_mark: | Merchant app's ID (iOS bundle identifier or Android application ID) used as the callback URL scheme. | Gr4vyCallback | -| `intent` | [models.Intent](../models/intent.md) | :heavy_check_mark: | Primary intent of the checkout session. | EXPRESS_CHECKOUT | -| `transaction_value` | [OptionalNullable[models.PazeTransactionValue]](../models/pazetransactionvalue.md) | :heavy_minus_sign: | Currency and amount of the transaction. Required when intent is EXPRESS_CHECKOUT. | | -| `transaction_type` | [OptionalNullable[models.TransactionType]](../models/transactiontype.md) | :heavy_minus_sign: | Type of transaction. | | -| `shipping_preference` | [OptionalNullable[models.ShippingPreference]](../models/shippingpreference.md) | :heavy_minus_sign: | Whether to collect a shipping address from the consumer. | | -| `billing_preference` | [OptionalNullable[models.BillingPreference]](../models/billingpreference.md) | :heavy_minus_sign: | Verbosity of billing address required. | | -| `email_address` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer email address for checkout flow optimization. | | -| `phone_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer phone number for checkout flow optimization. | 7735550100 | -| `cobrand` | List[[models.PazeCobrandItem](../models/pazecobranditem.md)] | :heavy_minus_sign: | Details for cobranded cards offered by the merchant. | | -| `accepted_shipping_countries` | List[*str*] | :heavy_minus_sign: | ISO 3166-1 alpha-2 country codes restricting eligible shipping addresses. Empty list or absence means all countries accepted. | | -| `accepted_payment_card_networks` | List[[models.AcceptedPaymentCardNetwork](../models/acceptedpaymentcardnetwork.md)] | :heavy_minus_sign: | Accepted payment card networks. Empty list or absence means all networks accepted. | | -| `always_enable_checkout` | *Optional[bool]* | :heavy_minus_sign: | Set to true to enable Paze checkout even if the provided email address or phone number does not match a Paze wallet. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `client` | [models.PazeClient](../models/pazeclient.md) | :heavy_check_mark: | N/A | | +| `session_id` | *str* | :heavy_check_mark: | Session reference identifier generated by the merchant. Must be reused across all Paze APIs in a checkout session. | 24e4dbb9-4f5e-43e8-8375-e9fd45650bc9 | +| `access_token` | *str* | :heavy_check_mark: | Access token obtained from the Paze session endpoint with source=mobile. | | +| `callback_url_scheme` | *str* | :heavy_check_mark: | Merchant app's ID (iOS bundle identifier or Android application ID) used as the callback URL scheme. | Gr4vyCallback | +| `intent` | [models.Intent](../models/intent.md) | :heavy_check_mark: | Primary intent of the checkout session. | EXPRESS_CHECKOUT | +| `transaction_value` | [OptionalNullable[models.PazeTransactionValue]](../models/pazetransactionvalue.md) | :heavy_minus_sign: | Currency and amount of the transaction. Required when intent is EXPRESS_CHECKOUT. | | +| `transaction_type` | [OptionalNullable[models.PazeMobileSessionCreateRequestTransactionType]](../models/pazemobilesessioncreaterequesttransactiontype.md) | :heavy_minus_sign: | Type of transaction. | | +| `shipping_preference` | [OptionalNullable[models.ShippingPreference]](../models/shippingpreference.md) | :heavy_minus_sign: | Whether to collect a shipping address from the consumer. | | +| `billing_preference` | [OptionalNullable[models.PazeMobileSessionCreateRequestBillingPreference]](../models/pazemobilesessioncreaterequestbillingpreference.md) | :heavy_minus_sign: | Verbosity of billing address required. | | +| `email_address` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer email address for checkout flow optimization. | | +| `phone_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer phone number for checkout flow optimization. | 7735550100 | +| `cobrand` | List[[models.PazeCobrandItem](../models/pazecobranditem.md)] | :heavy_minus_sign: | Details for cobranded cards offered by the merchant. | | +| `accepted_shipping_countries` | List[*str*] | :heavy_minus_sign: | ISO 3166-1 alpha-2 country codes restricting eligible shipping addresses. Empty list or absence means all countries accepted. | | +| `accepted_payment_card_networks` | List[[models.AcceptedPaymentCardNetwork](../models/acceptedpaymentcardnetwork.md)] | :heavy_minus_sign: | Accepted payment card networks. Empty list or absence means all networks accepted. | | +| `always_enable_checkout` | *Optional[bool]* | :heavy_minus_sign: | Set to true to enable Paze checkout even if the provided email address or phone number does not match a Paze wallet. | | \ No newline at end of file diff --git a/docs/models/pazemobilesessioncreaterequestbillingpreference.md b/docs/models/pazemobilesessioncreaterequestbillingpreference.md new file mode 100644 index 00000000..3d6ff97e --- /dev/null +++ b/docs/models/pazemobilesessioncreaterequestbillingpreference.md @@ -0,0 +1,19 @@ +# PazeMobileSessionCreateRequestBillingPreference + +## Example Usage + +```python +from gr4vy.models import PazeMobileSessionCreateRequestBillingPreference + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: PazeMobileSessionCreateRequestBillingPreference = "ALL" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"ALL"` +- `"ZIP_COUNTRY"` +- `"NONE"` diff --git a/docs/models/pazemobilesessioncreaterequesttransactiontype.md b/docs/models/pazemobilesessioncreaterequesttransactiontype.md new file mode 100644 index 00000000..5c65d0a3 --- /dev/null +++ b/docs/models/pazemobilesessioncreaterequesttransactiontype.md @@ -0,0 +1,19 @@ +# PazeMobileSessionCreateRequestTransactionType + +## Example Usage + +```python +from gr4vy.models import PazeMobileSessionCreateRequestTransactionType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: PazeMobileSessionCreateRequestTransactionType = "PURCHASE" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"PURCHASE"` +- `"CARD_ON_FILE"` +- `"BOTH"` diff --git a/docs/models/pazesessioncomplete.md b/docs/models/pazesessioncomplete.md new file mode 100644 index 00000000..0e590d67 --- /dev/null +++ b/docs/models/pazesessioncomplete.md @@ -0,0 +1,13 @@ +# PazeSessionComplete + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `payload_id` | *str* | :heavy_check_mark: | Unique identifier generated by Paze to track and link the wallet transaction. Used as the wallet transaction identifier. | 5C90F1500800f8dc1ce2-2b49-9d82-823e-111195cd4301 | +| `complete_response` | *Nullable[str]* | :heavy_check_mark: | Opaque token returned by Paze for the completion call. | eyJhdWQiOm51bGwsImtpZCI6IjE3... | +| `secure_payload` | *Nullable[str]* | :heavy_check_mark: | Signed and encrypted payload containing the data necessary to process the payment. Returned when `payloadTypeIndicator` is PAYMENT. | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... | +| `client_context` | *str* | :heavy_check_mark: | Echo of the `clientContext` sent on the request. Returned by Paze for client-side tracing. | 7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2 | +| `ew_sid` | *str* | :heavy_check_mark: | Paze-issued session identifier returned for tracing. | c4b5e9fa-9d35-4cf2-bfc2-2cb1b9f1f6ab | +| `timestamp_iso8601` | *str* | :heavy_check_mark: | Server timestamp of the Paze response in ISO 8601 format. Returned for tracing. | 2026-05-25T12:18:09Z | \ No newline at end of file diff --git a/docs/models/pazesessioncompleterequest.md b/docs/models/pazesessioncompleterequest.md new file mode 100644 index 00000000..e1c3942f --- /dev/null +++ b/docs/models/pazesessioncompleterequest.md @@ -0,0 +1,15 @@ +# PazeSessionCompleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `session_id` | *str* | :heavy_check_mark: | Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call. | 7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2 | +| `code` | *str* | :heavy_check_mark: | Opaque token issued by the Paze service in the response from the most recent Paze UX interaction. | eyJhdWQiOm51bGwsImtpZCI6IjE3... | +| `access_token` | *str* | :heavy_check_mark: | The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze. | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... | +| `transaction_type` | [models.PazeSessionCompleteRequestTransactiontype](../models/pazesessioncompleterequesttransactiontype.md) | :heavy_check_mark: | The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH. | PURCHASE | +| `transaction_options` | [OptionalNullable[models.PazeTransactionOptions]](../models/pazetransactionoptions.md) | :heavy_minus_sign: | Client configuration data overriding values configured during merchant onboarding. | | +| `transaction_value` | [OptionalNullable[models.PazeTransactionValue]](../models/pazetransactionvalue.md) | :heavy_minus_sign: | Required when `transactionType` is PURCHASE or BOTH. Must be omitted when `transactionType` is CARD_ON_FILE. | | +| `processing_network` | [OptionalNullable[models.ProcessingNetwork]](../models/processingnetwork.md) | :heavy_minus_sign: | Card network to process the transaction on. If not provided, Paze defaults to the network on the front of the card. | VISA | +| `enhanced_transaction_data` | [OptionalNullable[models.PazeEnhancedTransactionData]](../models/pazeenhancedtransactiondata.md) | :heavy_minus_sign: | Additional purchase context used by Paze for risk scoring. | | \ No newline at end of file diff --git a/docs/models/pazesessioncompleterequesttransactiontype.md b/docs/models/pazesessioncompleterequesttransactiontype.md new file mode 100644 index 00000000..527db08d --- /dev/null +++ b/docs/models/pazesessioncompleterequesttransactiontype.md @@ -0,0 +1,21 @@ +# PazeSessionCompleteRequestTransactiontype + +The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH. + +## Example Usage + +```python +from gr4vy.models import PazeSessionCompleteRequestTransactiontype + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: PazeSessionCompleteRequestTransactiontype = "PURCHASE" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"PURCHASE"` +- `"CARD_ON_FILE"` +- `"BOTH"` diff --git a/docs/models/pazeshippingaddress.md b/docs/models/pazeshippingaddress.md index dd2121da..06ca61f1 100644 --- a/docs/models/pazeshippingaddress.md +++ b/docs/models/pazeshippingaddress.md @@ -6,8 +6,8 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `line1` | *str* | :heavy_check_mark: | Line 1 of the address. | 51551 Raynor Stream | -| `line2` | *Nullable[str]* | :heavy_check_mark: | Line 2 of the address. | | -| `line3` | *Nullable[str]* | :heavy_check_mark: | Line 3 of the address. | | +| `line2` | *OptionalNullable[str]* | :heavy_minus_sign: | Line 2 of the address. | | +| `line3` | *OptionalNullable[str]* | :heavy_minus_sign: | Line 3 of the address. | | | `city` | *str* | :heavy_check_mark: | City. | East Kory | | `state` | *str* | :heavy_check_mark: | State or region. | ND | | `zip` | *str* | :heavy_check_mark: | Postal code. | 67137 | diff --git a/docs/models/pazetransactionoptions.md b/docs/models/pazetransactionoptions.md new file mode 100644 index 00000000..735034fe --- /dev/null +++ b/docs/models/pazetransactionoptions.md @@ -0,0 +1,10 @@ +# PazeTransactionOptions + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `merchant_category_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Merchant Category Code (MCC) of the merchant. | 2121 | +| `billing_preference` | [OptionalNullable[models.PazeTransactionOptionsBillingPreference]](../models/pazetransactionoptionsbillingpreference.md) | :heavy_minus_sign: | Verbosity of the billing address required by the merchant. | ALL | +| `payload_type_indicator` | [OptionalNullable[models.PayloadTypeIndicator]](../models/payloadtypeindicator.md) | :heavy_minus_sign: | ID returns `payloadId` only (default). PAYMENT returns `payloadId` and `securePayload`. | PAYMENT | \ No newline at end of file diff --git a/docs/models/pazetransactionoptionsbillingpreference.md b/docs/models/pazetransactionoptionsbillingpreference.md new file mode 100644 index 00000000..cdbf602d --- /dev/null +++ b/docs/models/pazetransactionoptionsbillingpreference.md @@ -0,0 +1,18 @@ +# PazeTransactionOptionsBillingPreference + +## Example Usage + +```python +from gr4vy.models import PazeTransactionOptionsBillingPreference + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: PazeTransactionOptionsBillingPreference = "ALL" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"ALL"` +- `"NONE"` diff --git a/docs/models/pazetraveldata.md b/docs/models/pazetraveldata.md new file mode 100644 index 00000000..9a4b7252 --- /dev/null +++ b/docs/models/pazetraveldata.md @@ -0,0 +1,13 @@ +# PazeTravelData + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `passenger_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Traveler name. | Team Integrations | +| `round_trip` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether departure and return trips are being purchased in the same transaction. | true | +| `departure_date` | *OptionalNullable[str]* | :heavy_minus_sign: | Date and time of departure in ISO 8601 format. | 2026-06-01T08:00:00Z | +| `return_date` | *OptionalNullable[str]* | :heavy_minus_sign: | Date and time of return in ISO 8601 format. | 2026-06-08T18:30:00Z | +| `departure_location` | [OptionalNullable[models.PazeLocationAddress]](../models/pazelocationaddress.md) | :heavy_minus_sign: | Location from which the traveler departs. | | +| `return_location` | [OptionalNullable[models.PazeLocationAddress]](../models/pazelocationaddress.md) | :heavy_minus_sign: | Location to which the traveler returns. | | \ No newline at end of file diff --git a/docs/models/transactiontype.md b/docs/models/processingnetwork.md similarity index 56% rename from docs/models/transactiontype.md rename to docs/models/processingnetwork.md index c23cd7b9..fda245c9 100644 --- a/docs/models/transactiontype.md +++ b/docs/models/processingnetwork.md @@ -1,12 +1,12 @@ -# TransactionType +# ProcessingNetwork ## Example Usage ```python -from gr4vy.models import TransactionType +from gr4vy.models import ProcessingNetwork # Open enum: unrecognized values are captured as UnrecognizedStr -value: TransactionType = "PURCHASE" +value: ProcessingNetwork = "VISA" ``` @@ -14,6 +14,6 @@ value: TransactionType = "PURCHASE" This is an open enum. Unrecognized values will not fail type checks. -- `"PURCHASE"` -- `"CARD_ON_FILE"` -- `"BOTH"` +- `"VISA"` +- `"MASTERCARD"` +- `"DISCOVER"` diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index df9e7ab2..8d1969f4 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -9,6 +9,7 @@ * [paze_mobile_session_create](#paze_mobile_session_create) - Create a Paze mobile session * [paze](#paze) - Create a Paze session * [paze_mobile_session_review](#paze_mobile_session_review) - Review a Paze session +* [paze_mobile_session_complete](#paze_mobile_session_complete) - Complete a Paze session * [click_to_pay](#click_to_pay) - Create a Click to Pay session ## google_pay @@ -148,25 +149,25 @@ with Gr4vy( ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `client` | [models.PazeClient](../../models/pazeclient.md) | :heavy_check_mark: | N/A | | -| `session_id` | *str* | :heavy_check_mark: | Session reference identifier generated by the merchant. Must be reused across all Paze APIs in a checkout session. | 24e4dbb9-4f5e-43e8-8375-e9fd45650bc9 | -| `access_token` | *str* | :heavy_check_mark: | Access token obtained from the Paze session endpoint with source=mobile. | | -| `callback_url_scheme` | *str* | :heavy_check_mark: | Merchant app's ID (iOS bundle identifier or Android application ID) used as the callback URL scheme. | Gr4vyCallback | -| `intent` | [models.Intent](../../models/intent.md) | :heavy_check_mark: | Primary intent of the checkout session. | EXPRESS_CHECKOUT | -| `merchant_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | default | -| `transaction_value` | [OptionalNullable[models.PazeTransactionValue]](../../models/pazetransactionvalue.md) | :heavy_minus_sign: | Currency and amount of the transaction. Required when intent is EXPRESS_CHECKOUT. | | -| `transaction_type` | [OptionalNullable[models.TransactionType]](../../models/transactiontype.md) | :heavy_minus_sign: | Type of transaction. | | -| `shipping_preference` | [OptionalNullable[models.ShippingPreference]](../../models/shippingpreference.md) | :heavy_minus_sign: | Whether to collect a shipping address from the consumer. | | -| `billing_preference` | [OptionalNullable[models.BillingPreference]](../../models/billingpreference.md) | :heavy_minus_sign: | Verbosity of billing address required. | | -| `email_address` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer email address for checkout flow optimization. | | -| `phone_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer phone number for checkout flow optimization. | 7735550100 | -| `cobrand` | List[[models.PazeCobrandItem](../../models/pazecobranditem.md)] | :heavy_minus_sign: | Details for cobranded cards offered by the merchant. | | -| `accepted_shipping_countries` | List[*str*] | :heavy_minus_sign: | ISO 3166-1 alpha-2 country codes restricting eligible shipping addresses. Empty list or absence means all countries accepted. | | -| `accepted_payment_card_networks` | List[[models.AcceptedPaymentCardNetwork](../../models/acceptedpaymentcardnetwork.md)] | :heavy_minus_sign: | Accepted payment card networks. Empty list or absence means all networks accepted. | | -| `always_enable_checkout` | *Optional[bool]* | :heavy_minus_sign: | Set to true to enable Paze checkout even if the provided email address or phone number does not match a Paze wallet. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `client` | [models.PazeClient](../../models/pazeclient.md) | :heavy_check_mark: | N/A | | +| `session_id` | *str* | :heavy_check_mark: | Session reference identifier generated by the merchant. Must be reused across all Paze APIs in a checkout session. | 24e4dbb9-4f5e-43e8-8375-e9fd45650bc9 | +| `access_token` | *str* | :heavy_check_mark: | Access token obtained from the Paze session endpoint with source=mobile. | | +| `callback_url_scheme` | *str* | :heavy_check_mark: | Merchant app's ID (iOS bundle identifier or Android application ID) used as the callback URL scheme. | Gr4vyCallback | +| `intent` | [models.Intent](../../models/intent.md) | :heavy_check_mark: | Primary intent of the checkout session. | EXPRESS_CHECKOUT | +| `merchant_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | default | +| `transaction_value` | [OptionalNullable[models.PazeTransactionValue]](../../models/pazetransactionvalue.md) | :heavy_minus_sign: | Currency and amount of the transaction. Required when intent is EXPRESS_CHECKOUT. | | +| `transaction_type` | [OptionalNullable[models.PazeMobileSessionCreateRequestTransactionType]](../../models/pazemobilesessioncreaterequesttransactiontype.md) | :heavy_minus_sign: | Type of transaction. | | +| `shipping_preference` | [OptionalNullable[models.ShippingPreference]](../../models/shippingpreference.md) | :heavy_minus_sign: | Whether to collect a shipping address from the consumer. | | +| `billing_preference` | [OptionalNullable[models.PazeMobileSessionCreateRequestBillingPreference]](../../models/pazemobilesessioncreaterequestbillingpreference.md) | :heavy_minus_sign: | Verbosity of billing address required. | | +| `email_address` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer email address for checkout flow optimization. | | +| `phone_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Consumer phone number for checkout flow optimization. | 7735550100 | +| `cobrand` | List[[models.PazeCobrandItem](../../models/pazecobranditem.md)] | :heavy_minus_sign: | Details for cobranded cards offered by the merchant. | | +| `accepted_shipping_countries` | List[*str*] | :heavy_minus_sign: | ISO 3166-1 alpha-2 country codes restricting eligible shipping addresses. Empty list or absence means all countries accepted. | | +| `accepted_payment_card_networks` | List[[models.AcceptedPaymentCardNetwork](../../models/acceptedpaymentcardnetwork.md)] | :heavy_minus_sign: | Accepted payment card networks. Empty list or absence means all networks accepted. | | +| `always_enable_checkout` | *Optional[bool]* | :heavy_minus_sign: | Set to true to enable Paze checkout even if the provided email address or phone number does not match a Paze wallet. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -301,6 +302,67 @@ with Gr4vy( | errors.Error504 | 504 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | +## paze_mobile_session_complete + +Complete a Paze checkout session and retrieve the secure payload required to settle the payment. + +### Example Usage + + +```python +from gr4vy import Gr4vy +import os + + +with Gr4vy( + merchant_account_id="default", + bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""), +) as g_client: + + res = g_client.digital_wallets.sessions.paze_mobile_session_complete(session_id="7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2", code="eyJhdWQiOm51bGwsImtpZCI6IjE3...", access_token="eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", transaction_type="PURCHASE") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `session_id` | *str* | :heavy_check_mark: | Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call. | 7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2 | +| `code` | *str* | :heavy_check_mark: | Opaque token issued by the Paze service in the response from the most recent Paze UX interaction. | eyJhdWQiOm51bGwsImtpZCI6IjE3... | +| `access_token` | *str* | :heavy_check_mark: | The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze. | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... | +| `transaction_type` | [models.PazeSessionCompleteRequestTransactiontype](../../models/pazesessioncompleterequesttransactiontype.md) | :heavy_check_mark: | The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH. | PURCHASE | +| `merchant_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | default | +| `transaction_options` | [OptionalNullable[models.PazeTransactionOptions]](../../models/pazetransactionoptions.md) | :heavy_minus_sign: | Client configuration data overriding values configured during merchant onboarding. | | +| `transaction_value` | [OptionalNullable[models.PazeTransactionValue]](../../models/pazetransactionvalue.md) | :heavy_minus_sign: | Required when `transactionType` is PURCHASE or BOTH. Must be omitted when `transactionType` is CARD_ON_FILE. | | +| `processing_network` | [OptionalNullable[models.ProcessingNetwork]](../../models/processingnetwork.md) | :heavy_minus_sign: | Card network to process the transaction on. If not provided, Paze defaults to the network on the front of the card. | VISA | +| `enhanced_transaction_data` | [OptionalNullable[models.PazeEnhancedTransactionData]](../../models/pazeenhancedtransactiondata.md) | :heavy_minus_sign: | Additional purchase context used by Paze for risk scoring. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.PazeSessionComplete](../../models/pazesessioncomplete.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.Error400 | 400 | application/json | +| errors.Error401 | 401 | application/json | +| errors.Error403 | 403 | application/json | +| errors.Error404 | 404 | application/json | +| errors.Error405 | 405 | application/json | +| errors.Error409 | 409 | application/json | +| errors.HTTPValidationError | 422 | application/json | +| errors.Error425 | 425 | application/json | +| errors.Error429 | 429 | application/json | +| errors.Error500 | 500 | application/json | +| errors.Error502 | 502 | application/json | +| errors.Error504 | 504 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + ## click_to_pay Create a session for use with Click to Pay. diff --git a/pyproject.toml b/pyproject.toml index 170d3e73..2c4b95c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "gr4vy" -version = "2.0.44" +version = "2.0.45" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Gr4vy" },] readme = "README-PYPI.md" diff --git a/src/gr4vy/_version.py b/src/gr4vy/_version.py index 4e5baf74..4c8c3c95 100644 --- a/src/gr4vy/_version.py +++ b/src/gr4vy/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "gr4vy" -__version__: str = "2.0.44" +__version__: str = "2.0.45" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.888.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.44 2.888.0 1.0.0 gr4vy" +__gen_version__: str = "2.889.1" +__user_agent__: str = "speakeasy-sdk/python 2.0.45 2.889.1 1.0.0 gr4vy" try: if __package__ is not None: diff --git a/src/gr4vy/models/__init__.py b/src/gr4vy/models/__init__.py index 2e0c99d2..6d35d101 100644 --- a/src/gr4vy/models/__init__.py +++ b/src/gr4vy/models/__init__.py @@ -193,6 +193,12 @@ ClickToPaySessionRequest, ClickToPaySessionRequestTypedDict, ) + from .complete_paze_mobile_sessionop import ( + CompletePazeMobileSessionGlobals, + CompletePazeMobileSessionGlobalsTypedDict, + CompletePazeMobileSessionRequest, + CompletePazeMobileSessionRequestTypedDict, + ) from .configure_digital_walletop import ( ConfigureDigitalWalletGlobals, ConfigureDigitalWalletGlobalsTypedDict, @@ -1050,6 +1056,12 @@ PazeDeliveryContactDetailsTypedDict, ) from .pazedigitalcarddata import PazeDigitalCardData, PazeDigitalCardDataTypedDict + from .pazeecomdata import PazeEcomData, PazeEcomDataTypedDict + from .pazeenhancedtransactiondata import ( + PazeEnhancedTransactionData, + PazeEnhancedTransactionDataTypedDict, + ) + from .pazelocationaddress import PazeLocationAddress, PazeLocationAddressTypedDict from .pazemaskedcard import ( Paymentcardbrand, Paymentcardnetwork, @@ -1065,17 +1077,24 @@ ) from .pazemobilesessioncreaterequest import ( AcceptedPaymentCardNetwork, - BillingPreference, Intent, PazeMobileSessionCreateRequest, + PazeMobileSessionCreateRequestBillingPreference, + PazeMobileSessionCreateRequestTransactionType, PazeMobileSessionCreateRequestTypedDict, ShippingPreference, - TransactionType, ) from .pazepaymentmethodcreate import ( PazePaymentMethodCreate, PazePaymentMethodCreateTypedDict, ) + from .pazesessioncomplete import PazeSessionComplete, PazeSessionCompleteTypedDict + from .pazesessioncompleterequest import ( + PazeSessionCompleteRequest, + PazeSessionCompleteRequestTransactiontype, + PazeSessionCompleteRequestTypedDict, + ProcessingNetwork, + ) from .pazesessionrequest import ( PazeSessionRequest, PazeSessionRequestTypedDict, @@ -1091,10 +1110,17 @@ PazeSessionReviewRequestTypedDict, ) from .pazeshippingaddress import PazeShippingAddress, PazeShippingAddressTypedDict + from .pazetransactionoptions import ( + PayloadTypeIndicator, + PazeTransactionOptions, + PazeTransactionOptionsBillingPreference, + PazeTransactionOptionsTypedDict, + ) from .pazetransactionvalue import ( PazeTransactionValue, PazeTransactionValueTypedDict, ) + from .pazetraveldata import PazeTravelData, PazeTravelDataTypedDict from .pazewebsession import PazeWebSession, PazeWebSessionTypedDict from .plaidpaymentmethodcreate import ( PlaidPaymentMethodCreate, @@ -1515,7 +1541,6 @@ "BaseBankPaymentMethodCreateTypedDict", "BillingDetails", "BillingDetailsTypedDict", - "BillingPreference", "Body", "BodyTypedDict", "BraintreeDynamicDataFieldsOptions", @@ -1580,6 +1605,10 @@ "ClickToPaySessionRequest", "ClickToPaySessionRequestTypedDict", "ClickToPaySessionTypedDict", + "CompletePazeMobileSessionGlobals", + "CompletePazeMobileSessionGlobalsTypedDict", + "CompletePazeMobileSessionRequest", + "CompletePazeMobileSessionRequestTypedDict", "ConfigureDigitalWalletGlobals", "ConfigureDigitalWalletGlobalsTypedDict", "ConfigureDigitalWalletRequest", @@ -2114,6 +2143,7 @@ "NuveiPSEOptionsTypedDict", "OxxoOptions", "OxxoOptionsTypedDict", + "PayloadTypeIndicator", "PaymentLink", "PaymentLinkCreate", "PaymentLinkCreateTypedDict", @@ -2211,6 +2241,12 @@ "PazeDeliveryContactDetailsTypedDict", "PazeDigitalCardData", "PazeDigitalCardDataTypedDict", + "PazeEcomData", + "PazeEcomDataTypedDict", + "PazeEnhancedTransactionData", + "PazeEnhancedTransactionDataTypedDict", + "PazeLocationAddress", + "PazeLocationAddressTypedDict", "PazeMaskedCard", "PazeMaskedCardTypedDict", "PazeMobileNumber", @@ -2218,11 +2254,18 @@ "PazeMobileSession", "PazeMobileSessionCreate", "PazeMobileSessionCreateRequest", + "PazeMobileSessionCreateRequestBillingPreference", + "PazeMobileSessionCreateRequestTransactionType", "PazeMobileSessionCreateRequestTypedDict", "PazeMobileSessionCreateTypedDict", "PazeMobileSessionTypedDict", "PazePaymentMethodCreate", "PazePaymentMethodCreateTypedDict", + "PazeSessionComplete", + "PazeSessionCompleteRequest", + "PazeSessionCompleteRequestTransactiontype", + "PazeSessionCompleteRequestTypedDict", + "PazeSessionCompleteTypedDict", "PazeSessionRequest", "PazeSessionRequestTypedDict", "PazeSessionReview", @@ -2233,14 +2276,20 @@ "PazeSessionReviewTypedDict", "PazeShippingAddress", "PazeShippingAddressTypedDict", + "PazeTransactionOptions", + "PazeTransactionOptionsBillingPreference", + "PazeTransactionOptionsTypedDict", "PazeTransactionValue", "PazeTransactionValueTypedDict", + "PazeTravelData", + "PazeTravelDataTypedDict", "PazeWebSession", "PazeWebSessionTypedDict", "PlaidPaymentMethodCreate", "PlaidPaymentMethodCreateTypedDict", "PowertranzOptions", "PowertranzOptionsTypedDict", + "ProcessingNetwork", "ProductType", "PurposeCode", "Recipient", @@ -2435,7 +2484,6 @@ "TransactionSummaryTypedDict", "TransactionThreeDSecureSummary", "TransactionThreeDSecureSummaryTypedDict", - "TransactionType", "TransactionTypedDict", "TransactionUpdate", "TransactionUpdateTypedDict", @@ -2672,6 +2720,10 @@ "ClickToPaySessionTypedDict": ".clicktopaysession", "ClickToPaySessionRequest": ".clicktopaysessionrequest", "ClickToPaySessionRequestTypedDict": ".clicktopaysessionrequest", + "CompletePazeMobileSessionGlobals": ".complete_paze_mobile_sessionop", + "CompletePazeMobileSessionGlobalsTypedDict": ".complete_paze_mobile_sessionop", + "CompletePazeMobileSessionRequest": ".complete_paze_mobile_sessionop", + "CompletePazeMobileSessionRequestTypedDict": ".complete_paze_mobile_sessionop", "ConfigureDigitalWalletGlobals": ".configure_digital_walletop", "ConfigureDigitalWalletGlobalsTypedDict": ".configure_digital_walletop", "ConfigureDigitalWalletRequest": ".configure_digital_walletop", @@ -3307,6 +3359,12 @@ "PazeDeliveryContactDetailsTypedDict": ".pazedeliverycontactdetails", "PazeDigitalCardData": ".pazedigitalcarddata", "PazeDigitalCardDataTypedDict": ".pazedigitalcarddata", + "PazeEcomData": ".pazeecomdata", + "PazeEcomDataTypedDict": ".pazeecomdata", + "PazeEnhancedTransactionData": ".pazeenhancedtransactiondata", + "PazeEnhancedTransactionDataTypedDict": ".pazeenhancedtransactiondata", + "PazeLocationAddress": ".pazelocationaddress", + "PazeLocationAddressTypedDict": ".pazelocationaddress", "Paymentcardbrand": ".pazemaskedcard", "Paymentcardnetwork": ".pazemaskedcard", "Paymentcardtype": ".pazemaskedcard", @@ -3319,14 +3377,20 @@ "PazeMobileSessionCreate": ".pazemobilesessioncreate", "PazeMobileSessionCreateTypedDict": ".pazemobilesessioncreate", "AcceptedPaymentCardNetwork": ".pazemobilesessioncreaterequest", - "BillingPreference": ".pazemobilesessioncreaterequest", "Intent": ".pazemobilesessioncreaterequest", "PazeMobileSessionCreateRequest": ".pazemobilesessioncreaterequest", + "PazeMobileSessionCreateRequestBillingPreference": ".pazemobilesessioncreaterequest", + "PazeMobileSessionCreateRequestTransactionType": ".pazemobilesessioncreaterequest", "PazeMobileSessionCreateRequestTypedDict": ".pazemobilesessioncreaterequest", "ShippingPreference": ".pazemobilesessioncreaterequest", - "TransactionType": ".pazemobilesessioncreaterequest", "PazePaymentMethodCreate": ".pazepaymentmethodcreate", "PazePaymentMethodCreateTypedDict": ".pazepaymentmethodcreate", + "PazeSessionComplete": ".pazesessioncomplete", + "PazeSessionCompleteTypedDict": ".pazesessioncomplete", + "PazeSessionCompleteRequest": ".pazesessioncompleterequest", + "PazeSessionCompleteRequestTransactiontype": ".pazesessioncompleterequest", + "PazeSessionCompleteRequestTypedDict": ".pazesessioncompleterequest", + "ProcessingNetwork": ".pazesessioncompleterequest", "PazeSessionRequest": ".pazesessionrequest", "PazeSessionRequestTypedDict": ".pazesessionrequest", "Source": ".pazesessionrequest", @@ -3338,8 +3402,14 @@ "PazeSessionReviewRequestTypedDict": ".pazesessionreviewrequest", "PazeShippingAddress": ".pazeshippingaddress", "PazeShippingAddressTypedDict": ".pazeshippingaddress", + "PayloadTypeIndicator": ".pazetransactionoptions", + "PazeTransactionOptions": ".pazetransactionoptions", + "PazeTransactionOptionsBillingPreference": ".pazetransactionoptions", + "PazeTransactionOptionsTypedDict": ".pazetransactionoptions", "PazeTransactionValue": ".pazetransactionvalue", "PazeTransactionValueTypedDict": ".pazetransactionvalue", + "PazeTravelData": ".pazetraveldata", + "PazeTravelDataTypedDict": ".pazetraveldata", "PazeWebSession": ".pazewebsession", "PazeWebSessionTypedDict": ".pazewebsession", "PlaidPaymentMethodCreate": ".plaidpaymentmethodcreate", diff --git a/src/gr4vy/models/complete_paze_mobile_sessionop.py b/src/gr4vy/models/complete_paze_mobile_sessionop.py new file mode 100644 index 00000000..16b9584e --- /dev/null +++ b/src/gr4vy/models/complete_paze_mobile_sessionop.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .pazesessioncompleterequest import ( + PazeSessionCompleteRequest, + PazeSessionCompleteRequestTypedDict, +) +from gr4vy.types import BaseModel, UNSET_SENTINEL +from gr4vy.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CompletePazeMobileSessionGlobalsTypedDict(TypedDict): + merchant_account_id: NotRequired[str] + r"""The ID of the merchant account to use for this request.""" + + +class CompletePazeMobileSessionGlobals(BaseModel): + merchant_account_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-gr4vy-merchant-account-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of the merchant account to use for this request.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["merchant_account_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class CompletePazeMobileSessionRequestTypedDict(TypedDict): + paze_session_complete_request: PazeSessionCompleteRequestTypedDict + merchant_account_id: NotRequired[str] + r"""The ID of the merchant account to use for this request.""" + + +class CompletePazeMobileSessionRequest(BaseModel): + paze_session_complete_request: Annotated[ + PazeSessionCompleteRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + merchant_account_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-gr4vy-merchant-account-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of the merchant account to use for this request.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["merchant_account_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/gr4vy/models/pazebillingaddress.py b/src/gr4vy/models/pazebillingaddress.py index 4a753dd7..f5d20dbc 100644 --- a/src/gr4vy/models/pazebillingaddress.py +++ b/src/gr4vy/models/pazebillingaddress.py @@ -1,44 +1,35 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL +from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing_extensions import Annotated, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class PazeBillingAddressTypedDict(TypedDict): - name: Nullable[str] - r"""Name of the organization or entity at the address.""" line1: str r"""Line 1 of the address.""" - line2: Nullable[str] - r"""Line 2 of the address.""" - line3: Nullable[str] - r"""Line 3 of the address.""" city: str r"""City.""" state: str r"""State or region.""" zip: str r"""Postal code.""" - country_code: Nullable[str] + name: NotRequired[Nullable[str]] + r"""Name of the organization or entity at the address.""" + line2: NotRequired[Nullable[str]] + r"""Line 2 of the address.""" + line3: NotRequired[Nullable[str]] + r"""Line 3 of the address.""" + country_code: NotRequired[Nullable[str]] r"""ISO 3166-1 alpha-2 country code.""" class PazeBillingAddress(BaseModel): - name: Nullable[str] - r"""Name of the organization or entity at the address.""" - line1: str r"""Line 1 of the address.""" - line2: Nullable[str] - r"""Line 2 of the address.""" - - line3: Nullable[str] - r"""Line 3 of the address.""" - city: str r"""City.""" @@ -48,20 +39,42 @@ class PazeBillingAddress(BaseModel): zip: str r"""Postal code.""" - country_code: Annotated[Nullable[str], pydantic.Field(alias="countryCode")] + name: OptionalNullable[str] = UNSET + r"""Name of the organization or entity at the address.""" + + line2: OptionalNullable[str] = UNSET + r"""Line 2 of the address.""" + + line3: OptionalNullable[str] = UNSET + r"""Line 3 of the address.""" + + country_code: Annotated[ + OptionalNullable[str], pydantic.Field(alias="countryCode") + ] = UNSET r"""ISO 3166-1 alpha-2 country code.""" @model_serializer(mode="wrap") def serialize_model(self, handler): + optional_fields = set(["name", "line2", "line3", "countryCode"]) + nullable_fields = set(["name", "line2", "line3", "countryCode"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - m[k] = val + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/gr4vy/models/pazeecomdata.py b/src/gr4vy/models/pazeecomdata.py new file mode 100644 index 00000000..27914233 --- /dev/null +++ b/src/gr4vy/models/pazeecomdata.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .pazeshippingaddress import PazeShippingAddress, PazeShippingAddressTypedDict +from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PazeEcomDataTypedDict(TypedDict): + cart_contains_gift_card: NotRequired[Nullable[bool]] + r"""Whether the current transaction includes a gift card purchase.""" + order_for_pickup: NotRequired[Nullable[bool]] + r"""Whether the consumer order will be picked up rather than shipped.""" + order_highest_cost: NotRequired[Nullable[str]] + r"""Dollar value of the most expensive item ordered.""" + order_quantity: NotRequired[Nullable[str]] + r"""Number of items ordered.""" + final_shipping_address: NotRequired[Nullable[PazeShippingAddressTypedDict]] + r"""The selected shipping address. Returned only when `shippingPreference` is not `NONE`.""" + + +class PazeEcomData(BaseModel): + cart_contains_gift_card: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="cartContainsGiftCard") + ] = UNSET + r"""Whether the current transaction includes a gift card purchase.""" + + order_for_pickup: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="orderForPickup") + ] = UNSET + r"""Whether the consumer order will be picked up rather than shipped.""" + + order_highest_cost: Annotated[ + OptionalNullable[str], pydantic.Field(alias="orderHighestCost") + ] = UNSET + r"""Dollar value of the most expensive item ordered.""" + + order_quantity: Annotated[ + OptionalNullable[str], pydantic.Field(alias="orderQuantity") + ] = UNSET + r"""Number of items ordered.""" + + final_shipping_address: Annotated[ + OptionalNullable[PazeShippingAddress], + pydantic.Field(alias="finalShippingAddress"), + ] = UNSET + r"""The selected shipping address. Returned only when `shippingPreference` is not `NONE`.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cartContainsGiftCard", + "orderForPickup", + "orderHighestCost", + "orderQuantity", + "finalShippingAddress", + ] + ) + nullable_fields = set( + [ + "cartContainsGiftCard", + "orderForPickup", + "orderHighestCost", + "orderQuantity", + "finalShippingAddress", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + PazeEcomData.model_rebuild() +except NameError: + pass diff --git a/src/gr4vy/models/pazeenhancedtransactiondata.py b/src/gr4vy/models/pazeenhancedtransactiondata.py new file mode 100644 index 00000000..4e627bf8 --- /dev/null +++ b/src/gr4vy/models/pazeenhancedtransactiondata.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .pazeecomdata import PazeEcomData, PazeEcomDataTypedDict +from .pazetraveldata import PazeTravelData, PazeTravelDataTypedDict +from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PazeEnhancedTransactionDataTypedDict(TypedDict): + ecom_data: NotRequired[Nullable[PazeEcomDataTypedDict]] + r"""Details pertaining to electronic commerce purchases.""" + travel_data: NotRequired[Nullable[PazeTravelDataTypedDict]] + r"""Details pertaining to travel bookings.""" + + +class PazeEnhancedTransactionData(BaseModel): + ecom_data: Annotated[ + OptionalNullable[PazeEcomData], pydantic.Field(alias="ecomData") + ] = UNSET + r"""Details pertaining to electronic commerce purchases.""" + + travel_data: Annotated[ + OptionalNullable[PazeTravelData], pydantic.Field(alias="travelData") + ] = UNSET + r"""Details pertaining to travel bookings.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ecomData", "travelData"]) + nullable_fields = set(["ecomData", "travelData"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + PazeEnhancedTransactionData.model_rebuild() +except NameError: + pass diff --git a/src/gr4vy/models/pazelocationaddress.py b/src/gr4vy/models/pazelocationaddress.py new file mode 100644 index 00000000..6d01baf8 --- /dev/null +++ b/src/gr4vy/models/pazelocationaddress.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PazeLocationAddressTypedDict(TypedDict): + line1: str + r"""Line 1 of the address.""" + city: str + r"""City.""" + state: str + r"""State or region.""" + zip: str + r"""Postal code.""" + country_code: str + r"""ISO 3166-1 alpha-2 country code.""" + name: NotRequired[Nullable[str]] + r"""Name of the organization or entity at the address.""" + line2: NotRequired[Nullable[str]] + r"""Line 2 of the address.""" + line3: NotRequired[Nullable[str]] + r"""Line 3 of the address.""" + + +class PazeLocationAddress(BaseModel): + line1: str + r"""Line 1 of the address.""" + + city: str + r"""City.""" + + state: str + r"""State or region.""" + + zip: str + r"""Postal code.""" + + country_code: Annotated[str, pydantic.Field(alias="countryCode")] + r"""ISO 3166-1 alpha-2 country code.""" + + name: OptionalNullable[str] = UNSET + r"""Name of the organization or entity at the address.""" + + line2: OptionalNullable[str] = UNSET + r"""Line 2 of the address.""" + + line3: OptionalNullable[str] = UNSET + r"""Line 3 of the address.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "line2", "line3"]) + nullable_fields = set(["name", "line2", "line3"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + PazeLocationAddress.model_rebuild() +except NameError: + pass diff --git a/src/gr4vy/models/pazemobilesessioncreaterequest.py b/src/gr4vy/models/pazemobilesessioncreaterequest.py index 5d5efa75..658419c8 100644 --- a/src/gr4vy/models/pazemobilesessioncreaterequest.py +++ b/src/gr4vy/models/pazemobilesessioncreaterequest.py @@ -29,7 +29,7 @@ r"""Primary intent of the checkout session.""" -TransactionType = Union[ +PazeMobileSessionCreateRequestTransactionType = Union[ Literal[ "PURCHASE", "CARD_ON_FILE", @@ -48,7 +48,7 @@ ] -BillingPreference = Union[ +PazeMobileSessionCreateRequestBillingPreference = Union[ Literal[ "ALL", "ZIP_COUNTRY", @@ -79,11 +79,15 @@ class PazeMobileSessionCreateRequestTypedDict(TypedDict): r"""Primary intent of the checkout session.""" transaction_value: NotRequired[Nullable[PazeTransactionValueTypedDict]] r"""Currency and amount of the transaction. Required when intent is EXPRESS_CHECKOUT.""" - transaction_type: NotRequired[Nullable[TransactionType]] + transaction_type: NotRequired[ + Nullable[PazeMobileSessionCreateRequestTransactionType] + ] r"""Type of transaction.""" shipping_preference: NotRequired[Nullable[ShippingPreference]] r"""Whether to collect a shipping address from the consumer.""" - billing_preference: NotRequired[Nullable[BillingPreference]] + billing_preference: NotRequired[ + Nullable[PazeMobileSessionCreateRequestBillingPreference] + ] r"""Verbosity of billing address required.""" email_address: NotRequired[Nullable[str]] r"""Consumer email address for checkout flow optimization.""" @@ -122,7 +126,8 @@ class PazeMobileSessionCreateRequest(BaseModel): r"""Currency and amount of the transaction. Required when intent is EXPRESS_CHECKOUT.""" transaction_type: Annotated[ - OptionalNullable[TransactionType], pydantic.Field(alias="transactionType") + OptionalNullable[PazeMobileSessionCreateRequestTransactionType], + pydantic.Field(alias="transactionType"), ] = UNSET r"""Type of transaction.""" @@ -132,7 +137,8 @@ class PazeMobileSessionCreateRequest(BaseModel): r"""Whether to collect a shipping address from the consumer.""" billing_preference: Annotated[ - OptionalNullable[BillingPreference], pydantic.Field(alias="billingPreference") + OptionalNullable[PazeMobileSessionCreateRequestBillingPreference], + pydantic.Field(alias="billingPreference"), ] = UNSET r"""Verbosity of billing address required.""" diff --git a/src/gr4vy/models/pazesessioncomplete.py b/src/gr4vy/models/pazesessioncomplete.py new file mode 100644 index 00000000..ba04522b --- /dev/null +++ b/src/gr4vy/models/pazesessioncomplete.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, TypedDict + + +class PazeSessionCompleteTypedDict(TypedDict): + payload_id: str + r"""Unique identifier generated by Paze to track and link the wallet transaction. Used as the wallet transaction identifier.""" + complete_response: Nullable[str] + r"""Opaque token returned by Paze for the completion call.""" + secure_payload: Nullable[str] + r"""Signed and encrypted payload containing the data necessary to process the payment. Returned when `payloadTypeIndicator` is PAYMENT.""" + client_context: str + r"""Echo of the `clientContext` sent on the request. Returned by Paze for client-side tracing.""" + ew_sid: str + r"""Paze-issued session identifier returned for tracing.""" + timestamp_iso8601: str + r"""Server timestamp of the Paze response in ISO 8601 format. Returned for tracing.""" + + +class PazeSessionComplete(BaseModel): + payload_id: Annotated[str, pydantic.Field(alias="payloadId")] + r"""Unique identifier generated by Paze to track and link the wallet transaction. Used as the wallet transaction identifier.""" + + complete_response: Annotated[ + Nullable[str], pydantic.Field(alias="completeResponse") + ] + r"""Opaque token returned by Paze for the completion call.""" + + secure_payload: Annotated[Nullable[str], pydantic.Field(alias="securePayload")] + r"""Signed and encrypted payload containing the data necessary to process the payment. Returned when `payloadTypeIndicator` is PAYMENT.""" + + client_context: Annotated[str, pydantic.Field(alias="clientContext")] + r"""Echo of the `clientContext` sent on the request. Returned by Paze for client-side tracing.""" + + ew_sid: Annotated[str, pydantic.Field(alias="ewSID")] + r"""Paze-issued session identifier returned for tracing.""" + + timestamp_iso8601: Annotated[str, pydantic.Field(alias="timestampISO8601")] + r"""Server timestamp of the Paze response in ISO 8601 format. Returned for tracing.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m + + +try: + PazeSessionComplete.model_rebuild() +except NameError: + pass diff --git a/src/gr4vy/models/pazesessioncompleterequest.py b/src/gr4vy/models/pazesessioncompleterequest.py new file mode 100644 index 00000000..d1ae4e1c --- /dev/null +++ b/src/gr4vy/models/pazesessioncompleterequest.py @@ -0,0 +1,150 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .pazeenhancedtransactiondata import ( + PazeEnhancedTransactionData, + PazeEnhancedTransactionDataTypedDict, +) +from .pazetransactionoptions import ( + PazeTransactionOptions, + PazeTransactionOptionsTypedDict, +) +from .pazetransactionvalue import PazeTransactionValue, PazeTransactionValueTypedDict +from gr4vy.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +import pydantic +from pydantic import model_serializer +from typing import Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +PazeSessionCompleteRequestTransactiontype = Union[ + Literal[ + "PURCHASE", + "CARD_ON_FILE", + "BOTH", + ], + UnrecognizedStr, +] +r"""The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH.""" + + +ProcessingNetwork = Union[ + Literal[ + "VISA", + "MASTERCARD", + "DISCOVER", + ], + UnrecognizedStr, +] + + +class PazeSessionCompleteRequestTypedDict(TypedDict): + session_id: str + r"""Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call.""" + code: str + r"""Opaque token issued by the Paze service in the response from the most recent Paze UX interaction.""" + access_token: str + r"""The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze.""" + transaction_type: PazeSessionCompleteRequestTransactiontype + r"""The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH.""" + transaction_options: NotRequired[Nullable[PazeTransactionOptionsTypedDict]] + r"""Client configuration data overriding values configured during merchant onboarding.""" + transaction_value: NotRequired[Nullable[PazeTransactionValueTypedDict]] + r"""Required when `transactionType` is PURCHASE or BOTH. Must be omitted when `transactionType` is CARD_ON_FILE.""" + processing_network: NotRequired[Nullable[ProcessingNetwork]] + r"""Card network to process the transaction on. If not provided, Paze defaults to the network on the front of the card.""" + enhanced_transaction_data: NotRequired[ + Nullable[PazeEnhancedTransactionDataTypedDict] + ] + r"""Additional purchase context used by Paze for risk scoring.""" + + +class PazeSessionCompleteRequest(BaseModel): + session_id: Annotated[str, pydantic.Field(alias="sessionId")] + r"""Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call.""" + + code: str + r"""Opaque token issued by the Paze service in the response from the most recent Paze UX interaction.""" + + access_token: Annotated[str, pydantic.Field(alias="accessToken")] + r"""The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze.""" + + transaction_type: Annotated[ + PazeSessionCompleteRequestTransactiontype, + pydantic.Field(alias="transactionType"), + ] + r"""The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH.""" + + transaction_options: Annotated[ + OptionalNullable[PazeTransactionOptions], + pydantic.Field(alias="transactionOptions"), + ] = UNSET + r"""Client configuration data overriding values configured during merchant onboarding.""" + + transaction_value: Annotated[ + OptionalNullable[PazeTransactionValue], pydantic.Field(alias="transactionValue") + ] = UNSET + r"""Required when `transactionType` is PURCHASE or BOTH. Must be omitted when `transactionType` is CARD_ON_FILE.""" + + processing_network: Annotated[ + OptionalNullable[ProcessingNetwork], pydantic.Field(alias="processingNetwork") + ] = UNSET + r"""Card network to process the transaction on. If not provided, Paze defaults to the network on the front of the card.""" + + enhanced_transaction_data: Annotated[ + OptionalNullable[PazeEnhancedTransactionData], + pydantic.Field(alias="enhancedTransactionData"), + ] = UNSET + r"""Additional purchase context used by Paze for risk scoring.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "transactionOptions", + "transactionValue", + "processingNetwork", + "enhancedTransactionData", + ] + ) + nullable_fields = set( + [ + "transactionOptions", + "transactionValue", + "processingNetwork", + "enhancedTransactionData", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + PazeSessionCompleteRequest.model_rebuild() +except NameError: + pass diff --git a/src/gr4vy/models/pazeshippingaddress.py b/src/gr4vy/models/pazeshippingaddress.py index fa4d66b1..926218da 100644 --- a/src/gr4vy/models/pazeshippingaddress.py +++ b/src/gr4vy/models/pazeshippingaddress.py @@ -5,19 +5,15 @@ PazeDeliveryContactDetails, PazeDeliveryContactDetailsTypedDict, ) -from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL +from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing_extensions import Annotated, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class PazeShippingAddressTypedDict(TypedDict): line1: str r"""Line 1 of the address.""" - line2: Nullable[str] - r"""Line 2 of the address.""" - line3: Nullable[str] - r"""Line 3 of the address.""" city: str r"""City.""" state: str @@ -27,18 +23,16 @@ class PazeShippingAddressTypedDict(TypedDict): country_code: str r"""ISO 3166-1 alpha-2 country code.""" delivery_contact_details: Nullable[PazeDeliveryContactDetailsTypedDict] + line2: NotRequired[Nullable[str]] + r"""Line 2 of the address.""" + line3: NotRequired[Nullable[str]] + r"""Line 3 of the address.""" class PazeShippingAddress(BaseModel): line1: str r"""Line 1 of the address.""" - line2: Nullable[str] - r"""Line 2 of the address.""" - - line3: Nullable[str] - r"""Line 3 of the address.""" - city: str r"""City.""" @@ -56,17 +50,34 @@ class PazeShippingAddress(BaseModel): pydantic.Field(alias="deliveryContactDetails"), ] + line2: OptionalNullable[str] = UNSET + r"""Line 2 of the address.""" + + line3: OptionalNullable[str] = UNSET + r"""Line 3 of the address.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): + optional_fields = set(["line2", "line3"]) + nullable_fields = set(["line2", "line3", "deliveryContactDetails"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - m[k] = val + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/gr4vy/models/pazetransactionoptions.py b/src/gr4vy/models/pazetransactionoptions.py new file mode 100644 index 00000000..a7813715 --- /dev/null +++ b/src/gr4vy/models/pazetransactionoptions.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gr4vy.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +import pydantic +from pydantic import model_serializer +from typing import Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +PazeTransactionOptionsBillingPreference = Union[ + Literal[ + "ALL", + "NONE", + ], + UnrecognizedStr, +] + + +PayloadTypeIndicator = Union[ + Literal[ + "ID", + "PAYMENT", + ], + UnrecognizedStr, +] + + +class PazeTransactionOptionsTypedDict(TypedDict): + merchant_category_code: NotRequired[Nullable[str]] + r"""Merchant Category Code (MCC) of the merchant.""" + billing_preference: NotRequired[Nullable[PazeTransactionOptionsBillingPreference]] + r"""Verbosity of the billing address required by the merchant.""" + payload_type_indicator: NotRequired[Nullable[PayloadTypeIndicator]] + r"""ID returns `payloadId` only (default). PAYMENT returns `payloadId` and `securePayload`.""" + + +class PazeTransactionOptions(BaseModel): + merchant_category_code: Annotated[ + OptionalNullable[str], pydantic.Field(alias="merchantCategoryCode") + ] = UNSET + r"""Merchant Category Code (MCC) of the merchant.""" + + billing_preference: Annotated[ + OptionalNullable[PazeTransactionOptionsBillingPreference], + pydantic.Field(alias="billingPreference"), + ] = UNSET + r"""Verbosity of the billing address required by the merchant.""" + + payload_type_indicator: Annotated[ + OptionalNullable[PayloadTypeIndicator], + pydantic.Field(alias="payloadTypeIndicator"), + ] = UNSET + r"""ID returns `payloadId` only (default). PAYMENT returns `payloadId` and `securePayload`.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["merchantCategoryCode", "billingPreference", "payloadTypeIndicator"] + ) + nullable_fields = set( + ["merchantCategoryCode", "billingPreference", "payloadTypeIndicator"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + PazeTransactionOptions.model_rebuild() +except NameError: + pass diff --git a/src/gr4vy/models/pazetraveldata.py b/src/gr4vy/models/pazetraveldata.py new file mode 100644 index 00000000..0d635ff7 --- /dev/null +++ b/src/gr4vy/models/pazetraveldata.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .pazelocationaddress import PazeLocationAddress, PazeLocationAddressTypedDict +from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PazeTravelDataTypedDict(TypedDict): + passenger_name: NotRequired[Nullable[str]] + r"""Traveler name.""" + round_trip: NotRequired[Nullable[bool]] + r"""Whether departure and return trips are being purchased in the same transaction.""" + departure_date: NotRequired[Nullable[str]] + r"""Date and time of departure in ISO 8601 format.""" + return_date: NotRequired[Nullable[str]] + r"""Date and time of return in ISO 8601 format.""" + departure_location: NotRequired[Nullable[PazeLocationAddressTypedDict]] + r"""Location from which the traveler departs.""" + return_location: NotRequired[Nullable[PazeLocationAddressTypedDict]] + r"""Location to which the traveler returns.""" + + +class PazeTravelData(BaseModel): + passenger_name: Annotated[ + OptionalNullable[str], pydantic.Field(alias="passengerName") + ] = UNSET + r"""Traveler name.""" + + round_trip: Annotated[OptionalNullable[bool], pydantic.Field(alias="roundTrip")] = ( + UNSET + ) + r"""Whether departure and return trips are being purchased in the same transaction.""" + + departure_date: Annotated[ + OptionalNullable[str], pydantic.Field(alias="departureDate") + ] = UNSET + r"""Date and time of departure in ISO 8601 format.""" + + return_date: Annotated[ + OptionalNullable[str], pydantic.Field(alias="returnDate") + ] = UNSET + r"""Date and time of return in ISO 8601 format.""" + + departure_location: Annotated[ + OptionalNullable[PazeLocationAddress], pydantic.Field(alias="departureLocation") + ] = UNSET + r"""Location from which the traveler departs.""" + + return_location: Annotated[ + OptionalNullable[PazeLocationAddress], pydantic.Field(alias="returnLocation") + ] = UNSET + r"""Location to which the traveler returns.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "passengerName", + "roundTrip", + "departureDate", + "returnDate", + "departureLocation", + "returnLocation", + ] + ) + nullable_fields = set( + [ + "passengerName", + "roundTrip", + "departureDate", + "returnDate", + "departureLocation", + "returnLocation", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + PazeTravelData.model_rebuild() +except NameError: + pass diff --git a/src/gr4vy/sessions.py b/src/gr4vy/sessions.py index 7eaeca26..109f97ff 100644 --- a/src/gr4vy/sessions.py +++ b/src/gr4vy/sessions.py @@ -580,9 +580,13 @@ def paze_mobile_session_create( transaction_value: OptionalNullable[ Union[models.PazeTransactionValue, models.PazeTransactionValueTypedDict] ] = UNSET, - transaction_type: OptionalNullable[models.TransactionType] = UNSET, + transaction_type: OptionalNullable[ + models.PazeMobileSessionCreateRequestTransactionType + ] = UNSET, shipping_preference: OptionalNullable[models.ShippingPreference] = UNSET, - billing_preference: OptionalNullable[models.BillingPreference] = UNSET, + billing_preference: OptionalNullable[ + models.PazeMobileSessionCreateRequestBillingPreference + ] = UNSET, email_address: OptionalNullable[str] = UNSET, phone_number: OptionalNullable[str] = UNSET, cobrand: OptionalNullable[ @@ -770,9 +774,13 @@ async def paze_mobile_session_create_async( transaction_value: OptionalNullable[ Union[models.PazeTransactionValue, models.PazeTransactionValueTypedDict] ] = UNSET, - transaction_type: OptionalNullable[models.TransactionType] = UNSET, + transaction_type: OptionalNullable[ + models.PazeMobileSessionCreateRequestTransactionType + ] = UNSET, shipping_preference: OptionalNullable[models.ShippingPreference] = UNSET, - billing_preference: OptionalNullable[models.BillingPreference] = UNSET, + billing_preference: OptionalNullable[ + models.PazeMobileSessionCreateRequestBillingPreference + ] = UNSET, email_address: OptionalNullable[str] = UNSET, phone_number: OptionalNullable[str] = UNSET, cobrand: OptionalNullable[ @@ -1522,6 +1530,356 @@ async def paze_mobile_session_review_async( raise errors.APIError("Unexpected response received", http_res) + def paze_mobile_session_complete( + self, + *, + session_id: str, + code: str, + access_token: str, + transaction_type: models.PazeSessionCompleteRequestTransactiontype, + merchant_account_id: Optional[str] = None, + transaction_options: OptionalNullable[ + Union[models.PazeTransactionOptions, models.PazeTransactionOptionsTypedDict] + ] = UNSET, + transaction_value: OptionalNullable[ + Union[models.PazeTransactionValue, models.PazeTransactionValueTypedDict] + ] = UNSET, + processing_network: OptionalNullable[models.ProcessingNetwork] = UNSET, + enhanced_transaction_data: OptionalNullable[ + Union[ + models.PazeEnhancedTransactionData, + models.PazeEnhancedTransactionDataTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PazeSessionComplete: + r"""Complete a Paze session + + Complete a Paze checkout session and retrieve the secure payload required to settle the payment. + + :param session_id: Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call. + :param code: Opaque token issued by the Paze service in the response from the most recent Paze UX interaction. + :param access_token: The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze. + :param transaction_type: The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH. + :param merchant_account_id: The ID of the merchant account to use for this request. + :param transaction_options: Client configuration data overriding values configured during merchant onboarding. + :param transaction_value: Required when `transactionType` is PURCHASE or BOTH. Must be omitted when `transactionType` is CARD_ON_FILE. + :param processing_network: Card network to process the transaction on. If not provided, Paze defaults to the network on the front of the card. + :param enhanced_transaction_data: Additional purchase context used by Paze for risk scoring. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CompletePazeMobileSessionRequest( + merchant_account_id=merchant_account_id, + paze_session_complete_request=models.PazeSessionCompleteRequest( + session_id=session_id, + code=code, + access_token=access_token, + transaction_type=transaction_type, + transaction_options=utils.get_pydantic_model( + transaction_options, OptionalNullable[models.PazeTransactionOptions] + ), + transaction_value=utils.get_pydantic_model( + transaction_value, OptionalNullable[models.PazeTransactionValue] + ), + processing_network=processing_network, + enhanced_transaction_data=utils.get_pydantic_model( + enhanced_transaction_data, + OptionalNullable[models.PazeEnhancedTransactionData], + ), + ), + ) + + req = self._build_request( + method="POST", + path="/digital-wallets/paze/session/complete", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.CompletePazeMobileSessionGlobals( + merchant_account_id=self.sdk_configuration.globals.merchant_account_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.paze_session_complete_request, + False, + False, + "json", + models.PazeSessionCompleteRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="complete_paze_mobile_session", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PazeSessionComplete, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response(errors.Error400Data, http_res) + raise errors.Error400(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response(errors.Error401Data, http_res) + raise errors.Error401(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response(errors.Error403Data, http_res) + raise errors.Error403(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response(errors.Error404Data, http_res) + raise errors.Error404(response_data, http_res) + if utils.match_response(http_res, "405", "application/json"): + response_data = unmarshal_json_response(errors.Error405Data, http_res) + raise errors.Error405(response_data, http_res) + if utils.match_response(http_res, "409", "application/json"): + response_data = unmarshal_json_response(errors.Error409Data, http_res) + raise errors.Error409(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "425", "application/json"): + response_data = unmarshal_json_response(errors.Error425Data, http_res) + raise errors.Error425(response_data, http_res) + if utils.match_response(http_res, "429", "application/json"): + response_data = unmarshal_json_response(errors.Error429Data, http_res) + raise errors.Error429(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(errors.Error500Data, http_res) + raise errors.Error500(response_data, http_res) + if utils.match_response(http_res, "502", "application/json"): + response_data = unmarshal_json_response(errors.Error502Data, http_res) + raise errors.Error502(response_data, http_res) + if utils.match_response(http_res, "504", "application/json"): + response_data = unmarshal_json_response(errors.Error504Data, http_res) + raise errors.Error504(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + + raise errors.APIError("Unexpected response received", http_res) + + async def paze_mobile_session_complete_async( + self, + *, + session_id: str, + code: str, + access_token: str, + transaction_type: models.PazeSessionCompleteRequestTransactiontype, + merchant_account_id: Optional[str] = None, + transaction_options: OptionalNullable[ + Union[models.PazeTransactionOptions, models.PazeTransactionOptionsTypedDict] + ] = UNSET, + transaction_value: OptionalNullable[ + Union[models.PazeTransactionValue, models.PazeTransactionValueTypedDict] + ] = UNSET, + processing_network: OptionalNullable[models.ProcessingNetwork] = UNSET, + enhanced_transaction_data: OptionalNullable[ + Union[ + models.PazeEnhancedTransactionData, + models.PazeEnhancedTransactionDataTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PazeSessionComplete: + r"""Complete a Paze session + + Complete a Paze checkout session and retrieve the secure payload required to settle the payment. + + :param session_id: Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call. + :param code: Opaque token issued by the Paze service in the response from the most recent Paze UX interaction. + :param access_token: The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze. + :param transaction_type: The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH. + :param merchant_account_id: The ID of the merchant account to use for this request. + :param transaction_options: Client configuration data overriding values configured during merchant onboarding. + :param transaction_value: Required when `transactionType` is PURCHASE or BOTH. Must be omitted when `transactionType` is CARD_ON_FILE. + :param processing_network: Card network to process the transaction on. If not provided, Paze defaults to the network on the front of the card. + :param enhanced_transaction_data: Additional purchase context used by Paze for risk scoring. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CompletePazeMobileSessionRequest( + merchant_account_id=merchant_account_id, + paze_session_complete_request=models.PazeSessionCompleteRequest( + session_id=session_id, + code=code, + access_token=access_token, + transaction_type=transaction_type, + transaction_options=utils.get_pydantic_model( + transaction_options, OptionalNullable[models.PazeTransactionOptions] + ), + transaction_value=utils.get_pydantic_model( + transaction_value, OptionalNullable[models.PazeTransactionValue] + ), + processing_network=processing_network, + enhanced_transaction_data=utils.get_pydantic_model( + enhanced_transaction_data, + OptionalNullable[models.PazeEnhancedTransactionData], + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/digital-wallets/paze/session/complete", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.CompletePazeMobileSessionGlobals( + merchant_account_id=self.sdk_configuration.globals.merchant_account_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.paze_session_complete_request, + False, + False, + "json", + models.PazeSessionCompleteRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="complete_paze_mobile_session", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PazeSessionComplete, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response(errors.Error400Data, http_res) + raise errors.Error400(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response(errors.Error401Data, http_res) + raise errors.Error401(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response(errors.Error403Data, http_res) + raise errors.Error403(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response(errors.Error404Data, http_res) + raise errors.Error404(response_data, http_res) + if utils.match_response(http_res, "405", "application/json"): + response_data = unmarshal_json_response(errors.Error405Data, http_res) + raise errors.Error405(response_data, http_res) + if utils.match_response(http_res, "409", "application/json"): + response_data = unmarshal_json_response(errors.Error409Data, http_res) + raise errors.Error409(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "425", "application/json"): + response_data = unmarshal_json_response(errors.Error425Data, http_res) + raise errors.Error425(response_data, http_res) + if utils.match_response(http_res, "429", "application/json"): + response_data = unmarshal_json_response(errors.Error429Data, http_res) + raise errors.Error429(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(errors.Error500Data, http_res) + raise errors.Error500(response_data, http_res) + if utils.match_response(http_res, "502", "application/json"): + response_data = unmarshal_json_response(errors.Error502Data, http_res) + raise errors.Error502(response_data, http_res) + if utils.match_response(http_res, "504", "application/json"): + response_data = unmarshal_json_response(errors.Error504Data, http_res) + raise errors.Error504(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + + raise errors.APIError("Unexpected response received", http_res) + def click_to_pay( self, *,