diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5d3e50cc..cba7f718 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 5bbaa3a9-baa0-471b-ba6a-13fd88e8c119 management: - docChecksum: 95d8f2f4569aab97b2c89106f9fa62b9 + docChecksum: 1f364007fc0032c548b8fd7729bfc928 docVersion: 1.0.0 - speakeasyVersion: 1.760.0 - generationVersion: 2.873.1 - releaseVersion: 2.16.52 - configChecksum: 6b63ef6a19b04d1195cd88dc1cf85211 + speakeasyVersion: 1.761.9 + generationVersion: 2.881.4 + releaseVersion: 2.16.53 + configChecksum: 1b20e1910caeb0c7b5fba65102f12d0f repoURL: https://github.com/gr4vy/gr4vy-java.git installationURL: https://github.com/gr4vy/gr4vy-java published: true persistentEdits: - generation_id: 72521493-7bca-4a26-9cd3-cebf0f66a592 - pristine_commit_hash: defe4ff95d8783917600f68fdcfc370b251ae0ac - pristine_tree_hash: 5d01385a08bccea0f5beddb978708ebc04b4811a + generation_id: 2744edc9-c4da-4e8e-b69a-0e61cde3cf75 + pristine_commit_hash: e36b4d44a893f9153c97cba1819af5174ffe2656 + pristine_tree_hash: 3b9aefa4eb9ca0bdf117de6e9d2a423fa935662e features: java: additionalDependencies: 0.1.0 @@ -366,8 +366,8 @@ trackedFiles: pristine_git_object: 35f774abd91f87093fb0468073b10d23ae4b0e1a docs/models/components/DigitalWalletProvider.md: id: ad895d056e80 - last_write_checksum: sha1:6d88accd2ba801de933242d0a3c1101296e3b63a - pristine_git_object: 06487cad2bb85c97707cb9347e8f886ca48ecec9 + last_write_checksum: sha1:1f6907e7c38fb68a4b38c18b329b188f5939a4ee + pristine_git_object: cf756050e96aa5e60b35faddd897c454ce6406b1 docs/models/components/DigitalWalletUpdate.md: id: 28df643ffff1 last_write_checksum: sha1:dd5b542be162230738da1930b6c6aee03ef27e7b @@ -412,6 +412,10 @@ trackedFiles: id: ee88d7d6bb70 last_write_checksum: sha1:9fb7f7a6af79be0209da575ab05f221d27041f95 pristine_git_object: ac6f08bf99acd353f471da7424e55024fd86d35c + docs/models/components/EcommpayOptions.md: + id: 3046f2ecc58b + last_write_checksum: sha1:7c8926e783f6f3114302b707fa7994051587cb46 + pristine_git_object: 19a0af6ca94a8a691aea8922982db41e28f32bb1 docs/models/components/ErrorDetail.md: id: 586ae7f609cd last_write_checksum: sha1:204546e4c83d83e3d61c6fd96df37112b5cdde3c @@ -502,8 +506,8 @@ trackedFiles: pristine_git_object: d83edff1b045d589c7068e31d0e66b8dae8edc1a docs/models/components/GiftCard.md: id: 040d9b308398 - last_write_checksum: sha1:70fe77c81129ccb2c427ebceb9dd1242bd68c27f - pristine_git_object: 1586c82081d17d4c647aeb2661aea0ad2b648b59 + last_write_checksum: sha1:04c217efdbd47c7fe3e110c7da0d19ccc74ca107 + pristine_git_object: f22b3db40cca48b74c4d9598566460696a05d4e4 docs/models/components/GiftCardBalanceRequest.md: id: c80a3eda305b last_write_checksum: sha1:c1f2778ba0fe150682aef69158b5019168d9459c @@ -546,8 +550,8 @@ trackedFiles: pristine_git_object: c596d1ad033b5d0cf321629aa6996069e7ec1ec1 docs/models/components/GiftCardSummary.md: id: f08d5ca6634e - last_write_checksum: sha1:f9cc351f5ce637bbc727d81c2ee0db060e35a712 - pristine_git_object: fb4b236b10470a95c1b208f1dcf0280900337cc6 + last_write_checksum: sha1:6f2ddc4e27f32be1426ebc27afeacdb3f2b86304 + pristine_git_object: 46a108a625c8b8c9bdad701323487c91b558d57a docs/models/components/GiftCardTokenTransactionCreate.md: id: f2e7756a876f last_write_checksum: sha1:38aeeadd016562caf9466f582decb7325393fe6f @@ -666,8 +670,8 @@ trackedFiles: pristine_git_object: ada3d378d3d81957b96b19e19e510b290090ec1f docs/models/components/Method.md: id: adedaeaabf7c - last_write_checksum: sha1:a719c11069508887ab3c4a698fb36a09e41d4ec0 - pristine_git_object: 245f4776488587e80ac6077fa77e13b14f2a3fbc + last_write_checksum: sha1:101bf3acf2f488b7cf02b413160a4604e25c3f61 + pristine_git_object: 21ba12836afd2fcff5f260d33b587ac7e8faf051 docs/models/components/MockCardMerchantAdviceCodeOptions.md: id: e927a10a34ae last_write_checksum: sha1:0d601be78333ce1c701a642b9a69e88507c6c5d0 @@ -678,8 +682,8 @@ trackedFiles: pristine_git_object: 1d6103dd8c0206181f507022e0de23c873577b10 docs/models/components/Mode.md: id: 5cbf4ccfdc29 - last_write_checksum: sha1:05e4dcf0fc3348d494be27601bd90cc0a5f72193 - pristine_git_object: 71274ef5c1ef2ea80b3f209e94eb83dca71d9c5e + last_write_checksum: sha1:225808e6f264016f0072ea9ca8c7ad53002e76ed + pristine_git_object: e386a0ce8ccfcc1047d88e2aabba549a3c4ec00c docs/models/components/MonatoSpeiOptions.md: id: 3f243c1135be last_write_checksum: sha1:3fe05ccb5d9b46d246e7f3e0e38d425e2017f91d @@ -750,8 +754,8 @@ trackedFiles: pristine_git_object: bd76a4acfb12beb0343a8bf14f7647fd695ad07b docs/models/components/PaymentMethod.md: id: 1b54b132ff41 - last_write_checksum: sha1:7620b2809b136196c5ba61d0662ea8aab8681d1b - pristine_git_object: 6e191d5b2e1256bac78a2df7bb10d3c35a2dc5d3 + last_write_checksum: sha1:8ebffe346e01070ae331524b6dd01452418c1bea + pristine_git_object: cf0d4b80ddfade48fab74799b0c96c39ac09a313 docs/models/components/PaymentMethodCard.md: id: 167dcf595e79 last_write_checksum: sha1:b5a02e6db2698296ffc60ab9e549a66aef499b08 @@ -774,8 +778,12 @@ trackedFiles: pristine_git_object: 8f85b337625614bd0eb8ff9e846530169907b9b7 docs/models/components/PaymentMethodSummary.md: id: d0e07ae99963 - last_write_checksum: sha1:21ad58fedd0663c7a1e3a98c3950449aa573a873 - pristine_git_object: 4550a90ad551791ae399e8619c2c7e77920b98c0 + last_write_checksum: sha1:9f3ca9ff394c7207362b654eb92dae7693ea3021 + pristine_git_object: e1ffb8c296a48dbb7c14c50bf96d66009709ac96 + docs/models/components/PaymentMethodUpdate.md: + id: 7981107360f1 + last_write_checksum: sha1:6e1f60b413bd529ea89facfb369d5f96f3148639 + pristine_git_object: 2becbeb6d9962fd717f8fa352a43d9dcb6cef933 docs/models/components/PaymentMethods.md: id: 2fcb5ca9e63b last_write_checksum: sha1:5f71924caf3eac0e9ff80911d15e74d186d0d388 @@ -930,8 +938,8 @@ trackedFiles: pristine_git_object: 98be6328cbcf338eaa22369da773dbdbd08cc82a docs/models/components/RedirectPaymentMethodCreateMethod.md: id: d7f0c77bb644 - last_write_checksum: sha1:b3db69aab6c63f81b2443218f79f6ce3fc326ec8 - pristine_git_object: 10176378bff96383fdeda08ba08d694b3dc2ee87 + last_write_checksum: sha1:7d6a5a2a9fde09f8780bd17ad07573b0f82fcee6 + pristine_git_object: 761af2e436d550b63ea71b05bb7e89d2473b742a docs/models/components/Refund.md: id: a2190313768a last_write_checksum: sha1:72afb9c9503c846bfc2e325fa08c8e3dcb3b3966 @@ -1218,12 +1226,12 @@ trackedFiles: pristine_git_object: fc532f806750ff9aed723b9b4d74efde86ed8b22 docs/models/components/TransactionConnectionOptions.md: id: 2a90ee52a662 - last_write_checksum: sha1:67cfb67c344a178e949bfd69febdc91d8e30fc4a - pristine_git_object: a29156a2109c496ffef9d1e3d05717861db8b5f2 + last_write_checksum: sha1:419295ba8dc1d8b56a68c040329260425eb251be + pristine_git_object: 94b63bb8c4d774b3feef5c9b9b6e70f45d75eac8 docs/models/components/TransactionCreate.md: id: 0af6b811ca1f - last_write_checksum: sha1:dc0985503d742169b49dfe33aa1035f6ef04ab4c - pristine_git_object: ef55216915aa4904ea0c8d0022caffdd1e3ce62a + last_write_checksum: sha1:81c1ff774f7ab6267282e04f21c5d75ef569c325 + pristine_git_object: 67a8e9e726a0df294e6d793f36deba7258c89513 docs/models/components/TransactionCreatePaymentMethod.md: id: d01bc2723cd5 last_write_checksum: sha1:4ac7c25162f999d9c8ee377251c459379e684445 @@ -1566,8 +1574,8 @@ trackedFiles: pristine_git_object: d6f7b197f0f9ebdde0d4b6e99aa90e4c45277c30 docs/models/operations/CreatePaymentServiceRequest.md: id: 174ef1bb4be4 - last_write_checksum: sha1:c44e13cb1b9e0b7b31b177f90693c28664d834eb - pristine_git_object: b9af628d583cf4bbc08e20a010ffb3c4d20000c8 + last_write_checksum: sha1:2f8919aeedb7a2df8497c2fcc524c3b0e6a2d8e0 + pristine_git_object: 79f3a303f3b59cfba1fdda0c3f738b954e543c4f docs/models/operations/CreatePaymentServiceResponse.md: id: 371dacf0aafe last_write_checksum: sha1:dd6ba409e6088d9d95802592e9731e82e4cdf4ce @@ -1892,22 +1900,38 @@ trackedFiles: id: 14743ac643fe last_write_checksum: sha1:9cf02a297fd93176190a20d126e7361bc73aaf26 pristine_git_object: 44a3befaa9aa172942a71a66734a09b71cfcbcc6 + docs/models/operations/ListBuyerGiftCardsOrderBy.md: + id: 75da50af281f + last_write_checksum: sha1:0e21942badbf31b62e3498b2d2b7bc9ef4dfecec + pristine_git_object: ebe32f07568844841b3824ab1bdab0836ae15bf9 docs/models/operations/ListBuyerGiftCardsRequest.md: id: 097f21ffbf57 - last_write_checksum: sha1:b86852e9c58baf909ec72e649ad8350409bd0b85 - pristine_git_object: bf4a9dc78ea41fc15dc341c3155ddcef91085ffe + last_write_checksum: sha1:f14d27d15e8b606c676f0a07e8a189b4564d2743 + pristine_git_object: 1075b09cf4e3651cb7c2b2c868f2971c11d1f0ad docs/models/operations/ListBuyerGiftCardsResponse.md: id: 43cdbcafdaed last_write_checksum: sha1:b0effd6563013b741c088ea3c08d4b12077bc707 pristine_git_object: 8c33db32e808e21c8e1a605c07b23eec2beb8f89 + docs/models/operations/ListBuyerGiftCardsSortBy.md: + id: 3a7b4842ae25 + last_write_checksum: sha1:289d2a0e6792240569b55af89beea47928f199ab + pristine_git_object: 3c13472de19c6f37a2b7d97011ef9dd80872543a + docs/models/operations/ListBuyerPaymentMethodsOrderBy.md: + id: fcb9c10c7cb7 + last_write_checksum: sha1:1920e06b5fed1e7e108f34d82fb7f9a30e509133 + pristine_git_object: 542cb05933a76245160af6e65a2ecfea4cb4f6be docs/models/operations/ListBuyerPaymentMethodsRequest.md: id: c7b2794488ea - last_write_checksum: sha1:9e91f4ea2412f596805f8159ab30a547700eccb3 - pristine_git_object: 2e5f5a84e9bd19c6e138829eb9061461358afc9f + last_write_checksum: sha1:cec2b776c3b994f0639e5f5eae3fdf95eb15c0a6 + pristine_git_object: e9f30d17d7ad1a5a803cbe0649ee7654ae999d78 docs/models/operations/ListBuyerPaymentMethodsResponse.md: id: 5cb71ecf6887 last_write_checksum: sha1:a32c3258fb3be8068d450283917c62bce14c397d pristine_git_object: bb5dabf7f0d4c2e4552e1912ebc18524313497d6 + docs/models/operations/ListBuyerPaymentMethodsSortBy.md: + id: 65f927127e65 + last_write_checksum: sha1:a340b80945060c039fee1ce4001590308f444be3 + pristine_git_object: ae4603f38b120d906a7e60dc478e0590a20b5657 docs/models/operations/ListBuyerShippingDetailsRequest.md: id: a957f7f15ee9 last_write_checksum: sha1:f5731121189b299823809cf5c9048c8c72da1650 @@ -2092,10 +2116,6 @@ trackedFiles: id: 796fbffcd13c last_write_checksum: sha1:72222a4a6d2506542f9c77e86a1f3f160c381c20 pristine_git_object: 2a15852ee68f1e74d215530c64b50a131b1f2fe6 - docs/models/operations/OrderBy.md: - id: 19cba584908e - last_write_checksum: sha1:889dcc67811dd3e30f1690eaf3e47d9deb647274 - pristine_git_object: c2f0d886dd04fdd5c5b98491b1ec5ec1c306f286 docs/models/operations/RegisterDigitalWalletDomainRequest.md: id: 93dea443c2fe last_write_checksum: sha1:40deaa0a56a7fc077bad973b8e3893408b9cbbb7 @@ -2120,10 +2140,6 @@ trackedFiles: id: 84cd116a28a3 last_write_checksum: sha1:bd6b8357a19a8984c47c93905ecd36d51e8d1937 pristine_git_object: 373aa336f8f45fbee701d2f3ddf01f9140a18df4 - docs/models/operations/SortBy.md: - id: 7bdd49024e4d - last_write_checksum: sha1:62e0a1f4e65adb9f32027021133ea2e5faafc7f5 - pristine_git_object: d0e66944bb758e83849ea352b0ccbc8c022ee931 docs/models/operations/SuspendPaymentMethodNetworkTokenRequest.md: id: ee7d0bf0d004 last_write_checksum: sha1:05a05fdced63ecadaf1c363b9fa5bbcf44baa718 @@ -2188,10 +2204,18 @@ trackedFiles: id: 8a19aa9101e6 last_write_checksum: sha1:bcc7983eced9dd10d1fcee7d697c3017baeb905f pristine_git_object: 9e5f6fa51079ca0cd00f46b217111113215a9c43 + docs/models/operations/UpdatePaymentMethodRequest.md: + id: d609e52a1a89 + last_write_checksum: sha1:c66e4effb1c7c5be822a70a840f633050b7a9b10 + pristine_git_object: 14f80fd1119ed7c233411ccc574e99852eaf1393 + docs/models/operations/UpdatePaymentMethodResponse.md: + id: a85f58edd81d + last_write_checksum: sha1:654f46d5d2664afc4ec1cba99d127f8d1a1e5af9 + pristine_git_object: 7373e335769c54e46340d30908596ba7dafb6074 docs/models/operations/UpdatePaymentServiceRequest.md: id: 4a4e08dc3e94 - last_write_checksum: sha1:8b83d824139dafbfed25659ea40ecfcc3d260afe - pristine_git_object: 8fdb0139a016b9209a223d1bdff645fb81f39657 + last_write_checksum: sha1:744ebfd516844460c3235637295ef55e54c8975a + pristine_git_object: a3fc7853cfe5cfbcfe54ad21f72ebe9292c103de docs/models/operations/UpdatePaymentServiceResponse.md: id: d39adf3320ae last_write_checksum: sha1:69d682d597e85568dbc36b6a11f14310cf9c822b @@ -2258,12 +2282,12 @@ trackedFiles: pristine_git_object: e49f5f2a473923a48a5ec018b3d0c27c6a82b91d docs/sdks/buyersgiftcards/README.md: id: b24dd6aa2092 - last_write_checksum: sha1:196aaf7332e37beda45caa45a477561911186411 - pristine_git_object: c559ff08be98dbe8985bee8b8610d5c1eb5b86a7 + last_write_checksum: sha1:370f243ed0fea9aa3d8c10cf64464fe63de92a16 + pristine_git_object: 489a9ace55df100689cdc3364e8dbd3936209c65 docs/sdks/buyerspaymentmethods/README.md: id: 4aff3957cf89 - last_write_checksum: sha1:70e9b5d501aa63ed0ed88ef440854a34967bef6e - pristine_git_object: ff2d1fcb97aece48b41955a17f710e4c8faef245 + last_write_checksum: sha1:59f0faf53651d1dd1edfb7498b0e80cd8aefed69 + pristine_git_object: 6a0ef4b65db121642467e8eedd21a1d50e66712e docs/sdks/cardschemedefinitions/README.md: id: a8ca8c2fbb07 last_write_checksum: sha1:31cffcce66128ca7df30a3d7cb3e25117273a46d @@ -2314,8 +2338,8 @@ trackedFiles: pristine_git_object: 1921d57d0aba24428ccc320b0b1428f37cb67eb0 docs/sdks/paymentmethods/README.md: id: 98b2df26035c - last_write_checksum: sha1:37d0ee77cb843e6fa2dfeba27ad2f9ff1cbaa990 - pristine_git_object: 949190c2f2a47ab0b43af6c95cee019e18f3b4f5 + last_write_checksum: sha1:d1e4df16a2fa4663487cce18c89cd72e50c02937 + pristine_git_object: 0869232d5dd6e6e5a860a9c542863d08e33e52fb docs/sdks/paymentoptions/README.md: id: 575722e7ed6c last_write_checksum: sha1:acc0e8e5f5a696372c54951d129b12cbae3e465d @@ -2326,8 +2350,8 @@ trackedFiles: pristine_git_object: cade7bcd55a299fb101a95df949d47fe5f44c1cc docs/sdks/paymentservices/README.md: id: 90e778d338dd - last_write_checksum: sha1:bbbc66a1f5e6ce4cb2692d2a2a666d67da92d096 - pristine_git_object: 7fff302e3e09c4a83615316d5ea194a125d7b048 + last_write_checksum: sha1:b4a39072f19d1d6cb8e0bec1c143e25c12f5d66a + pristine_git_object: 51e7d47f83ac661c389079c085ba614d83971ad6 docs/sdks/paymentservicetokens/README.md: id: 9404e9a864a9 last_write_checksum: sha1:918ab25e6f08f984af09137d4b7baedaabbdfe70 @@ -2382,8 +2406,8 @@ trackedFiles: pristine_git_object: 15c4e4642f204ccb312d8814155b69e153b4e19b gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:2abfc23c14a247de0884c591950d5d58553985a6 - pristine_git_object: 9d426f78ea1e5448c96006d28e4387ee03f9df66 + last_write_checksum: sha1:39131eedfafebff5bba10e4505d8feb7a2472fe5 + pristine_git_object: 066282b758ec402de8abae31246aa23d296443b7 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -2474,8 +2498,8 @@ trackedFiles: pristine_git_object: 50cf84574c3c5fbdd11a9c973f0b29eab28ac258 src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java: id: 17e5a1c06e95 - last_write_checksum: sha1:ce4513e37d2d1469701a40434dd79e923fa3a1f6 - pristine_git_object: 0ce620d82ed301506862ba90d3ee324897f95a9c + last_write_checksum: sha1:1c2d9a34ff50bb61e7f91d7a4385721daf72ac63 + pristine_git_object: d02d1e49194d86e28125b50041dcbeaa92fc42cf src/main/java/com/gr4vy/sdk/AsyncBuyersPaymentMethods.java: id: ef2dbb00d44a last_write_checksum: sha1:5813ae9e7ce1a3900cd19f3b7c0dcb521c3c50e7 @@ -2534,8 +2558,8 @@ trackedFiles: pristine_git_object: 5e1fdd5488ea40dab638bc9f39704a49f83749a4 src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java: id: e54ffd893f58 - last_write_checksum: sha1:3e52094931ce745e18df679834578143478258b3 - pristine_git_object: ab92881e41dbc8a58804382a5083bace9b5b5a80 + last_write_checksum: sha1:b6619814b9273caf0478d29f878a222242718cbf + pristine_git_object: 97a34a84452c4ff981372a4174d48aaa865ec736 src/main/java/com/gr4vy/sdk/AsyncPaymentOptions.java: id: 4de27e439305 last_write_checksum: sha1:a51f42413fdba3dacf3e323b72173798022f31d2 @@ -2550,8 +2574,8 @@ trackedFiles: pristine_git_object: b016452cfa8878cc7aaae725660df75854d55ad2 src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java: id: f01507ed0f24 - last_write_checksum: sha1:c4476e4108f211ab703f2ac27aba67a5bcbe2a10 - pristine_git_object: cfe5e0d40ccd6802702057179895fa1db73ab1d4 + last_write_checksum: sha1:c3b951845bbea6ca27f1a4e38d241e4c7612b2c9 + pristine_git_object: 13a36eb2b625103fc8660c25d980fb572a0790c4 src/main/java/com/gr4vy/sdk/AsyncPayouts.java: id: 9b84e4b1d9a6 last_write_checksum: sha1:d0073039275fe7a3c8a4d8499973f2951626e1d1 @@ -2610,8 +2634,8 @@ trackedFiles: pristine_git_object: cfe992ba689bb8227a5da5d435aea39aa4c26f51 src/main/java/com/gr4vy/sdk/BuyersGiftCards.java: id: b0200dd81e87 - last_write_checksum: sha1:df02975844a5688b1d4730b29c3acdc8ad0bea9d - pristine_git_object: f3803fe70e13067b6322a9e29dc173d21cb51e8c + last_write_checksum: sha1:c4d8379fc642bd02ddf2236af1e634fc2a6044c7 + pristine_git_object: 81f5e07bbd3d5e067194da3f91bdcb9aa0629efd src/main/java/com/gr4vy/sdk/BuyersPaymentMethods.java: id: 331a62ed595b last_write_checksum: sha1:77a9e684381780c1823b6cf00d5ce49cf7b49c99 @@ -2670,8 +2694,8 @@ trackedFiles: pristine_git_object: 4c955f18958d6d915226baeef70e2abc1e5cfa4d src/main/java/com/gr4vy/sdk/PaymentMethods.java: id: 2691e32925aa - last_write_checksum: sha1:425030953f2354ee41a3cf704b4c3c2041579a6a - pristine_git_object: f8fb6b6fce139a020c2a541a803e70388d857940 + last_write_checksum: sha1:8783250b6ccd563539a9c319d7999652a5d7af97 + pristine_git_object: 2701ffc4a63acab6f94b8cb1754061480e1558a0 src/main/java/com/gr4vy/sdk/PaymentOptions.java: id: a98295ceb16f last_write_checksum: sha1:586cbe6f190b6e756ca98201edf777338e651a76 @@ -2686,8 +2710,8 @@ trackedFiles: pristine_git_object: 6a242a4c6a5ce5d491e182a6da34f56c06855dad src/main/java/com/gr4vy/sdk/PaymentServices.java: id: b333446fb62b - last_write_checksum: sha1:ab64a8e5608bb45aafa4e3086b094a9fafb349cc - pristine_git_object: d6a31c7178646ff071c154f9d9ed04a016d2dbbc + last_write_checksum: sha1:f7f851dca8fb8f1c7594a5964c4456a0301a5cf9 + pristine_git_object: 0ecdd593aac949d3c6e58180303e55c790bb39e9 src/main/java/com/gr4vy/sdk/Payouts.java: id: 5fe07a63563d last_write_checksum: sha1:1241a6668e42d6968e670b3c034c319138fcfd01 @@ -2706,8 +2730,8 @@ trackedFiles: pristine_git_object: 502a7312d3dc82c102dbaf7ed5e952d0c793e26f src/main/java/com/gr4vy/sdk/SDKConfiguration.java: id: 73a7edeaca45 - last_write_checksum: sha1:c29684d69fb26065d327d620a6badd2634b7148d - pristine_git_object: e2e6d732b770df88fce42b446f6e5c41d1f00a23 + last_write_checksum: sha1:4a0f987b1664c5883d324a3ce082ef035c60a306 + pristine_git_object: 647e3c6df0031681bf278de3bc3a238acb71380e src/main/java/com/gr4vy/sdk/SecuritySource.java: id: 1b6add6b9b50 last_write_checksum: sha1:2f365cc823c6243188e83f4df618c9737fcee8bd @@ -3058,8 +3082,8 @@ trackedFiles: pristine_git_object: 4c738927301efbcc671e4ff42f2af300e7a68cf8 src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java: id: 6f971bdc7896 - last_write_checksum: sha1:45c60fd3ff958d4c179b3d4b9f05d32c7ffc0461 - pristine_git_object: 2d7b0712f3599f838ed6a8d5c527019cc969c696 + last_write_checksum: sha1:40aa2d7a47bf21b1a712a096251c732458ac879f + pristine_git_object: 2b1d991f1b5636bcc3ccbbd153a5427df1ed7f5f src/main/java/com/gr4vy/sdk/models/components/DigitalWalletUpdate.java: id: 6d08031e24f7 last_write_checksum: sha1:aaf0b3cce938c65b4eae700111c839eaf2232069 @@ -3104,6 +3128,10 @@ trackedFiles: id: 6f6c6bbebfdc last_write_checksum: sha1:9bf57c13a4e510afd50cc738c7ce0a5d43d7e788 pristine_git_object: 14c5479b16efefd0d628cac37a89c7489e459d72 + src/main/java/com/gr4vy/sdk/models/components/EcommpayOptions.java: + id: 37ebf8a3b81c + last_write_checksum: sha1:b4937d0fa38ae89bf76ef0ae5fb46ec0908c01dd + pristine_git_object: 72c0f10dbd4ba85f6e578f2a1d87531b082e960d src/main/java/com/gr4vy/sdk/models/components/ErrorDetail.java: id: 0954de7827ff last_write_checksum: sha1:e6110a5218cd1aacbf6491efdccf8dfed2858859 @@ -3194,8 +3222,8 @@ trackedFiles: pristine_git_object: 4bca139f063d6d38d1ea17aca42c665050a1ab04 src/main/java/com/gr4vy/sdk/models/components/GiftCard.java: id: 25f48a4f3105 - last_write_checksum: sha1:6615c5dd1c1411e17286b52f6f28c90db737dfc3 - pristine_git_object: 7a5b104a760a44ca29261acf340042530ce07da3 + last_write_checksum: sha1:d3d091a3e84d03f8ab36abd85a1f329fcf2665dd + pristine_git_object: 86e82602250ebfd5bb1c46be7009785dd34dd693 src/main/java/com/gr4vy/sdk/models/components/GiftCardBalanceRequest.java: id: 170501161b7d last_write_checksum: sha1:f742fd871283b30d36fd4a9c99d95508f71a4efd @@ -3238,8 +3266,8 @@ trackedFiles: pristine_git_object: 22bb902298969a1e4c80ab98b0c7c9dcfbf65333 src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java: id: 8d3d3d68d318 - last_write_checksum: sha1:70fa384356d0f1be9d7c967af01b18b1621e630d - pristine_git_object: 133cbb5e0db7cb6d5015533eadf735f17ef9e890 + last_write_checksum: sha1:921416b8398acae69c37dd4df41aa2ba4c7270f1 + pristine_git_object: d0fee25a166881a1e8e6224b0bcefbbd2d70a22a src/main/java/com/gr4vy/sdk/models/components/GiftCardTokenTransactionCreate.java: id: 69591cb3fec3 last_write_checksum: sha1:f60ce0f162b92468d27326b09e313c90c04f9a0b @@ -3358,8 +3386,8 @@ trackedFiles: pristine_git_object: 9cbb1b174e9a001f1a288f7fc6e020c10e85141c src/main/java/com/gr4vy/sdk/models/components/Method.java: id: bac0c78cdc74 - last_write_checksum: sha1:e9123f39ec913187fbc27e0d3a01c68887e72cfd - pristine_git_object: 502575a193a832fdc2c600194f7f1772b9860aeb + last_write_checksum: sha1:0f8d7f4cec70922538c2e727d072078bd42cc702 + pristine_git_object: e3fff663ce15a2ad30b0d38dc1d4c263989018ce src/main/java/com/gr4vy/sdk/models/components/MockCardMerchantAdviceCodeOptions.java: id: 98c8ae3757dc last_write_checksum: sha1:6a077d4085feed412a73ec009f00361376631bde @@ -3370,8 +3398,8 @@ trackedFiles: pristine_git_object: 03ba74b20d759cb3efdaa3eadef352ecb4ea7a06 src/main/java/com/gr4vy/sdk/models/components/Mode.java: id: aa81f9780add - last_write_checksum: sha1:7a42898c72d83a4f6d7e7e98790aa8220b4ae5d4 - pristine_git_object: 3de5e25a48df2f9f86b18dacd87c3f95a9e86d31 + last_write_checksum: sha1:811b93df33ecb7be9c4d89d85f87bd4ab0be59cf + pristine_git_object: a43785955277b8aa4f6cf3c9d9c7d35546046ea1 src/main/java/com/gr4vy/sdk/models/components/MonatoSpeiOptions.java: id: 80ff9d00daec last_write_checksum: sha1:a8b7a05fa9dc4f0c88162ebf177ddb557007a538 @@ -3442,8 +3470,8 @@ trackedFiles: pristine_git_object: 72dfa17248a40993f2f017a16565f99eba49b706 src/main/java/com/gr4vy/sdk/models/components/PaymentMethod.java: id: 4b44443c9440 - last_write_checksum: sha1:13ef9cd1e88714ae240df9c0882faf662524b1a5 - pristine_git_object: 3c2de72345fe29bec918d18c23e77179f62fec77 + last_write_checksum: sha1:8e17fd7825fd32ae085c0db6e3b6bee3c12daeb0 + pristine_git_object: ae60e7c67d66507934452e5caa9d40af1e713854 src/main/java/com/gr4vy/sdk/models/components/PaymentMethodCard.java: id: 7d31b39bd878 last_write_checksum: sha1:6d50913816fd6da65a90385474d5420374ab4fae @@ -3466,8 +3494,12 @@ trackedFiles: pristine_git_object: b9570ceb0d90294a19daef3f21e03d01bbd882d6 src/main/java/com/gr4vy/sdk/models/components/PaymentMethodSummary.java: id: 6e15736ab46e - last_write_checksum: sha1:fa5e7f83644719dfc200c663a8eb0ccc129f6592 - pristine_git_object: 677cdfb6c8e3614b44b9eb534e4ff6edaabc9f5a + last_write_checksum: sha1:3c80950cdeb5ee6a17504a80babc427abfd97531 + pristine_git_object: a1a24cb0125d185603016cf6d8fdaf8682038f81 + src/main/java/com/gr4vy/sdk/models/components/PaymentMethodUpdate.java: + id: a57af21549f9 + last_write_checksum: sha1:d7da94188f3fd8ce200fc6d41e0f4b467d14b7a2 + pristine_git_object: 73f6d4a829a61508045fe21eeadb3fffd058230b src/main/java/com/gr4vy/sdk/models/components/PaymentMethods.java: id: 5132f4969fd6 last_write_checksum: sha1:2659295b3132214322133fde95499f62adecb54d @@ -3622,8 +3654,8 @@ trackedFiles: pristine_git_object: 2408d5886f65783ef40c40eba3b988689d681dcb src/main/java/com/gr4vy/sdk/models/components/RedirectPaymentMethodCreateMethod.java: id: 3789188383b7 - last_write_checksum: sha1:a5ed2633a741b9515ccce4b0bafb52b0990944e5 - pristine_git_object: b72710c277775d6110eafe0f22c447dc30ec5ad2 + last_write_checksum: sha1:d48a8a7919e9726ed66caa22b78872d2e541d4c5 + pristine_git_object: c8f901a7d04888706dc8f7664e0aa5fbbbe0ffe3 src/main/java/com/gr4vy/sdk/models/components/Refund.java: id: 4b22e399807b last_write_checksum: sha1:5eaa1a0ee2ce08ecc2418ad530694865868c0917 @@ -3914,12 +3946,12 @@ trackedFiles: pristine_git_object: 0a47fad3846506a7cbb30ea1f85895f6403e322d src/main/java/com/gr4vy/sdk/models/components/TransactionConnectionOptions.java: id: 31501e4506f3 - last_write_checksum: sha1:2c365d6de602bc1beb91cd3c0871906f6fa76244 - pristine_git_object: f760ed26989f134a36edb28b2d538b0424e1a819 + last_write_checksum: sha1:c63accbd3a257bd24e71af07edd85101eb853e8c + pristine_git_object: be492c4e7c6ef592f1037916b4df57ef68838a76 src/main/java/com/gr4vy/sdk/models/components/TransactionCreate.java: id: 85da9dd45d8a - last_write_checksum: sha1:09f92bca972295f8156fc778049a61baea617409 - pristine_git_object: 4df299785f5d777f5fd43a1972d13e19f04efc70 + last_write_checksum: sha1:621e0def8f33d8c05ce2fd66a9050fcbb2065c58 + pristine_git_object: 3aea339583d1ee69c52dbc387b795aba1ce8fce4 src/main/java/com/gr4vy/sdk/models/components/TransactionCreatePaymentMethod.java: id: 1e1a35522446 last_write_checksum: sha1:9170e1b6bc2e97753ba3341486a3d8731e475d89 @@ -4206,8 +4238,8 @@ trackedFiles: pristine_git_object: 075c691dd569808aa749e32b8999ba2dec65d114 src/main/java/com/gr4vy/sdk/models/operations//async/CreatePaymentServiceRequestBuilder.java: id: 9291abcfc44f - last_write_checksum: sha1:e51650c56580c819d8db4a681f5e107d940581ef - pristine_git_object: a5fdd2c2c81b42a10eb26eb637ec5e4526e40938 + last_write_checksum: sha1:29712e1c8bf89c01cd85636e0c7e244e500abd27 + pristine_git_object: e51b7350cabbff14c87db794c97dc76d4587421e src/main/java/com/gr4vy/sdk/models/operations//async/CreatePaymentServiceSessionRequestBuilder.java: id: 2527c6a4f18f last_write_checksum: sha1:59fb028d986f9968b0427b3f6dccf87b2e94034c @@ -4370,8 +4402,8 @@ trackedFiles: pristine_git_object: ae94d2eeedc708ff6b43db16061c77415d695b56 src/main/java/com/gr4vy/sdk/models/operations//async/ListBuyerGiftCardsRequestBuilder.java: id: b5a6bb4cc5aa - last_write_checksum: sha1:b80554bc82776a5940da23b4704673c7c2aa1d63 - pristine_git_object: 16c8addf78a4207af795fd764af140f08ce7e324 + last_write_checksum: sha1:654891ea47cff6e940dbb93f16de89ecaa03ece4 + pristine_git_object: 48c477865a80e4bc7d670fd353c6e89aa99922c8 src/main/java/com/gr4vy/sdk/models/operations//async/ListBuyerPaymentMethodsRequestBuilder.java: id: 71abb975b4c5 last_write_checksum: sha1:859c4d0672cd8d51a964460d7c39376e1ad420af @@ -4508,10 +4540,14 @@ trackedFiles: id: bac16307b8d9 last_write_checksum: sha1:11bd566df1aa942f57e1366ced90b1c2b3aff3b6 pristine_git_object: fbf69c6a80d392f688649e14d321a24b4c4ff34a + src/main/java/com/gr4vy/sdk/models/operations//async/UpdatePaymentMethodRequestBuilder.java: + id: 8bc7241f0d5e + last_write_checksum: sha1:71d64a2365ce28a56f86aa80ce0dfa0c302c4317 + pristine_git_object: 1ba7d9bdb67aac13cb205036048c03757a7b744c src/main/java/com/gr4vy/sdk/models/operations//async/UpdatePaymentServiceRequestBuilder.java: id: ffa552f0a351 - last_write_checksum: sha1:1618753870c5eec43cfa2914a121b0511e27f40a - pristine_git_object: 26bf418798579d7f42756cd0e0168ec2ec65fdac + last_write_checksum: sha1:4f9fc2a4f0c9a62f33570016cdc2fa83222fac57 + pristine_git_object: bb5ffd0b839217101308d341723da46e349de138 src/main/java/com/gr4vy/sdk/models/operations//async/UpdateReportRequestBuilder.java: id: 2534794fbf9d last_write_checksum: sha1:6247804a45038059fef2ab0115837c76eabe21bf @@ -4770,12 +4806,12 @@ trackedFiles: pristine_git_object: f0a84f319b298ee2a1083de41db8863566df2be0 src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java: id: 775a120e73f4 - last_write_checksum: sha1:1aa6609e00d14eb03b0dd948908448bc4d7a2357 - pristine_git_object: eb7cea785801a3629cdb3cbf36a28f389ad41f67 + last_write_checksum: sha1:a4d45b76f866f895611180248f358d630481f0be + pristine_git_object: 20e75ca99fcedc53e8e1ca687cf1c7e0a4cf7403 src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java: id: d922d19676bc - last_write_checksum: sha1:5be186a8d5b321b16faeaa83e2f2d08d562aa65d - pristine_git_object: ea83699505878679c6c1d45dfd2723f80ed77fd7 + last_write_checksum: sha1:46ebe4472695c5ac49be299f3f30c6cd5402f7fc + pristine_git_object: e9c3cbdb4f423a68e84b366d893e125f5097785f src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceResponse.java: id: 6721beb06835 last_write_checksum: sha1:83e038d05c6c0fc6b8b60f50e5c1996c1740b21c @@ -5260,22 +5296,34 @@ trackedFiles: id: dc5ff8cad220 last_write_checksum: sha1:9535e80f57a1020d99648f1efe3d6e5324f36f0c pristine_git_object: 678126326158059f6a08333aff9533e550986b5d + src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsOrderBy.java: + id: 9abb7d6b678b + last_write_checksum: sha1:0a5ae22c2320d7b94b995d60d9bf472ac6a5363d + pristine_git_object: a9d23b7ab5a55808c3ef4b57e2881aede83733af src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java: id: d259dfc1aa42 - last_write_checksum: sha1:5c1d25da539f3a3e0f3739a86b35b41e5404bfaf - pristine_git_object: eb52251e4f436c0fccc6450c2699b87020159b69 + last_write_checksum: sha1:d259816495e4de9c816adbc90227347e74956e74 + pristine_git_object: aa9680fd614fd067ee2263dd3efac04b484c1222 src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java: id: c2a573d67f95 - last_write_checksum: sha1:b0be6a2dd670c9f89eec41b06ee2ffe6e4565306 - pristine_git_object: d2f79cb9a65d9742355e6dabc4b536d6c36e17a7 + last_write_checksum: sha1:42aaf551a8d98dd475f89b18183fc775a4472377 + pristine_git_object: de3af577b0d050087067a180d59f58b9d80e5944 src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsResponse.java: id: f260a2dedf3b last_write_checksum: sha1:96b71bdf26d8e2e9dc25fa8264de2e6e0b95a357 pristine_git_object: 9e6b85d4cfd7f82a3940b8400548e43af8fde31c + src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsSortBy.java: + id: 5b2b445ed23a + last_write_checksum: sha1:4cb68e5a94a668f3bdfcdd776ed89f09aa2c8f3a + pristine_git_object: c50645a1ec4467d467b66e8de935fe398126d0c1 + src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsOrderBy.java: + id: ed22c4c6447d + last_write_checksum: sha1:6b54ba1caee80ad3ab416a7e52574c60f0d6d5ba + pristine_git_object: c90f30f2976181eb0ed96b4e063169c7ee0cebb4 src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java: id: 304558b40e84 - last_write_checksum: sha1:48bf9baa3149a2ca3b6f53480057d713887f2a6d - pristine_git_object: bade75f04bc5edcc0c03abd1993a4b85495b9376 + last_write_checksum: sha1:b126deee2de4205c596fd86a911eb27d049a8f64 + pristine_git_object: 869fff4b9bea3e79c7bdb5081272249a14793771 src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequestBuilder.java: id: ea2f7ae74d53 last_write_checksum: sha1:4c95b1e45322e466e50bf64c1457ba65ac9e02b1 @@ -5284,6 +5332,10 @@ trackedFiles: id: 7bacbb23b936 last_write_checksum: sha1:89e1fd3641ca479abdf8d8017fd7cc72e4e851f2 pristine_git_object: 24523aa4ab3c173e884641194a039271c21db234 + src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsSortBy.java: + id: d3476f2d4319 + last_write_checksum: sha1:a1d5f2d7063e4cf23dbe56fd175b8ac7f522cd45 + pristine_git_object: a8dde9891993fb76cff4ef3202938b0ae09d05e1 src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequest.java: id: 1dd642299e1d last_write_checksum: sha1:eedb9db3d34746fcccbd1f4493b3fc0d4b9f0830 @@ -5560,10 +5612,6 @@ trackedFiles: id: 54ad9f93ab98 last_write_checksum: sha1:861edf927c8aefbdbf5222888f519c27b168c643 pristine_git_object: 1a42eb68713c7d12e890a7b1e606e2bce5a0867b - src/main/java/com/gr4vy/sdk/models/operations/OrderBy.java: - id: 0d3a1a2a3fce - last_write_checksum: sha1:465f9aaf8ac2d734e8e3b20b7254686eafb12bf0 - pristine_git_object: c953aa9ba5eb1acc06759de1e6561fe19fba9a01 src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequest.java: id: f2133fb1d925 last_write_checksum: sha1:df8a45a5ab9d9fe1292615a9d0b91402d6137abb @@ -5596,10 +5644,6 @@ trackedFiles: id: 7a8ad16b7d84 last_write_checksum: sha1:07d840d92d759de4cf271c7eebb0ed54adc305e3 pristine_git_object: 047aae141ed33b8ac662a6223ad7eda757d9d7a1 - src/main/java/com/gr4vy/sdk/models/operations/SortBy.java: - id: 75a522362ac9 - last_write_checksum: sha1:639953a87951339534a676c0874d24dc922b32f9 - pristine_git_object: e67dee67131e0d59576eba3ee1a534220f84f541 src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequest.java: id: 3ebb3d290cfb last_write_checksum: sha1:45e1b6b9451a8eee4e8616a52dadff462640f4be @@ -5696,14 +5740,26 @@ trackedFiles: id: 088286d86b7a last_write_checksum: sha1:8dd20eac43fb910ecef6daec5e89d91ecbac023c pristine_git_object: d82cb46e993510aba2c2b6721bafc8f174134cac + src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequest.java: + id: 733a823386e6 + last_write_checksum: sha1:94937f49c164010a5d4a6c174b3db595bfc3c76a + pristine_git_object: 65a70abd5537e4dc1c17cc1fdbf213a75c8ab54d + src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequestBuilder.java: + id: 4fee169c0626 + last_write_checksum: sha1:0f2ca7f7e0bb2b42b9bc261b56090d02df148e7f + pristine_git_object: 2710c053e0bc6206d7e5dddcebdf2e925d703d70 + src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodResponse.java: + id: cff41f9131f1 + last_write_checksum: sha1:8f0b4b59649f7d0c4aa3dfba661edd44bec2acb0 + pristine_git_object: bea3e7e62f5d5d999ce5050a3c8d7dddc32c6bdb src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java: id: e863817f330d - last_write_checksum: sha1:30bdb76b96295b0bd35b97d48791a51898c60bd5 - pristine_git_object: 16a1e120f4c9414a70ce57abe8af2b04a8193ad3 + last_write_checksum: sha1:86e69091de30fab803d301819a4c5e0ee2f8b979 + pristine_git_object: a71a3f6d979dc023677ee977b4151644107afe48 src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java: id: f84226aed9b4 - last_write_checksum: sha1:4bd1c720df8486e4084075b2ec85c52e07e2fb30 - pristine_git_object: 68b5866fc168bbf8424abfb0bf15382f461ad6cd + last_write_checksum: sha1:1524c2cc81924c95277d2d5f1966f42b0be3628b + pristine_git_object: 03b23fecfa7f25f3fe670b73931bb4b67ea1ca4f src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceResponse.java: id: 8f834df1597c last_write_checksum: sha1:f390daeb4a8554ebeb85dceae75004e417b4fdf1 @@ -6152,6 +6208,10 @@ trackedFiles: id: 8f6ed02f2244 last_write_checksum: sha1:fe056dceb63221b366b96efde773465ea368bc40 pristine_git_object: c1ea21c1e8528d5b92638d9e9c71c5eb30a24f3e + src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentMethodResponse.java: + id: c13326667f23 + last_write_checksum: sha1:5eb03df45445c0ae5b98c33db579d3638e10e0ba + pristine_git_object: ea747df6147032d3380c09a4299c06db2b68c9d5 src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentServiceResponse.java: id: fc58595753bd last_write_checksum: sha1:6fc08367ec9b8f45934551959ec14f92c01f63d4 @@ -6178,416 +6238,420 @@ trackedFiles: pristine_git_object: 7c9b9291863e63386f53d03ef0940a83dbda8b53 src/main/java/com/gr4vy/sdk/operations/AddBuyer.java: id: dba293f0bbdd - last_write_checksum: sha1:dee35cebfa6684cedd6baa973be7143b2ebcff7e - pristine_git_object: 10c4ac73cc7b19de49d87ecf433c593c22153fd6 + last_write_checksum: sha1:9d46d1c350698b9e237fe929a0450fa791da7c82 + pristine_git_object: a0ff4bef252f2fda05f7139e266639c46faf6908 src/main/java/com/gr4vy/sdk/operations/AddBuyerShippingDetails.java: id: 2a65db4dcfaf - last_write_checksum: sha1:0291d969a9a354be15ec491641fe0de4d7a323d6 - pristine_git_object: a2da5022b6af839c53e6094256fde211f4bbab88 + last_write_checksum: sha1:e2dea4bef118616d4106f39464ede169b4f98b2d + pristine_git_object: 2d70670980a35bb2097d7ac3fc3d2fd24867f8f9 src/main/java/com/gr4vy/sdk/operations/AddPaymentLink.java: id: 3f1c5e56af7e - last_write_checksum: sha1:34bcefa5c724063903af0dfffc0d52263ed0c212 - pristine_git_object: cc571b059261174ffa0fad972369f5fa4b3da314 + last_write_checksum: sha1:542f70c1750d9c513872db0340eedd813165ad17 + pristine_git_object: 928b1bcf272a941b98054c6a0ea7fd3d07dec130 src/main/java/com/gr4vy/sdk/operations/AddReport.java: id: 4b664cc66173 - last_write_checksum: sha1:1c583d4d39e851d5ba3ae0081f0cca6824469a37 - pristine_git_object: 7ab51971772b153b753043ac81a5381fe42fb757 + last_write_checksum: sha1:4f602a17295f65cf0bc757fba34f6ef20b9e3baf + pristine_git_object: 4c31647eea173dfc6ce4099fa9601d87f4a52d72 src/main/java/com/gr4vy/sdk/operations/CancelTransaction.java: id: 17362e75ed71 - last_write_checksum: sha1:6f24c1c18b0d745f02cc31d2540a3a518ce38d7e - pristine_git_object: f06e2ae47a51b9e8e623cde429c8048eb3d912af + last_write_checksum: sha1:36b64eba7900b7f2fd39a9d23bc29f5cff756046 + pristine_git_object: 9326a9c4cecab93445b6a6fd8d533cc201712cea src/main/java/com/gr4vy/sdk/operations/CaptureTransaction.java: id: 925d2b8fdf2e - last_write_checksum: sha1:160c7226fe5c4278d0c4a05c92a3ba9261a29aa6 - pristine_git_object: 60062944955d9684f9b4e1e86ec81d8aebe68e71 + last_write_checksum: sha1:318ae5044c68e784fcee6adae4ac0975e3d7869e + pristine_git_object: 889f0dc1539faa6296e7e1cb2cd62d7ed2ad1420 src/main/java/com/gr4vy/sdk/operations/ConfigureDigitalWallet.java: id: 46138e27f149 - last_write_checksum: sha1:d4eb2e3043fb9515366aaf8c6eb04c04a766f7a5 - pristine_git_object: 17f4dcaa5521a97a7bb81f606ebe0e4a887836f1 + last_write_checksum: sha1:55f6ca58f6284a2d2169cad1530ee6e14faf6260 + pristine_git_object: 3cedf536476c845df4b4e501cd990716ad96d3f7 src/main/java/com/gr4vy/sdk/operations/CreateAccountUpdaterJob.java: id: 628227fae97f - last_write_checksum: sha1:18c2fe44b81aa786f5fbc7773a0c49aea9d7ed01 - pristine_git_object: eadba37f9b19d9ba04009446ac4ef9c9f6235207 + last_write_checksum: sha1:03fe069e7263fdcf9f8ded14409e051e4e72313a + pristine_git_object: 5ece16aeac0a622c9651a57e72c713f9af2d1e90 src/main/java/com/gr4vy/sdk/operations/CreateApplePayDigitalWalletSession.java: id: 58821b850fec - last_write_checksum: sha1:b91bc1b0e7def92935e37169b6cfd0538655e685 - pristine_git_object: 24c6fa36ffd8177dc3c615b3adacfbadb475583c + last_write_checksum: sha1:a862868d66ec75335c0716a42d601e7de77c95a2 + pristine_git_object: fa7c2c0791b12528e7cf88ef54788efe4e330c37 src/main/java/com/gr4vy/sdk/operations/CreateCheckoutSession.java: id: 0ead94e7dbf9 - last_write_checksum: sha1:461f3d55338fbb3cd6e43563f678c79ce26c9f65 - pristine_git_object: fd1205b14e6ed6626299a5d875f879dbfcba0167 + last_write_checksum: sha1:fcb38a10a2994bd2a1cd5c0d980b16ee193cb595 + pristine_git_object: 6a89dfaa26e3b781a58d44b849a840487f21c42f src/main/java/com/gr4vy/sdk/operations/CreateClickToPayDigitalWalletSession.java: id: a77afe5d40f4 - last_write_checksum: sha1:6a84adcbfea9455ea01f8fd6ec3bf3314ab35d02 - pristine_git_object: 564fe300ab31cfebf03bedabf9cf83c9c8371f1b + last_write_checksum: sha1:37503cbab05806e4c6b4e294ca03219a63532b8f + pristine_git_object: f95bbbdc2a38eca70f0787216e723b64768ee59b src/main/java/com/gr4vy/sdk/operations/CreateFullTransactionRefund.java: id: f5764d3d54b9 - last_write_checksum: sha1:c8c06ee13f33e6107dd9bff2f25853c588333c17 - pristine_git_object: e646c029c45d1975b29e868734c0e7fe3cb01e8f + last_write_checksum: sha1:00c8879198b045bf212fdbbb4cc7f8dc8c75fb60 + pristine_git_object: 52ed8f32add72675e5f6626e79d129fde3fd9c8e src/main/java/com/gr4vy/sdk/operations/CreateGiftCard.java: id: 57c5e58a5b9c - last_write_checksum: sha1:8e5232186dff6345b0c92445cfcce94edac346cb - pristine_git_object: 1a9cb4826edb9d4b8427bf0da83d6c9e07295cb1 + last_write_checksum: sha1:ddc1d842585a8d0db0a8abd43424ce899d8881ec + pristine_git_object: 6d32a32fb22f2983ecb68285b3916f0ed7934b21 src/main/java/com/gr4vy/sdk/operations/CreateGooglePayDigitalWalletSession.java: id: bd1b74caf1a5 - last_write_checksum: sha1:ba6e8334e361011b2b2a810eb3b51ac3acdebf36 - pristine_git_object: 13ff9ac3375a0e01619523e5700b14143cbe6432 + last_write_checksum: sha1:aaf67e02b4d6b8cd363cb5a04012692508ece54d + pristine_git_object: d5dfd2ef872cda9de3e567e74b32dcef3cb388e0 src/main/java/com/gr4vy/sdk/operations/CreateMerchantAccount.java: id: 7f9eddacabfe - last_write_checksum: sha1:892843c7a00a4f5b644b15b84ca4a092df16439b - pristine_git_object: 78cecff5da82664ef392b2609c567c77502942bf + last_write_checksum: sha1:397b4c4784411dc07a2ef401d1601d89987827c1 + pristine_git_object: 6426d3eb9e106c0eeebee388ef3c1a9139643da2 src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethod.java: id: f1f0eb1b6d9e - last_write_checksum: sha1:d40fe433c9c1987e350d6cbd6907b6cd6944f1b8 - pristine_git_object: 8ef89119d4a8437fd109abb14cc2a4ff1752c6c5 + last_write_checksum: sha1:ab3167106cd091a688f2df51b4454527b769be26 + pristine_git_object: 8f2b6a52a74f65e5f0063bfc29c91ee3197e2c9d src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkToken.java: id: 8f195c58b5ee - last_write_checksum: sha1:baf7af9e8f2452ec40004680e426b3709d839675 - pristine_git_object: 1bb0c8433f8fd181c0bcc84b67e23112347825f1 + last_write_checksum: sha1:926583f97c5fdbd17f86b51a9767e84d09987301 + pristine_git_object: d1214ce18d05d73d39db816f170b38edc1967df3 src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkTokenCryptogram.java: id: 632859b43065 - last_write_checksum: sha1:76daddd4178d7af6945f88362678685f004a1e51 - pristine_git_object: 125a2ab6d9b57f59330bdcca5acd225a057237d5 + last_write_checksum: sha1:ea455481f4a19c64ac9c1867d7b422bcea45705d + pristine_git_object: d7019fab0ec3dcc16bf47a33cca13a0d75a501ba src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodPaymentServiceToken.java: id: da3138d2d759 - last_write_checksum: sha1:69f9267c1ce3b0e6d1bfd0af7bca9cb5852c13c2 - pristine_git_object: 0c4a4828c54d4f4c8f9d357e9e7383bbd53348eb + last_write_checksum: sha1:2dea39de765a14ad95013a955bce66fb22baf40e + pristine_git_object: 5743cdb9d84fd307775892111ba1e3ec8b6ca9b8 src/main/java/com/gr4vy/sdk/operations/CreatePaymentService.java: id: 24f1dbe10f15 - last_write_checksum: sha1:294d847da9320da7c472397ccab92d43632a5588 - pristine_git_object: e35060cd166fc82fa0fc88560ff3b8ac4f236c05 + last_write_checksum: sha1:7d978cd20019aff24e502349c5a582d6bf6baa53 + pristine_git_object: 2769f3b8bc482a4fda1665992b154c940da1c68b src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceDefinitionSession.java: id: 9980eb9067a7 - last_write_checksum: sha1:a5e42cc998bad92bac7e1ef410d094f8f5311278 - pristine_git_object: 7e4a9a9ccc3612e48df1e0e695152cc683639e9a + last_write_checksum: sha1:017243f7ddf698f7a3c8b303fdbfb5d09b5f7866 + pristine_git_object: d907a20168b95dbd91bef665e9627a9202088336 src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceSession.java: id: c56aee3cf173 - last_write_checksum: sha1:d44d8b7a1295337805ed8584a76e771e6b973740 - pristine_git_object: 3958903d67c31f5fb777cae3ee5a6e1006541722 + last_write_checksum: sha1:872d17e0680580d82ba60adbcf719d830fe3822c + pristine_git_object: a7a18d48c54a27fe90733c723421311d2280b6bc src/main/java/com/gr4vy/sdk/operations/CreatePayout.java: id: ea38c33cc693 - last_write_checksum: sha1:a8d18ad2a8f4b20db54adb8b6ef56947206fa6d1 - pristine_git_object: 5ca7130d01ffe449f752f6d4e7099cc75002ec02 + last_write_checksum: sha1:734218dd2bdbf212bb9ebaa78dd78f61019af3e8 + pristine_git_object: ae8b10887a6375c94b9ec27566b0e4030f377d10 src/main/java/com/gr4vy/sdk/operations/CreateReportExecutionUrl.java: id: d4d367c62aea - last_write_checksum: sha1:b66373a8d2e9a51ad7c25182e94ede6a4345cee6 - pristine_git_object: 551ae7e8ac1247bf2cb823564338eeda12db448d + last_write_checksum: sha1:87b4a34bb02d7e61b98df7e97a38cf94c8d89077 + pristine_git_object: 6225435777f3218a5f3ea5001d318fe02aebeb04 src/main/java/com/gr4vy/sdk/operations/CreateThreeDsConfiguration.java: id: 4a8bb674fa79 - last_write_checksum: sha1:bcfc1fcd91b6d6a588b2809deb29a49686465d8b - pristine_git_object: 13fe379d3644a9714991c8e5556536c0c5aba138 + last_write_checksum: sha1:293c96b54633c306b1afc095e2619c5839bef9b0 + pristine_git_object: 46425ed9530f07c5f0642b1fa6f63346e58b59c8 src/main/java/com/gr4vy/sdk/operations/CreateThreeDsScenario.java: id: ae5c2c7524df - last_write_checksum: sha1:b8d234442c28416e3b321a7d178bc3b6afbb55b9 - pristine_git_object: ba08b703859c9ee20d0a3e3410344d7c6604abb9 + last_write_checksum: sha1:0589abcb1555ca92a8c4f9005bc275f9f5640750 + pristine_git_object: b6938df43374f93bcf7e17b8b44a090390b320b1 src/main/java/com/gr4vy/sdk/operations/CreateTransaction.java: id: b4c64190049b - last_write_checksum: sha1:10593483d6c27dd1901d22554302bda42f55499d - pristine_git_object: 94deb7e29c365396efc2de32f75b93d37a1c97f4 + last_write_checksum: sha1:1f10262de03854a7316fc2f88280492482e46dba + pristine_git_object: 82252ec273546d35e648b2cbff147340b7067d82 src/main/java/com/gr4vy/sdk/operations/CreateTransactionRefund.java: id: 50262a947d0b - last_write_checksum: sha1:28b6c2c6b569ce28ab2b1184320070fba9f29848 - pristine_git_object: 7390505de3b8b91924b06d1c2efc6711706e6011 + last_write_checksum: sha1:6ab28333a9c140e2d69b38a50c2351c9f16041db + pristine_git_object: 796ce9d11baf7cec58b34a98c3dff07a4d904643 src/main/java/com/gr4vy/sdk/operations/DeleteBuyer.java: id: 16e881627fee - last_write_checksum: sha1:efd63d49fcbefb622338c622f8031bd6d4cfcea8 - pristine_git_object: 26c9275297151ab851b8d4d86dc3cb7e511ad031 + last_write_checksum: sha1:b99a185c83c9151a4191a77f49c1ee90cec39c04 + pristine_git_object: b8ebdf6cb74f530c40309d9f8417724b3ad8e256 src/main/java/com/gr4vy/sdk/operations/DeleteBuyerShippingDetails.java: id: dc1af326d9a9 - last_write_checksum: sha1:7a838928936fd6b942e6cf67e272ad234865ebd9 - pristine_git_object: 14d93f33d646b75e53bd4f2bdf04d3689714e6dc + last_write_checksum: sha1:0eabc3daef608d54fc84957412669f49bf16a3a8 + pristine_git_object: 8bdcc6b7cf9d2547952e5041644d6f3339c3137a src/main/java/com/gr4vy/sdk/operations/DeleteCheckoutSession.java: id: 9b4afe723f6c - last_write_checksum: sha1:93bf38299f7e1c9b6ff4105a7477dbce40e183be - pristine_git_object: d44be7354d05e37f615e1a9eeb036a4bac4139ac + last_write_checksum: sha1:3dec67f96d163ed0e54730823c5b0a9b947ee979 + pristine_git_object: 07e78257163835335c9a44a6f2bcbe986850a9c5 src/main/java/com/gr4vy/sdk/operations/DeleteDigitalWallet.java: id: 9d9ba153b8c6 - last_write_checksum: sha1:21c0dbb37fd69ed4b233c1edcff800875cf6793d - pristine_git_object: 9a9b01c74a8fcc7dfad6ba231f6232233cb3a90c + last_write_checksum: sha1:2d6098a4d89dbf3920582aa38c18dd117c2a7162 + pristine_git_object: 81519d49b82d8ab5529e2726cb284ba2e643aa53 src/main/java/com/gr4vy/sdk/operations/DeleteGiftCard.java: id: b3144834c38e - last_write_checksum: sha1:e9af145ea0c92a6c53d1b02a7b18172026a2b35e - pristine_git_object: ed710ac059a429b3c4727b76aa17b1b1884db8db + last_write_checksum: sha1:3af77650dbe270e51064911016a9cf2dd77f9a51 + pristine_git_object: 6232056f3dc8c158f7714634b1604548322f5514 src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethod.java: id: 9afab4be3986 - last_write_checksum: sha1:126919494be6964664cbd2c8105072cb137d7f35 - pristine_git_object: 849a9fa24c540a67a778918c9154bb74898e8c10 + last_write_checksum: sha1:3927ed6df8d95ea7ee729038be303ee71bfa5724 + pristine_git_object: 477caa05bc032e4b77f767cf872a7d8b0c74b912 src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodNetworkToken.java: id: 9f393eb411ba - last_write_checksum: sha1:721b2d6b5848a95b28eff47db104249a9ced2b3a - pristine_git_object: 7d0f1aa3874e4f6a12b700fa170b313d361f9c86 + last_write_checksum: sha1:25c1e661667fc5b265d299e40b2542f8ec859802 + pristine_git_object: 46ee79b86f26f9b248cdd8c6d79b7b0a9cfbc148 src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodPaymentServiceToken.java: id: 5bac85a0de58 - last_write_checksum: sha1:65a77af525a3d55bb1cdc3874084042b49ae8dc2 - pristine_git_object: 84774adbe804273b002c85f58b6a6b55b23b42cf + last_write_checksum: sha1:71a4a3dfdad04800d3d3c07b30b391997257a886 + pristine_git_object: 6fd734d461fc62a4fa5dee2a7166a2fb23c9da70 src/main/java/com/gr4vy/sdk/operations/DeletePaymentService.java: id: 29baf1194ca6 - last_write_checksum: sha1:955bf515b24722ccc8863fef5bf55724ab8e0d0d - pristine_git_object: 125f7d02d3f419cc9ea18768a27540a13dd48894 + last_write_checksum: sha1:d5d2fda88973c505a687ef705a4a451f2cb14caa + pristine_git_object: 8981331691e0472597bee2d21de79b5c738bf09f src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsConfiguration.java: id: bb04dd3e6c67 - last_write_checksum: sha1:6c40db1e342ea3f86cee325314e2f7a7ef531632 - pristine_git_object: 423a9c121bf87ad5bbda0226c671d26d934c4431 + last_write_checksum: sha1:d7b4cea0c3111b0ead23ebf8d0fa6dfe16224701 + pristine_git_object: 1232246583d45f13a6bdb712de58646e85f4838c src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsScenario.java: id: 26b2146ea74d - last_write_checksum: sha1:9e302a276cb868c9cfa89d6852b5356cde9e4f62 - pristine_git_object: 7b3a92b7037916c0ab55dc3f5444c5c4843d480f + last_write_checksum: sha1:2ceb52a806fde05b9bc3ee45070ddcd613af5fdd + pristine_git_object: cfdda5268de1becd92f9c240758178f4bd34e797 src/main/java/com/gr4vy/sdk/operations/EditThreeDsConfiguration.java: id: 313784ab5a4a - last_write_checksum: sha1:087694d721a56d2230d2b1c7148b6bbb5cce2562 - pristine_git_object: 6f676c1f7377f04d36fb2e0e5c6b8c93bc5ecc73 + last_write_checksum: sha1:17a4f3eb8f57a5f03dedc87e6454d6effe7545a8 + pristine_git_object: 56a92e7f83405eec8460b3f54e58930ddf78f448 src/main/java/com/gr4vy/sdk/operations/ExpirePaymentLink.java: id: bb85b2894295 - last_write_checksum: sha1:9a75e51ea2e4093a7681c28b4e210815c8268a78 - pristine_git_object: 85958e6953cbd62b4995d0ea8e3c3a0e1f51131f + last_write_checksum: sha1:11f846abce0351f54df8496dca4f834c93dabb23 + pristine_git_object: 8cc4806506a481524a7cc4e73c82f9710bb63896 src/main/java/com/gr4vy/sdk/operations/GetBuyer.java: id: 66471a229a50 - last_write_checksum: sha1:6dc464df2717b9af4e320151650cda20ba965af1 - pristine_git_object: 016d9e0736f4ffbcefe8c27fba8924ff82a7c567 + last_write_checksum: sha1:6eb63497501eca748d457dee2e58a9658095b415 + pristine_git_object: f474480503911796d3539d7f6baa4b93f1334731 src/main/java/com/gr4vy/sdk/operations/GetBuyerShippingDetails.java: id: d5f2e8f2975d - last_write_checksum: sha1:10abc82ff6b89be36f3d979ef73f7c4f9922d762 - pristine_git_object: c69f05444df8526d8fac1a2011d596241e97e6f5 + last_write_checksum: sha1:964b8dc8b2786ce5dc36f9d948689132364966a6 + pristine_git_object: e7d99690b0831e25bd8b4c71d47230ad1f2b8fe9 src/main/java/com/gr4vy/sdk/operations/GetCheckoutSession.java: id: 62cf047324ec - last_write_checksum: sha1:67cb35b234af850471ea8edb7ec0c937bfadb395 - pristine_git_object: 0f0cdc4e1094d9ca0e71395d60fa25f28f04c67f + last_write_checksum: sha1:5415b345b8f78fd887618c997c2e92542fa05610 + pristine_git_object: 41355636473f1bf9702489a415e3536e014cf08c src/main/java/com/gr4vy/sdk/operations/GetDigitalWallet.java: id: 23c6be53e4ac - last_write_checksum: sha1:9fdd5984050c1b6137c7ee9d6a7dad54e79b137c - pristine_git_object: 9204004e0fb7feabc8207bc224bdd87195829a11 + last_write_checksum: sha1:24dc36aab32b1fc10f0a8db4727d653e0acf99cc + pristine_git_object: aca7c8d38632c04b469eb807d7da0fabec655332 src/main/java/com/gr4vy/sdk/operations/GetGiftCard.java: id: bc235a7e93bf - last_write_checksum: sha1:bbb11709c9448e3713d1f481d145b424e6003845 - pristine_git_object: f46f9e0fba7f93c00ea7dc89ef8f784f6e042d53 + last_write_checksum: sha1:ec1b8b534c7c51a2e9240de148cb2948300ce89f + pristine_git_object: e88ba62d8748eed953b771f8067e9cc9ba61b354 src/main/java/com/gr4vy/sdk/operations/GetMerchantAccount.java: id: ec10bacacb19 - last_write_checksum: sha1:232f6dbf42e1062c0941d76787c75b1086ff1271 - pristine_git_object: 4014f014fa629c0996cf4f75d3abd2a0663d105c + last_write_checksum: sha1:d39cd964a1cd7588b1ae8570cf1bb47ee731c5d3 + pristine_git_object: 20630452b6f58d8570a4d5c66fb79c8897043a35 src/main/java/com/gr4vy/sdk/operations/GetPaymentLink.java: id: fc154885fb1b - last_write_checksum: sha1:8c70ec911cce498508091d602e1ab58bd9f5f069 - pristine_git_object: 7bc23d048e5caf17b3bd6d8f069c67a4c5c941d4 + last_write_checksum: sha1:89619f42b2a82848b69197615e413b07897b63c0 + pristine_git_object: 5c5be31d32729d134b8c259b9195c0740e33a704 src/main/java/com/gr4vy/sdk/operations/GetPaymentMethod.java: id: b37fd572874d - last_write_checksum: sha1:26c0069671aa3d1764b379982042257c1ad77a19 - pristine_git_object: 4ef4e3446b413c208f19e3e97c3fa2bcd368364f + last_write_checksum: sha1:168c4476aea3148833369a7600c533ee783c970a + pristine_git_object: 655496e3681810f75925e3e894f8d1be52fb8e23 src/main/java/com/gr4vy/sdk/operations/GetPaymentService.java: id: ba4cb0e4a979 - last_write_checksum: sha1:22b7e7b387e18db20d69e01d3d7e4483e733e468 - pristine_git_object: 9cd1b9251dde7a1cf17e1fab0bc2213eca8a984b + last_write_checksum: sha1:855e31df42f68337d71c2098b3fec11d98ada78b + pristine_git_object: 53fd1f301e3aef2a7d089bd68f18d88de34bdbd7 src/main/java/com/gr4vy/sdk/operations/GetPaymentServiceDefinition.java: id: 50d523ef8b78 - last_write_checksum: sha1:1cf50473a846d82bb7ee9d8ee2b3167c808d5aad - pristine_git_object: 3e3d1ac3b60bbe575e0bf79c24fc3fb2d44fcb9a + last_write_checksum: sha1:d12c02a5062ea1d182838f35c0a0f30005b46df1 + pristine_git_object: 73379c14b870600a30a3136d4ea310f3b66e4f81 src/main/java/com/gr4vy/sdk/operations/GetPayout.java: id: 199abf7a8eda - last_write_checksum: sha1:52aa69265ce8fc0ff86f29252e95e044a66847be - pristine_git_object: c7da7b676b6144583066fd5bad1bee8cfb6247d7 + last_write_checksum: sha1:18ddaa1fcf4f1465d579dffef94c6d1d85408f1d + pristine_git_object: 7628e3187a2c893d0644679720a67218b0bf5726 src/main/java/com/gr4vy/sdk/operations/GetRefund.java: id: d7f8442c8d02 - last_write_checksum: sha1:c72b1126ddf537fc9394418ffc934cd7179c5cb8 - pristine_git_object: f2cd68441d5f6942e2e72aa7a3875ce3c2096f6e + last_write_checksum: sha1:280f1d06f155b36a7418a8788d819ee2742dca8c + pristine_git_object: cc2b4619649b5a7feb2981f1510ee2ffdafb0517 src/main/java/com/gr4vy/sdk/operations/GetReport.java: id: 21aa7501bc74 - last_write_checksum: sha1:efc49f2fdbf1faa44af313be5c69da4f9717651a - pristine_git_object: 548c62563c548c0a1579d2111cd42b748957661a + last_write_checksum: sha1:99386d3d09641aa1cac210c08ce509bed59778fa + pristine_git_object: 7c3d811087263cd869176dd19624ea3fce45fb2f src/main/java/com/gr4vy/sdk/operations/GetReportExecution.java: id: 3e3e8d294492 - last_write_checksum: sha1:63d818e10d2f7df4a9ace07c10768f711da19029 - pristine_git_object: b0c4f5301ece68639eda25cc6b4ef188965d3fd9 + last_write_checksum: sha1:b405b4ad7c6e9cab9291d425a5ed80f092979d4a + pristine_git_object: 225d55409dca148c199c873bdbf43d0314772720 src/main/java/com/gr4vy/sdk/operations/GetThreeDsScenario.java: id: 06560599a86b - last_write_checksum: sha1:b785c75d1655c450f44cc7cd99c0841f337b5f09 - pristine_git_object: f62e2dc63ab4d8b63e3db7a143212ecff6dda69e + last_write_checksum: sha1:da7acd093230ecf7c9dc88836302afef6a06f82c + pristine_git_object: 97e114b6971d8b608b6b8528fdb00f24bd5260ab src/main/java/com/gr4vy/sdk/operations/GetTransaction.java: id: 0d0ee997d631 - last_write_checksum: sha1:9f6f3f800301a4ec7f357cbfe3ff445f9dbc24f3 - pristine_git_object: e990b6b3eb2f17b4a57bfede3bae438f553cd034 + last_write_checksum: sha1:75936d844786410a01cad75c61b1c5fd78b3683b + pristine_git_object: fc3692adbde51bad6ed38b2c74d791be46328d5b src/main/java/com/gr4vy/sdk/operations/GetTransactionRefund.java: id: 4090552350f6 - last_write_checksum: sha1:1e2be3dd1c7a094099c8344aa315dc07151d9072 - pristine_git_object: 92c03d618d23e80ae96e3459dd71adafc6f0206d + last_write_checksum: sha1:1b226954ef025e1d04ce04481139888b0b24f39a + pristine_git_object: 50378c2b71495f771a4289afe39c8d3fae8b3968 src/main/java/com/gr4vy/sdk/operations/GetTransactionSettlement.java: id: b34eab46d29a - last_write_checksum: sha1:b82a6c7a36e79b65991547aa1a5857e5254ae64a - pristine_git_object: 0f77f660d6ab419d819caeefb931ac64648d78cd + last_write_checksum: sha1:d21dc9eed30cb6f140ca0755805c803eb0f72fc6 + pristine_git_object: 79e114f8745e84dc46ba425c11a04ed416082b95 src/main/java/com/gr4vy/sdk/operations/ListAllReportExecutions.java: id: 95bbfb54325e - last_write_checksum: sha1:f893903d948d789162d95a6142c6aac10595fa4a - pristine_git_object: d1585bdfad515d8259aa77770e229c8f1a206554 + last_write_checksum: sha1:0b416d94081977ef4b4f0a27c27ceb5c998d7eea + pristine_git_object: 5f8f7ee267f1540cc7b1194b6f788e4b07a3f4f5 src/main/java/com/gr4vy/sdk/operations/ListAuditLogs.java: id: 1d24c5ffdfb8 - last_write_checksum: sha1:d7f8f750c2f9f2fbeb634328281270eb0d7ee8ea - pristine_git_object: d7368b09eeca9540b523ad69634e294a5d9d986d + last_write_checksum: sha1:7d9736054aca35702187b79fd50559bcca5f9762 + pristine_git_object: 464fa8ea87b911ddc4e72b5421e445fbf436b885 src/main/java/com/gr4vy/sdk/operations/ListBuyerGiftCards.java: id: 6112e4e1c6fa - last_write_checksum: sha1:c252af56f8bedf23e79427a812efd98c1d2fe31c - pristine_git_object: 073a16a7d60f280b01510b182a9cb092512e662f + last_write_checksum: sha1:9741e17fd5184d22cd842d2bf45adbd088332250 + pristine_git_object: 093285b424714328a7d238dcd2325932fab7a53e src/main/java/com/gr4vy/sdk/operations/ListBuyerPaymentMethods.java: id: 80f9170aac10 - last_write_checksum: sha1:1f83c4cb2c051ae4b2210afb71fa4d6b08890a19 - pristine_git_object: 3339ca503898b238da826f4aa11a942baa563f18 + last_write_checksum: sha1:556217ff23fa560c041117b1cbc0b2db2616ce73 + pristine_git_object: 1f506c7e6403a1923cac1cb5a68184916769ca65 src/main/java/com/gr4vy/sdk/operations/ListBuyerShippingDetails.java: id: dc707a4d3ed1 - last_write_checksum: sha1:4fa4bcde5a487946e59ce624a34c1078525055e1 - pristine_git_object: 7f7176dd966898cca4231e97eaf79325160fa8e0 + last_write_checksum: sha1:875cd35f3470ad5b779f5814c560827ff2bd02c6 + pristine_git_object: 5a954e59eb71331fef84ef08001998b1364c587a src/main/java/com/gr4vy/sdk/operations/ListBuyers.java: id: 262c1734e953 - last_write_checksum: sha1:d26ca9219776208c3426be65c3319a1f70a2485f - pristine_git_object: c80843c78c7e1903387eb0134ed036e27fc2e24a + last_write_checksum: sha1:cdb179e3179f5c5772ecdb5737b5ad4e4429938c + pristine_git_object: fcddc814269d7f6aa58cf2d782fe373b258b9d97 src/main/java/com/gr4vy/sdk/operations/ListCardSchemeDefinitions.java: id: 627451c5d238 - last_write_checksum: sha1:0462e8e4d579a5512fe0936354a7e54961651708 - pristine_git_object: 76129507434cdfe3e993cb6e18d125cf2490d189 + last_write_checksum: sha1:faaca7165acf4c6bf2735c018120883aa6f30335 + pristine_git_object: 1a515950a8a75ea62544222005c05fe06c452047 src/main/java/com/gr4vy/sdk/operations/ListDigitalWallets.java: id: 8d9ea0472e42 - last_write_checksum: sha1:45bc8a1818e723d00230d55e231009c195ab6d2c - pristine_git_object: ade998a6fa5dee2c29a180654b48c930f889c2b8 + last_write_checksum: sha1:774dde23093b6389e2cc9018f0bd7306e77536e6 + pristine_git_object: 3d370f7ea216c12400ace6dc0df842ee92a85f65 src/main/java/com/gr4vy/sdk/operations/ListGiftCardBalances.java: id: b1b8a6ae1187 - last_write_checksum: sha1:a9ed61c4c13f5bcfe4da96511de4253b3ee9aba8 - pristine_git_object: 14f2e2e42c873ea02ca1136adb5ab3d2e05e21c1 + last_write_checksum: sha1:7dc75d956c633fb0e884e9bfc002439aeea0d475 + pristine_git_object: 6e229ec7e97de146ee042cc42cc1d72a357fee0c src/main/java/com/gr4vy/sdk/operations/ListGiftCards.java: id: f84b177a0f3a - last_write_checksum: sha1:b622950e3fb838c6a829b9d71cd4f685e0e57e94 - pristine_git_object: 6c570267c15d62000a7b4edd97b932b0025e2029 + last_write_checksum: sha1:01bc9a8e28eaa15c39fdfa27b5306e9ffa019980 + pristine_git_object: 5771142033023e6914c544636c14bdb88f770e21 src/main/java/com/gr4vy/sdk/operations/ListMerchantAccounts.java: id: 1ef074bd984f - last_write_checksum: sha1:93e9627d4218ff842b7884478f0d904dc281f974 - pristine_git_object: f0365dd8a64cc8720164e18036a56a8f910cef19 + last_write_checksum: sha1:5ea29e348a7426ca2042055a72659319aa574067 + pristine_git_object: 641a56a17a25dca3cbe0cf851bfd9b91cf4a9822 src/main/java/com/gr4vy/sdk/operations/ListPaymentLinks.java: id: 3ecab5596f6f - last_write_checksum: sha1:01d5378b03e5413f5b2dad0bb8be7846d1c8b968 - pristine_git_object: 76acf1456dc1a6f52a70f240c1f4819a96faab82 + last_write_checksum: sha1:5c7be37d54bf5f54e2d5b1c7821ad40bc28b1106 + pristine_git_object: 99741d8875b7741e59245c032c5b7cfbfbdfe7c5 src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodNetworkTokens.java: id: 53c6e8361a9d - last_write_checksum: sha1:c0d81c3966f74e07dd2ac4e839d6e1a74b6979f1 - pristine_git_object: ea5e1d71c8221b62c2ebf03af11b9e0788be259b + last_write_checksum: sha1:8d7ecbb3472d09c75e9b63f4ab45fbb36d8d03e2 + pristine_git_object: 478823a7ef869a544ab93ff5506e66847c6273d9 src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodPaymentServiceTokens.java: id: f70e2e486d4a - last_write_checksum: sha1:48ffb7b975b0d69ebdfc339c6da34ff8c82f8df5 - pristine_git_object: f883f0ad3a2b5d0c947341744628e386d2ee4066 + last_write_checksum: sha1:d68c83c740513311e5c00f7e6181ab7815d9ea8e + pristine_git_object: 97041533471a7c4b083c8cff1be580c703c59e64 src/main/java/com/gr4vy/sdk/operations/ListPaymentMethods.java: id: 208d7e30e7a8 - last_write_checksum: sha1:9b2daa400bf13da684e4497ab453d95042ddae83 - pristine_git_object: 8702856e16e167b7d2e2fc090eeb3e76245d1991 + last_write_checksum: sha1:e0deeedd3af45586f3a8f83f566f9d68ca8a8eec + pristine_git_object: 824849b979279086fa5939b72c81b08e3ee3067b src/main/java/com/gr4vy/sdk/operations/ListPaymentOptions.java: id: f75ac80fc159 - last_write_checksum: sha1:9bd58e3386e863a4b030f4cdbaaa4108d6e1a335 - pristine_git_object: a6e2bf238b7be232ae056e8641692e72e63bc598 + last_write_checksum: sha1:ba08bfe02e0ef7c2f76e73c3b370107c24b235a3 + pristine_git_object: 5007bbbf49740bca9cac31cf9a945126f3f6da8c src/main/java/com/gr4vy/sdk/operations/ListPaymentServiceDefinitions.java: id: 351e88a46512 - last_write_checksum: sha1:ccdd80b5d349c139974ebbd84b4a49ed871e7c77 - pristine_git_object: af03c56e4eefad47351677b47dceb62918bcb37a + last_write_checksum: sha1:893131819f2f8f7a9987ac05ce6ce746bb28b198 + pristine_git_object: af8551c940167da6f1ad923f08be1b67205d1791 src/main/java/com/gr4vy/sdk/operations/ListPaymentServices.java: id: 98a1b8d9324b - last_write_checksum: sha1:4e81520792f4434bc344aed082830ab0152a936a - pristine_git_object: a82f2016af82f37890f1aaf8a949478243633960 + last_write_checksum: sha1:a6184af9993871a12d3ee6309b2c36679a96ce4c + pristine_git_object: e90c80c34f90f41795e605eed5471294166682bb src/main/java/com/gr4vy/sdk/operations/ListPayouts.java: id: 9417af0737c0 - last_write_checksum: sha1:da1e5b394f127e7c9f104cbc54958cf2d0a8667b - pristine_git_object: 1b5f3f5c6a2a70ca9f2f74f0eeb9fc118d2fe6f5 + last_write_checksum: sha1:9eca1b2e9d5b149fa8426018c323c35e783c4138 + pristine_git_object: de416ef3d0489dfccbe864c4b72d9ed83d11e83b src/main/java/com/gr4vy/sdk/operations/ListReportExecutions.java: id: 8ce79c40e146 - last_write_checksum: sha1:e0c4138e246c03331db7c83089514b645b3c8e2a - pristine_git_object: 2dac5f7bf2921d34a8b7490f7d354c8fb9e583b7 + last_write_checksum: sha1:e949acea2eb00533e0534a5748b3c445cb8cd434 + pristine_git_object: 704244bd7fd9068100d4dceedd43f6d8a60111e0 src/main/java/com/gr4vy/sdk/operations/ListReports.java: id: 20f116bc6064 - last_write_checksum: sha1:83c634f4b32e59f7f75699ff629ff40fc4dc5046 - pristine_git_object: 3acfb2d3ed618b7157934df0788271f77b0d5463 + last_write_checksum: sha1:b5cf4e4cda5289012de4402cf9c70be07b635d3d + pristine_git_object: 43e5dfd19cb3a96bc5d1addcec3900db3c45713b src/main/java/com/gr4vy/sdk/operations/ListThreeDsConfigurations.java: id: 6d1b60ce377b - last_write_checksum: sha1:07ba5e19d78785fb6547fdbd10ed0a32b4413533 - pristine_git_object: f8fea4cbd5dd79cffd946b50cbb19629aaf4b8ee + last_write_checksum: sha1:9ce2ef441d1ab095e882924c2109d5a747f2e64b + pristine_git_object: e52142879cd7c42d3af132ed797861d726b7e64d src/main/java/com/gr4vy/sdk/operations/ListTransactionActions.java: id: 1790260027b3 - last_write_checksum: sha1:0b7cb6ac147f69310be09001a36f932dd84f36f9 - pristine_git_object: c22c0f3a224415f684340744dc55bdd6ebb36470 + last_write_checksum: sha1:64bd19752c245a5ec7ddddcfb6d3905dd1c19a3a + pristine_git_object: f36a7357adfdf0174c77a14541df280ea84e6747 src/main/java/com/gr4vy/sdk/operations/ListTransactionEvents.java: id: 2c060ebeaaec - last_write_checksum: sha1:afeca4c4e3419ad2ba8a7453d5dc2b51a19eaeaf - pristine_git_object: 5cb34c4e5f2df9949593943de80659165fcdf74d + last_write_checksum: sha1:4779a3e99678a95da59e67943f18f649739773a2 + pristine_git_object: 6aef3754496b3664d04de9768ae8b29c7a81fdfe src/main/java/com/gr4vy/sdk/operations/ListTransactionRefunds.java: id: e75218352b75 - last_write_checksum: sha1:8de6d1f94d055635bacbb8b2e89376e0eae5dd63 - pristine_git_object: 56cd0a7b21328fc6d22dcf4e74e30689d7e61f19 + last_write_checksum: sha1:d3706610b4703fb66aae23be5190625ca6ade778 + pristine_git_object: eeb25a5ddcec3f98591dbe5b12144612f2425be4 src/main/java/com/gr4vy/sdk/operations/ListTransactionSettlements.java: id: 365d7f170602 - last_write_checksum: sha1:abe4e5a92ca447af0357d54bf3eb3e1b20ce2a70 - pristine_git_object: 75e7909f9303c3b59b310a251c24683ecc628f19 + last_write_checksum: sha1:0719347cbfaca713c65cd57993717db471e39272 + pristine_git_object: 1da1a59481853498896ab0892db2fca70caf859f src/main/java/com/gr4vy/sdk/operations/ListTransactions.java: id: 2cf1106c3622 - last_write_checksum: sha1:62145cc18251dc16770ccb14264d17d375221697 - pristine_git_object: 1d6263936792cdc621ab23283b0678d39812a88c + last_write_checksum: sha1:d242bb17fc81e0e44150918ebdc9998679ce9c2d + pristine_git_object: 63ac78fc8815c4f77e68641806637c4384d85fde src/main/java/com/gr4vy/sdk/operations/Operations.java: id: 5c55554fb0e4 last_write_checksum: sha1:2f7fec87168c6b2b20f6bbc23dbcbf40a9ac64bf pristine_git_object: 1093016ff88e0029064d7243a98cb12cc45a364b src/main/java/com/gr4vy/sdk/operations/RegisterDigitalWalletDomain.java: id: 36247a6065da - last_write_checksum: sha1:f7c424cb2e05baefe96e9f7c609dcaa062e34fea - pristine_git_object: cfcf5500ed846a3cd92b2613891243209f3f80e9 + last_write_checksum: sha1:4f27fc12d2b0f6729a79ae5e1612a2370611a6a2 + pristine_git_object: 360a4e32110115d3bc372068deb3b16f47b00ab9 src/main/java/com/gr4vy/sdk/operations/ResumePaymentMethodNetworkToken.java: id: 6b7ec7d6c653 - last_write_checksum: sha1:df69cf7107e5b5a323d81d31ac41546a346433e9 - pristine_git_object: 223384b01a98c10d79597ec738c1e3e37c62e67c + last_write_checksum: sha1:ded2623f895da4a7da03f385a7db465d178ea3ae + pristine_git_object: a51bb1cdadd16610ad2936698c77491bbaca0053 src/main/java/com/gr4vy/sdk/operations/SuspendPaymentMethodNetworkToken.java: id: 9aff19c4e501 - last_write_checksum: sha1:a57eceb1b8c6e1ee46bbdf5c6aafe338c62c5dc1 - pristine_git_object: b39ce696a63d03df3413f8cd3d08edc38e0c716f + last_write_checksum: sha1:6d0e185d8cca6042af691c9cfd920f7e6477ff59 + pristine_git_object: 2ed522bf5506871c1a91a6d158422a12b385e4ae src/main/java/com/gr4vy/sdk/operations/SyncTransaction.java: id: d3f3f517804b - last_write_checksum: sha1:08d4f748792bb269c72169c92192e6805b5fa58a - pristine_git_object: 8bba146b9b81ae4be728e69c83097dcd426b7574 + last_write_checksum: sha1:3d13e1903227e3a5fed60115c73cf26ec50c0f92 + pristine_git_object: 2935e36ebfc79e7a2b7a4fda12197a5b33053e1b src/main/java/com/gr4vy/sdk/operations/UnregisterDigitalWalletDomain.java: id: 507fb027d7db - last_write_checksum: sha1:af3d76c3c8abc71254b682c0114ba412fde50e3c - pristine_git_object: 086ad15a620a9f26b883e608cbddfe4e4371cd0e + last_write_checksum: sha1:656946203b82648bcaa761519223721c2c495212 + pristine_git_object: 5582fca964a4ee8db4aa97fa3f62e64684fcc05d src/main/java/com/gr4vy/sdk/operations/UpdateBuyer.java: id: 31607ea16333 - last_write_checksum: sha1:dae6a0e347d73a53b705781b1c8e6a812a05b986 - pristine_git_object: 5dc12274298ac546e3b1ed868a42d79b520af941 + last_write_checksum: sha1:6dd24f18af73ad6990a43d0383a72cd9391012a8 + pristine_git_object: 8b7e0ced4c4a7fbcd4a765ba1158cdd850f5cc65 src/main/java/com/gr4vy/sdk/operations/UpdateBuyerShippingDetails.java: id: ae17f33e30e0 - last_write_checksum: sha1:257df86c4410a1147ab50315f7d038da4246072e - pristine_git_object: d4bc7f898ef6ae5c819d400a78fe29e7574da50e + last_write_checksum: sha1:e188a1b9e37d328ff5eb628905214df0937d8446 + pristine_git_object: e172ff01fba0268d994d91c1ae0bfd93f4a3ce67 src/main/java/com/gr4vy/sdk/operations/UpdateCheckoutSession.java: id: 6ba7160f0d89 - last_write_checksum: sha1:80ced5a73b34ad891911bcd7161be54db6da2fbc - pristine_git_object: 5d8fd5768dffa8ae7416e0059e2ec1dde9184b88 + last_write_checksum: sha1:08830423c8f1fd5eb1907b15bc4373b9b57a776f + pristine_git_object: ac9fa4074f450f989df393f58f200c9c6e684771 src/main/java/com/gr4vy/sdk/operations/UpdateDigitalWallet.java: id: 4e884e2db0a1 - last_write_checksum: sha1:c747fad8795191710e6e456c10240a20c3f0d132 - pristine_git_object: 7fad5958fff303ea275e7850519605dfd3b034b2 + last_write_checksum: sha1:1137ad98751a5521a2d44f844b3aec8a5af26193 + pristine_git_object: 18db4e83dae1b4d804ef37508466a2f954921b86 src/main/java/com/gr4vy/sdk/operations/UpdateMerchantAccount.java: id: cb6cc21c5422 - last_write_checksum: sha1:1bdab4c9933c2d3dd25eabfc4f7a8db2cbd86f92 - pristine_git_object: 94c6d76ece23a9b18fb01b7e5680bec6fcaf087b + last_write_checksum: sha1:f74ec6d58f0ace06b8b39f9d3371ce39d4fb18f8 + pristine_git_object: addc038fbb36ce1439700ad0ea342665abce3937 + src/main/java/com/gr4vy/sdk/operations/UpdatePaymentMethod.java: + id: 8c2655a08ee8 + last_write_checksum: sha1:6ea7e6ec2d5a21033578df17aedd65bf51ac2452 + pristine_git_object: a6ee27440c9dc075b57591546fb08ffcf02339ca src/main/java/com/gr4vy/sdk/operations/UpdatePaymentService.java: id: 4bd6bc6d300b - last_write_checksum: sha1:74fe1704df9d115ae7ca232359c35a41914e8bc0 - pristine_git_object: cc5479a2dfde6eea29177d0124b8b1762b83e00e + last_write_checksum: sha1:e38c2a1f9090b39a71146db60b61ade7ee9dc8bd + pristine_git_object: 15b9aac4db6abd6af2894780723e1495d4c7c79f src/main/java/com/gr4vy/sdk/operations/UpdateReport.java: id: 606e5e869664 - last_write_checksum: sha1:15a85140c1418764147b080243165c92fc46e34e - pristine_git_object: c8ab5923d4c5df82891204e7be7fe34661746603 + last_write_checksum: sha1:0e91d491766b769eeb9cdc451c19a72a91238769 + pristine_git_object: 061f8063afb34e6c9b2e3c2026c62bdea1435139 src/main/java/com/gr4vy/sdk/operations/UpdateThreeDsScenario.java: id: 1a34874f4f1f - last_write_checksum: sha1:fac8b5e1e0aef1b4cba06bc73575f90243d0fe0e - pristine_git_object: 6ff9b8aff6a05999efe8c0d963dfafc7de78f163 + last_write_checksum: sha1:8bcf6cbb9c5fa95dc05351b9e906a8368cf17597 + pristine_git_object: 0b61b7df9d2d3ca54c95bb32817939a0cec0153c src/main/java/com/gr4vy/sdk/operations/UpdateTransaction.java: id: ba4355d47770 - last_write_checksum: sha1:162743b634a64070089aba39d1472208f26a5d71 - pristine_git_object: 311e78ac1102f1c77b961a96b16848844a3aff47 + last_write_checksum: sha1:0d68561c1181a4b997711beb1b97f396f0ed3ba6 + pristine_git_object: 1af95b4f6be5789dd192d60a28979998b4ac3604 src/main/java/com/gr4vy/sdk/operations/VerifyPaymentServiceCredentials.java: id: 1a761bad8884 - last_write_checksum: sha1:42c34b59061ca377bfa16ffe945b683d7c10afbf - pristine_git_object: 067f8754e9cd8344f265059f0094fe14d32206e2 + last_write_checksum: sha1:dadb8a725f1ea2e5309018e88c9ba70e99e2c79b + pristine_git_object: 45a14df21dcbc0709d493a87270cc6c4bede5e7b src/main/java/com/gr4vy/sdk/operations/VoidTransaction.java: id: 9801753a1f32 - last_write_checksum: sha1:82f5c75b7bca442d95c479b82ca03a98dad40564 - pristine_git_object: ed38d531005d742a5a46a351faabbb60c7a076d9 + last_write_checksum: sha1:79aca8f1390f56e57a85a42333d86328fcb1d2a5 + pristine_git_object: bd6b5114280287a90b15775829d65e78135bce3f src/main/java/com/gr4vy/sdk/utils/AsyncHook.java: id: 0c041bdc491a last_write_checksum: sha1:5a9cb6773612522651e724710538e218f6f6fc18 @@ -7126,7 +7190,7 @@ examples: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"items": [{"type": "payment-method", "method": "multibanco", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100}]} + application/json: {"items": [{"type": "payment-method", "method": "multibanco", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "scheme_transaction_id": "123456789012345", "scheme_transaction_id_scheme": "visa"}]} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7157,11 +7221,12 @@ examples: query: timeout_in_seconds: 1 application_name: "core-api" + order_by: "desc" header: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"items": [{"type": "gift-card", "merchant_account_id": "default", "bin": "412345", "sub_bin": "554", "last4": "1234"}]} + application/json: {"items": [{"type": "gift-card", "merchant_account_id": "default", "bin": "412345", "sub_bin": "554", "last4": "1234", "usage_count": 100, "cit_usage_count": 50}]} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7390,7 +7455,7 @@ examples: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"items": [{"type": "payment-method", "method": "laybuy", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "status": "buyer_approval_required", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}], "limit": 20} + application/json: {"items": [{"type": "payment-method", "method": "laybuy", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "scheme_transaction_id": "123456789012345", "scheme_transaction_id_scheme": "visa", "status": "buyer_approval_required", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}], "limit": 20} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7427,7 +7492,7 @@ examples: application/json: {"method": "checkout-session", "id": "4137b1cf-39ac-42a8-bad6-1c680d5dab6b"} responses: "201": - application/json: {"type": "payment-method", "method": "alipay", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "status": "paused", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + application/json: {"type": "payment-method", "method": "alipay", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "scheme_transaction_id": "123456789012345", "scheme_transaction_id_scheme": "visa", "status": "paused", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7463,7 +7528,7 @@ examples: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"type": "payment-method", "method": "efecty", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "status": "processing", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + application/json: {"type": "payment-method", "method": "efecty", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "scheme_transaction_id": "123456789012345", "scheme_transaction_id_scheme": "visa", "status": "processing", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7872,7 +7937,7 @@ examples: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + application/json: {"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "usage_count": 100, "cit_usage_count": 50} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7946,7 +8011,7 @@ examples: application/json: {"number": "4123455541234561234", "pin": "1234"} responses: "201": - application/json: {"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + application/json: {"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "usage_count": 100, "cit_usage_count": 50} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7981,7 +8046,7 @@ examples: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"items": [{"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}, {"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}], "limit": 20} + application/json: {"items": [{"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "usage_count": 100, "cit_usage_count": 50}, {"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "mock-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "usage_count": 100, "cit_usage_count": 50}], "limit": 20} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -9109,12 +9174,14 @@ examples: update_payment_service: speakeasy-default-update-payment-service: parameters: + path: + payment_service_id: "fffd152a-9532-4087-9a4f-de58754210f0" query: application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: - application/json: {"display_name": "Stripe", "payment_service_definition_id": "stripe-card", "fields": [{"key": "api_key", "value": "key-12345"}, {"key": "api_key", "value": "key-12345"}], "accepted_currencies": ["USD", "EUR", "GBP"], "accepted_countries": ["US", "DE", "GB"], "three_d_secure_enabled": true, "settlement_reporting_enabled": true} + application/json: {"settlement_reporting_enabled": true} responses: "201": application/json: {"type": "payment-service", "id": "fffd152a-9532-4087-9a4f-de58754210f0", "merchant_account_id": "default", "payment_service_definition_id": "stripe-card", "active": true, "method": "gemds", "display_name": "Stripe", "position": 1, "accepted_currencies": ["USD", "EUR", "GBP"], "accepted_countries": ["US", "DE", "GB"], "payment_method_tokenization_enabled": true, "network_tokens_enabled": true, "open_loop": true, "settlement_reporting_enabled": true, "is_deleted": false, "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} @@ -9142,6 +9209,8 @@ 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"} + "200": + application/json: {"type": "payment-service", "id": "fffd152a-9532-4087-9a4f-de58754210f0", "merchant_account_id": "default", "payment_service_definition_id": "stripe-card", "active": true, "method": "oney_10x", "display_name": "Stripe", "position": 1, "accepted_currencies": ["USD", "EUR", "GBP"], "accepted_countries": ["US", "DE", "GB"], "payment_method_tokenization_enabled": true, "network_tokens_enabled": true, "open_loop": true, "settlement_reporting_enabled": true, "is_deleted": false, "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} get_payment_service: speakeasy-default-get-payment-service: parameters: @@ -9188,7 +9257,7 @@ examples: header: x-gr4vy-merchant-account-id: "default" requestBody: - application/json: {"settlement_reporting_enabled": true} + application/json: {"display_name": "Stripe", "payment_service_definition_id": "stripe-card", "fields": [{"key": "api_key", "value": "key-12345"}], "accepted_currencies": ["USD", "EUR", "GBP"], "accepted_countries": ["US", "DE", "GB"], "three_d_secure_enabled": true, "settlement_reporting_enabled": true} responses: "200": application/json: {"type": "payment-service", "id": "fffd152a-9532-4087-9a4f-de58754210f0", "merchant_account_id": "default", "payment_service_definition_id": "stripe-card", "active": true, "method": "linkaja", "display_name": "Stripe", "position": 1, "accepted_currencies": ["USD", "EUR", "GBP"], "accepted_countries": ["US", "DE", "GB"], "payment_method_tokenization_enabled": true, "network_tokens_enabled": true, "open_loop": true, "settlement_reporting_enabled": true, "is_deleted": false, "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} @@ -9216,6 +9285,8 @@ 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"} + "201": + application/json: {"type": "payment-service", "id": "fffd152a-9532-4087-9a4f-de58754210f0", "merchant_account_id": "default", "payment_service_definition_id": "stripe-card", "active": true, "method": "abitab", "display_name": "Stripe", "position": 1, "accepted_currencies": ["USD", "EUR", "GBP"], "accepted_countries": ["US", "DE", "GB"], "payment_method_tokenization_enabled": true, "network_tokens_enabled": true, "open_loop": true, "settlement_reporting_enabled": true, "is_deleted": false, "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} delete_payment_service: speakeasy-default-delete-payment-service: parameters: @@ -10613,8 +10684,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"} + update_payment_method: + speakeasy-default-update-payment-method: + parameters: + path: + payment_method_id: "ef9496d8-53a5-4aad-8ca2-00eb68334389" + requestBody: + application/json: {} + responses: + "200": + application/json: {"type": "payment-method", "method": "trustlyeurope", "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389", "merchant_account_id": "default", "cit_usage_count": 50, "has_replacement": false, "usage_count": 100, "scheme_transaction_id": "123456789012345", "scheme_transaction_id_scheme": "visa", "status": "buyer_approval_required", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + "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: "## Java SDK Changes:\n* `gr4vy.buyers.giftCards.list()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.items[]` **Changed**\n* `gr4vy.transactions.get()`: `response.paymentMethod` **Changed**\n* `gr4vy.transactions.capture()`: `response.union(TransactionCapture).transaction.paymentMethod` **Changed**\n* `gr4vy.paymentMethods.list()`: `response.items[]` **Changed**\n* `gr4vy.paymentMethods.create()`: \n * `requestBody.union(RedirectPaymentMethodCreate).method.enum(paypay)` **Added**\n * `response` **Changed**\n* `gr4vy.paymentMethods.get()`: `response` **Changed**\n* `gr4vy.giftCards.get()`: `response` **Changed**\n* `gr4vy.giftCards.create()`: `response` **Changed**\n* `gr4vy.giftCards.list()`: `response.items[]` **Changed**\n* `gr4vy.transactions.update()`: \n * `request.transactionUpdate.connectionOptions` **Changed**\n * `response.paymentMethod` **Changed**\n* `gr4vy.digitalWallets.create()`: \n * `request.digitalWalletCreate.provider.enum(paze)` **Added**\n * `response.provider.enum(paze)` **Added**\n* `gr4vy.digitalWallets.list()`: `response.items[].provider.enum(paze)` **Added**\n* `gr4vy.digitalWallets.get()`: `response.provider.enum(paze)` **Added**\n* `gr4vy.digitalWallets.update()`: `response.provider.enum(paze)` **Added**\n* `gr4vy.transactions.list()`: \n * `request.method` **Changed**\n * `response.items[].paymentMethod` **Changed**\n* `gr4vy.buyers.paymentMethods.list()`: `response.items[]` **Changed**\n* `gr4vy.transactions.create()`: \n * `request.transactionCreate` **Changed**\n * `response.paymentMethod` **Changed**\n* `gr4vy.giftCards.balances.list()`: `response.items[]` **Changed**\n* `gr4vy.paymentMethods.update()`: **Added**\n* `gr4vy.transactions.void()`: `response.union(Transaction).paymentMethod` **Changed**\n* `gr4vy.transactions.cancel()`: `response.transaction.paymentMethod` **Changed**\n* `gr4vy.transactions.sync()`: `response.paymentMethod` **Changed**\n* `gr4vy.paymentOptions.list()`: `response.items[].mode.enum(paze)` **Added**\n* `gr4vy.paymentServiceDefinitions.list()`: `response.items[]` **Changed**\n* `gr4vy.paymentServiceDefinitions.get()`: `response` **Changed**\n* `gr4vy.paymentServices.list()`: \n * `request.method` **Changed**\n * `response.items[].method` **Changed**\n* `gr4vy.paymentServices.create()`: `response.method` **Changed**\n* `gr4vy.paymentServices.get()`: `response.method` **Changed**\n* `gr4vy.paymentServices.update()`: `response.method` **Changed**\n* `gr4vy.payouts.list()`: `response.items[].paymentMethod` **Changed**\n* `gr4vy.payouts.create()`: `response.paymentMethod` **Changed**\n* `gr4vy.payouts.get()`: `response.paymentMethod` **Changed**\n* `gr4vy.paymentLinks.create()`: \n * `request.paymentLinkCreate.connectionOptions` **Changed**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ea26562a..bb1ab65d 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 2.16.52 + version: 2.16.53 additionalDependencies: - testImplementation:org.junit.jupiter:junit-jupiter:5.10.0 - implementation:com.auth0:java-jwt:4.5.0 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 6b55904a..d8fa8201 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.760.0 +speakeasyVersion: 1.761.9 sources: Gr4vy: sourceNamespace: openapi @@ -9,8 +9,8 @@ sources: - 1.0.0 openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:bba241586320e7fb1dc86371949f7776f34367843939c0c7e29d5b2fdaec350c - sourceBlobDigest: sha256:f26a120860b0723b0d86d6a042ca50b8d90f24cf4a60c247c9c7523d813801f6 + sourceRevisionDigest: sha256:78918f7baf9f739ed913e72af6b4c35230bc95cf9c318ca3b36d3f3ea756f1b0 + sourceBlobDigest: sha256:45611f4ec370255e2d07be0e71d67f668a434077432cc886befb9117b5263bb9 tags: - latest - 1.0.0 @@ -25,10 +25,10 @@ targets: java: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:bba241586320e7fb1dc86371949f7776f34367843939c0c7e29d5b2fdaec350c - sourceBlobDigest: sha256:f26a120860b0723b0d86d6a042ca50b8d90f24cf4a60c247c9c7523d813801f6 + sourceRevisionDigest: sha256:78918f7baf9f739ed913e72af6b4c35230bc95cf9c318ca3b36d3f3ea756f1b0 + sourceBlobDigest: sha256:45611f4ec370255e2d07be0e71d67f668a434077432cc886befb9117b5263bb9 codeSamplesNamespace: openapi-java-code-samples - codeSamplesRevisionDigest: sha256:036b1561ee6d565b79fef188678acb3349cb8b940b21c2e32cae678807012a6d + codeSamplesRevisionDigest: sha256:56a829d857d39958e5a4048de06f5d0d6fff250d998a2c527844214e1115b45a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 81957b8a..d212dc6c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.gr4vy:sdk:2.16.52' +implementation 'com.gr4vy:sdk:2.16.53' ``` Maven: @@ -67,7 +67,7 @@ Maven: com.gr4vy sdk - 2.16.52 + 2.16.53 ``` @@ -393,6 +393,7 @@ Async support is available for: * [list](docs/sdks/paymentmethods/README.md#list) - List all payment methods * [create](docs/sdks/paymentmethods/README.md#create) - Create payment method * [get](docs/sdks/paymentmethods/README.md#get) - Get payment method +* [update](docs/sdks/paymentmethods/README.md#update) - Update payment method * [delete](docs/sdks/paymentmethods/README.md#delete) - Delete payment method #### [PaymentMethods.NetworkTokens](docs/sdks/networktokens/README.md) @@ -426,9 +427,9 @@ Async support is available for: ### [PaymentServices](docs/sdks/paymentservices/README.md) * [list](docs/sdks/paymentservices/README.md#list) - List payment services -* [create](docs/sdks/paymentservices/README.md#create) - Update a configured payment service +* [create](docs/sdks/paymentservices/README.md#create) - Configure a payment service * [get](docs/sdks/paymentservices/README.md#get) - Get payment service -* [update](docs/sdks/paymentservices/README.md#update) - Configure a payment service +* [update](docs/sdks/paymentservices/README.md#update) - Update a configured payment service * [delete](docs/sdks/paymentservices/README.md#delete) - Delete a configured payment service * [verify](docs/sdks/paymentservices/README.md#verify) - Verify payment service credentials * [session](docs/sdks/paymentservices/README.md#session) - Create a session for a payment service definition diff --git a/RELEASES.md b/RELEASES.md index f256f6ff..ca93d6f8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1358,4 +1358,14 @@ Based on: ### Generated - [java v2.16.52] . ### Releases -- [Maven Central v2.16.52] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.52 - . \ No newline at end of file +- [Maven Central v2.16.52] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.52 - . + +## 2026-04-22 14:20:25 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.9 (2.881.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v2.16.53] . +### Releases +- [Maven Central v2.16.53] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.53 - . \ No newline at end of file diff --git a/docs/models/components/DigitalWalletProvider.md b/docs/models/components/DigitalWalletProvider.md index 06487cad..cf756050 100644 --- a/docs/models/components/DigitalWalletProvider.md +++ b/docs/models/components/DigitalWalletProvider.md @@ -18,4 +18,5 @@ DigitalWalletProvider custom = DigitalWalletProvider.of("custom_value"); | -------------- | -------------- | | `APPLE` | apple | | `GOOGLE` | google | -| `CLICK_TO_PAY` | click-to-pay | \ No newline at end of file +| `CLICK_TO_PAY` | click-to-pay | +| `PAZE` | paze | \ No newline at end of file diff --git a/docs/models/components/EcommpayOptions.md b/docs/models/components/EcommpayOptions.md new file mode 100644 index 00000000..19a0af6c --- /dev/null +++ b/docs/models/components/EcommpayOptions.md @@ -0,0 +1,9 @@ +# EcommpayOptions + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `bookingStartDate` | *JsonNullable\* | :heavy_minus_sign: | The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. | 2030-12-01 | +| `bookingEndDate` | *JsonNullable\* | :heavy_minus_sign: | The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. | 2030-12-10 | \ No newline at end of file diff --git a/docs/models/components/GiftCard.md b/docs/models/components/GiftCard.md index 1586c820..f22b3db4 100644 --- a/docs/models/components/GiftCard.md +++ b/docs/models/components/GiftCard.md @@ -15,4 +15,8 @@ | `expirationDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when this gift card expires. This is a full date/time and may be more accurate than the actual expiry date received by the gift card service. | 2013-07-16T19:23:00.000+00:00 | | `buyer` | [JsonNullable\](../../models/components/Buyer.md) | :heavy_minus_sign: | The buyer for which this gift card is stored. | | | `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date this gift card record was created at. | 2013-07-16T19:23:00.000+00:00 | -| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date this gift card record was last updated at. | 2013-07-16T19:23:00.000+00:00 | \ No newline at end of file +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date this gift card record was last updated at. | 2013-07-16T19:23:00.000+00:00 | +| `lastUsedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The timestamp when this gift card was last used in a transaction. | 2013-07-16T19:23:00.000+00:00 | +| `usageCount` | *long* | :heavy_check_mark: | The number of times this gift card has been used in transactions. | 100 | +| `citLastUsedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The timestamp when this gift card was last used in a transaction for client initiated transactions. | 2013-07-16T19:23:00.000+00:00 | +| `citUsageCount` | *long* | :heavy_check_mark: | The number of times this gift card has been used in transactions for client initiated transactions. | 50 | \ No newline at end of file diff --git a/docs/models/components/GiftCardSummary.md b/docs/models/components/GiftCardSummary.md index fb4b236b..46a108a6 100644 --- a/docs/models/components/GiftCardSummary.md +++ b/docs/models/components/GiftCardSummary.md @@ -16,4 +16,8 @@ | `balance` | *JsonNullable\* | :heavy_minus_sign: | The amount remaining on the balance for this gift card according to the gift card service. This may be `null` if the balance could not be fetched. | 1299 | | `balanceErrorCode` | [JsonNullable\](../../models/components/GiftCardErrorCode.md) | :heavy_minus_sign: | If the last balance update failed, this will contain the internal code for this error. | incorrect_currency | | `balanceRawErrorCode` | *JsonNullable\* | :heavy_minus_sign: | If the last balance update failed, this will contain the the raw error code received from the gift card provider. | 10363 | -| `balanceRawErrorMessage` | *JsonNullable\* | :heavy_minus_sign: | If the last balance update failed, this will contain the the raw error message received from the gift card provider. | This currency is not supported by the merchant. | \ No newline at end of file +| `balanceRawErrorMessage` | *JsonNullable\* | :heavy_minus_sign: | If the last balance update failed, this will contain the the raw error message received from the gift card provider. | This currency is not supported by the merchant. | +| `lastUsedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The timestamp when this gift card was last used in a transaction. | 2013-07-16T19:23:00.000+00:00 | +| `usageCount` | *long* | :heavy_check_mark: | The number of times this gift card has been used in transactions. | 100 | +| `citLastUsedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The timestamp when this gift card was last used in a transaction for client initiated transactions. | 2013-07-16T19:23:00.000+00:00 | +| `citUsageCount` | *long* | :heavy_check_mark: | The number of times this gift card has been used in transactions for client initiated transactions. | 50 | \ No newline at end of file diff --git a/docs/models/components/Method.md b/docs/models/components/Method.md index 245f4776..21ba1283 100644 --- a/docs/models/components/Method.md +++ b/docs/models/components/Method.md @@ -91,8 +91,10 @@ Method custom = Method.of("custom_value"); | `PAYMAYA` | paymaya | | `PAYPAL` | paypal | | `PAYPALPAYLATER` | paypalpaylater | +| `PAYPAY` | paypay | | `PAYTO` | payto | | `PAYVALIDA` | payvalida | +| `PAZE` | paze | | `PICPAY` | picpay | | `PIX` | pix | | `PLAID` | plaid | diff --git a/docs/models/components/Mode.md b/docs/models/components/Mode.md index 71274ef5..e386a0ce 100644 --- a/docs/models/components/Mode.md +++ b/docs/models/components/Mode.md @@ -23,4 +23,5 @@ Mode custom = Mode.of("custom_value"); | `CHECKOUT_SESSION` | checkout-session | | `CLICK_TO_PAY` | click-to-pay | | `GIFT_CARD` | gift-card | -| `BANK` | bank | \ No newline at end of file +| `BANK` | bank | +| `PAZE` | paze | \ No newline at end of file diff --git a/docs/models/components/PaymentMethod.md b/docs/models/components/PaymentMethod.md index 6e191d5b..cf0d4b80 100644 --- a/docs/models/components/PaymentMethod.md +++ b/docs/models/components/PaymentMethod.md @@ -29,6 +29,8 @@ A stored payment method. | `hasReplacement` | *boolean* | :heavy_check_mark: | Whether this card has a pending replacement that hasn't been applied yet. | false | | `lastUsedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The timestamp when this payment method was last used in a transaction. | 2013-07-16T19:23:00.000+00:00 | | `usageCount` | *long* | :heavy_check_mark: | The number of times this payment method has been used in transactions. | 100 | +| `schemeTransactionId` | *Optional\* | :heavy_check_mark: | The scheme transaction identifier stored against this payment method. | 123456789012345 | +| `schemeTransactionIdScheme` | [Optional\](../../models/components/CardScheme.md) | :heavy_check_mark: | The scheme associated with scheme_transaction_id. Only applies to card payments. | visa | | `buyer` | [JsonNullable\](../../models/components/Buyer.md) | :heavy_minus_sign: | The optional buyer for which this payment method has been stored. | | | `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The merchant reference that can be used to match the payment method against your own records. | card-12345 | | `status` | [PaymentMethodStatus](../../models/components/PaymentMethodStatus.md) | :heavy_check_mark: | N/A | | diff --git a/docs/models/components/PaymentMethodSummary.md b/docs/models/components/PaymentMethodSummary.md index 4550a90a..e1ffb8c2 100644 --- a/docs/models/components/PaymentMethodSummary.md +++ b/docs/models/components/PaymentMethodSummary.md @@ -28,4 +28,6 @@ A summary of a payment method. | `citUsageCount` | *long* | :heavy_check_mark: | The number of times this payment method has been used in transactions for client initiated transactions. | 50 | | `hasReplacement` | *boolean* | :heavy_check_mark: | Whether this card has a pending replacement that hasn't been applied yet. | false | | `lastUsedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The timestamp when this payment method was last used in a transaction. | 2013-07-16T19:23:00.000+00:00 | -| `usageCount` | *long* | :heavy_check_mark: | The number of times this payment method has been used in transactions. | 100 | \ No newline at end of file +| `usageCount` | *long* | :heavy_check_mark: | The number of times this payment method has been used in transactions. | 100 | +| `schemeTransactionId` | *Optional\* | :heavy_check_mark: | The scheme transaction identifier stored against this payment method. | 123456789012345 | +| `schemeTransactionIdScheme` | [Optional\](../../models/components/CardScheme.md) | :heavy_check_mark: | The scheme associated with scheme_transaction_id. Only applies to card payments. | visa | \ No newline at end of file diff --git a/docs/models/components/PaymentMethodUpdate.md b/docs/models/components/PaymentMethodUpdate.md new file mode 100644 index 00000000..2becbeb6 --- /dev/null +++ b/docs/models/components/PaymentMethodUpdate.md @@ -0,0 +1,12 @@ +# PaymentMethodUpdate + +Request body for updating a stored payment method. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `expirationDate` | *JsonNullable\* | :heavy_minus_sign: | The new expiration date for the payment method. | 12/30 | +| `schemeTransactionId` | *JsonNullable\* | :heavy_minus_sign: | A scheme transaction identifier to associate with this payment method. Explicitly setting this field to `null` will also clear `scheme_transaction_id_scheme` as a side-effect. When setting a new value and `scheme_transaction_id_scheme` is both omitted from the payload and previously unset,`scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. | 123456789012345 | +| `schemeTransactionIdScheme` | [JsonNullable\](../../models/components/CardScheme.md) | :heavy_minus_sign: | The scheme associated with `scheme_transaction_id`. Only applies to card payments. When setting a new value for `scheme_transaction_id`, if `scheme_transaction_id_scheme`is both omitted from the payload and previously unset, `scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. | visa | \ No newline at end of file diff --git a/docs/models/components/RedirectPaymentMethodCreateMethod.md b/docs/models/components/RedirectPaymentMethodCreateMethod.md index 10176378..761af2e4 100644 --- a/docs/models/components/RedirectPaymentMethodCreateMethod.md +++ b/docs/models/components/RedirectPaymentMethodCreateMethod.md @@ -84,6 +84,7 @@ RedirectPaymentMethodCreateMethod custom = RedirectPaymentMethodCreateMethod.of( | `PAYMAYA` | paymaya | | `PAYPAL` | paypal | | `PAYPALPAYLATER` | paypalpaylater | +| `PAYPAY` | paypay | | `PAYTO` | payto | | `PAYVALIDA` | payvalida | | `PICPAY` | picpay | diff --git a/docs/models/components/TransactionConnectionOptions.md b/docs/models/components/TransactionConnectionOptions.md index a29156a2..94b63bb8 100644 --- a/docs/models/components/TransactionConnectionOptions.md +++ b/docs/models/components/TransactionConnectionOptions.md @@ -12,6 +12,7 @@ | `adyenCashapp` | [JsonNullable\](../../models/components/AdyenOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `adyen-cashapp` connector. | | `adyenGiropay` | [JsonNullable\](../../models/components/AdyenOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `adyen-giropay` connector. | | `adyenIdeal` | [JsonNullable\](../../models/components/AdyenOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `adyen-ideal` connector. | +| `adyenPaypay` | [JsonNullable\](../../models/components/AdyenOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `adyen-paypay` connector. | | `adyenPix` | [JsonNullable\](../../models/components/AdyenOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `adyen-pix` connector. | | `adyenSepa` | [JsonNullable\](../../models/components/AdyenSepaOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `adyen-sepa` connector. | | `adyenSofort` | [JsonNullable\](../../models/components/AdyenOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `adyen-sofort` connector. | @@ -27,6 +28,8 @@ | `dlocalNequi` | [JsonNullable\](../../models/components/DlocalOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `dlocal-nequi` connector. | | `dlocalUpi` | [JsonNullable\](../../models/components/DlocalUPIOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `dlocal-upi` connector. | | `dlocalPix` | [JsonNullable\](../../models/components/DlocalPIXOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `dlocal-pix` connector. | +| `dlocalGcash` | [JsonNullable\](../../models/components/DlocalOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `dlocal-gcash` connector. | +| `ecommpayCard` | [JsonNullable\](../../models/components/EcommpayOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `ecommpay-card` connector. | | `fiservCard` | [JsonNullable\](../../models/components/FiservOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `fiserv-card` connector. | | `forterAntiFraud` | [JsonNullable\](../../models/components/ForterAntiFraudOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `forter-anti-fraud` connector. | | `gemGem` | [JsonNullable\](../../models/components/LatitudeOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `gem-gem` connector. | @@ -39,6 +42,7 @@ | `mattildaTapifintechs` | [JsonNullable\](../../models/components/MattildaTapiOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `mattilda-tapifintechs` connector. | | `monatoSpei` | [JsonNullable\](../../models/components/MonatoSpeiOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `monato-spei` connector. | | `mockCard` | [JsonNullable\](../../models/components/MockCardOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `mock-card` connector. | +| `mockdsCard` | [JsonNullable\](../../models/components/MockCardOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `mockds-card` connector. | | `nuveiCard` | [JsonNullable\](../../models/components/NuveiOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `nuvei-card` connector. | | `nuveiIdeal` | [JsonNullable\](../../models/components/NuveiIDealOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `nuvei-ideal` connector. | | `nuveiKlarna` | [JsonNullable\](../../models/components/NuveiKlarnaOptions.md) | :heavy_minus_sign: | Custom options to be passed to the `nuvei-klarna` connector. | diff --git a/docs/models/components/TransactionCreate.md b/docs/models/components/TransactionCreate.md index ef552169..67a8e9e7 100644 --- a/docs/models/components/TransactionCreate.md +++ b/docs/models/components/TransactionCreate.md @@ -3,45 +3,46 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *long* | :heavy_check_mark: | The monetary amount for this transaction, in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`. If the `intent` is set to `capture`, an amount greater than zero must be supplied. All gift card amounts are subtracted from this amount before the remainder is charged to the provided `payment_method`. | 1299 | -| `currency` | *String* | :heavy_check_mark: | A supported ISO 4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`. | **Example 1:** EUR
**Example 2:** GBP
**Example 3:** USD | -| `country` | *JsonNullable\* | :heavy_minus_sign: | The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not `null`, it must match the one specified for `country` in `payment_method`. Otherwise, the value specified for `country` in `payment_method` will be assumed implicitly. | US | -| `paymentMethod` | [JsonNullable\](../../models/components/TransactionCreatePaymentMethod.md) | :heavy_minus_sign: | The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added. | | -| `buyer` | [JsonNullable\](../../models/components/GuestBuyer.md) | :heavy_minus_sign: | Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used. | | -| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to associate this payment method to. If this field is provided then the `buyer_external_identifier` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field. | fe26475d-ec3e-4884-9553-f7356683f7f9 | -| `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The `external_identifier` of the buyer to associate this payment method to. If this field is provided then the `buyer_id` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field. | buyer-12345 | -| `giftCards` | List\<[GiftCardUnion](../../models/components/GiftCardUnion.md)> | :heavy_minus_sign: | The optional gift card(s) to use for this transaction. At least one gift card is required if no other `payment_method` has been added. By default, only a maximum limit of 10 gift cards may be used in a single transaction. Please contact our team to change this limit. | | -| `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | An external identifier that can be used to match the transaction against your own records. | transaction-12345 | -| `intent` | [Optional\](../../models/components/TransactionIntent.md) | :heavy_minus_sign: | N/A | | -| `store` | *Optional\* | :heavy_minus_sign: | Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set:

* The flag has to be set to `true` when the `payment_source` is set to `recurring` or `installment`, and `merchant_initiated` is set to `false`.
* The flag has to be set to `false` (or not set) when using a previously vaulted payment method. | true | -| `threeDSecureData` | [JsonNullable\](../../models/components/ThreeDSecureData.md) | :heavy_minus_sign: | Pass through 3-D Secure data to support external 3-D Secure authorisation. If using an external 3-D Secure provider, you should not pass a `redirect_url` in the `payment_method` object for a transaction. | | -| `threeDSecure` | [JsonNullable\](../../models/components/ThreeDSecure.md) | :heavy_minus_sign: | Optional 3-D Secure values to use during the authentication flow. | | -| `metadata` | Map\ | :heavy_minus_sign: | Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it. | {
"cohort": "cohort-12345",
"order": "order-12345"
} | -| `isSubsequentPayment` | *Optional\* | :heavy_minus_sign: | Indicates whether the transaction represents a subsequent payment coming from a setup recurring payment. Please note there are some restrictions on how this flag may be used.

The flag can only be `false` (or not set) when the transaction meets one of the following criteria:

* It is not `merchant_initiated`.
* `payment_source` is set to `card_on_file`.

The flag can only be set to `true` when the transaction meets one of the following criteria:
* It is not `merchant_initiated`.
* `payment_source` is set to `recurring` or `installment` and `merchant_initiated` is set to `true`.
* `payment_source` is set to `card_on_file`. | true | -| `merchantInitiated` | *Optional\* | :heavy_minus_sign: | Indicates whether the transaction was initiated by the merchant (true) or customer (false). | true | -| `paymentSource` | [Optional\](../../models/components/TransactionPaymentSource.md) | :heavy_minus_sign: | The way payment method information made it to this transaction. | | -| `airline` | [JsonNullable\](../../models/components/Airline.md) | :heavy_minus_sign: | The airline addendum data which describes the airline booking associated with this transaction. | | -| `cartItems` | List\<[CartItem](../../models/components/CartItem.md)> | :heavy_minus_sign: | An array of cart items that represents the line items of a transaction. | | -| `statementDescriptor` | [JsonNullable\](../../models/components/StatementDescriptor.md) | :heavy_minus_sign: | Details about the payment and the merchant which may end up on the (bank) statement for the payment. | | -| `previousSchemeTransactionId` | *JsonNullable\* | :heavy_minus_sign: | A scheme's transaction identifier to use in connecting a merchant initiated transaction to a previous customer initiated transaction. If not provided, and a qualifying customer initiated transaction has been previously made with the stored payment method, then Gr4vy will populate this value with the identifier returned for that transaction. This field is also know as the Visa Transaction Identifier, or Mastercard Trace ID. | 123456789012345 | -| `browserInfo` | [JsonNullable\](../../models/components/BrowserInfo.md) | :heavy_minus_sign: | Information about the browser used by the buyer. This can be used by anti-fraud services. | | -| `shippingDetailsId` | *JsonNullable\* | :heavy_minus_sign: | The unique identifier of a set of shipping details stored for the buyer. If provided, the created transaction will include a copy of the details at the point of transaction creation; i.e. it will not be affected by later changes to the detail in the database. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | -| `connectionOptions` | [JsonNullable\](../../models/components/TransactionConnectionOptions.md) | :heavy_minus_sign: | Allows for passing optional configuration per connection to take advantage of connection specific features. When provided, the data is only passed to the target connection type to prevent sharing configuration across connections. Please note that each of the keys this object are in kebab-case, for example `cybersource-anti-fraud` as they represent the ID of the connector. All the other keys will be snake case, for example `merchant_defined_data` or camel case to match an external API that the connector uses. | | -| `asyncCapture` | *Optional\* | :heavy_minus_sign: | Whether to capture the transaction asynchronously.

- When `async_capture` is `false` (default), the transaction is captured in the same request.
- When `async_capture` is `true`, the transaction is automatically captured at a later time.

Redirect transactions are not affected by this flag. This flag can only be set to `true` when `intent` is set to `capture`. | true | -| `antiFraudFingerprint` | *JsonNullable\* | :heavy_minus_sign: | This field represents the fingerprint data to be passed to the active anti-fraud service. | yGeBAFYgFmM= | -| `paymentServiceId` | *JsonNullable\* | :heavy_minus_sign: | The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped. | fffd152a-9532-4087-9a4f-de58754210f0 | -| `accountFundingTransaction` | *Optional\* | :heavy_minus_sign: | Marks the transaction as an AFT. Requires the payment service to support this feature, and might `recipient` and `buyer` data | true | -| `allowPartialAuthorization` | *Optional\* | :heavy_minus_sign: | Defines if the transaction will allow for a partial authorization. | | -| `recipient` | [JsonNullable\](../../models/components/Recipient.md) | :heavy_minus_sign: | The recipient of any account to account funding. For use with AFTs. | | -| `installmentCount` | *JsonNullable\* | :heavy_minus_sign: | The number of installments a buyer is required to make. | | -| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99` | 1299 | -| `merchantTaxId` | *JsonNullable\* | :heavy_minus_sign: | Merchant tax ID (for example, EIN or VAT number). | | -| `purchaseOrderNumber` | *JsonNullable\* | :heavy_minus_sign: | Invoice number or Purchase Order number. | | -| `customerReferenceNumber` | *JsonNullable\* | :heavy_minus_sign: | Customer code or reference. | | -| `amountIncludesTax` | *JsonNullable\* | :heavy_minus_sign: | Whether the tax is included in the amount. | false | -| `supplierOrderNumber` | *JsonNullable\* | :heavy_minus_sign: | The merchant's unique identifier for the sales order or invoice. | | -| `dutyAmount` | *JsonNullable\* | :heavy_minus_sign: | Total charges for import/export duties. | 1299 | -| `shippingAmount` | *JsonNullable\* | :heavy_minus_sign: | Total shipping amount. | 1299 | -| `integrationClient` | [JsonNullable\](../../models/components/IntegrationClient.md) | :heavy_minus_sign: | Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance. | web | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | *long* | :heavy_check_mark: | The monetary amount for this transaction, in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`. If the `intent` is set to `capture`, an amount greater than zero must be supplied. All gift card amounts are subtracted from this amount before the remainder is charged to the provided `payment_method`. | 1299 | +| `currency` | *String* | :heavy_check_mark: | A supported ISO 4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`. | **Example 1:** EUR
**Example 2:** GBP
**Example 3:** USD | +| `country` | *JsonNullable\* | :heavy_minus_sign: | The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not `null`, it must match the one specified for `country` in `payment_method`. Otherwise, the value specified for `country` in `payment_method` will be assumed implicitly. | US | +| `paymentMethod` | [JsonNullable\](../../models/components/TransactionCreatePaymentMethod.md) | :heavy_minus_sign: | The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added. | | +| `buyer` | [JsonNullable\](../../models/components/GuestBuyer.md) | :heavy_minus_sign: | Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used. | | +| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to associate this payment method to. If this field is provided then the `buyer_external_identifier` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The `external_identifier` of the buyer to associate this payment method to. If this field is provided then the `buyer_id` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field. | buyer-12345 | +| `giftCards` | List\<[GiftCardUnion](../../models/components/GiftCardUnion.md)> | :heavy_minus_sign: | The optional gift card(s) to use for this transaction. At least one gift card is required if no other `payment_method` has been added. By default, only a maximum limit of 10 gift cards may be used in a single transaction. Please contact our team to change this limit. | | +| `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | An external identifier that can be used to match the transaction against your own records. | transaction-12345 | +| `intent` | [Optional\](../../models/components/TransactionIntent.md) | :heavy_minus_sign: | N/A | | +| `store` | *Optional\* | :heavy_minus_sign: | Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set:

* The flag has to be set to `true` when the `payment_source` is set to `recurring` or `installment`, and `merchant_initiated` is set to `false`.
* The flag has to be set to `false` (or not set) when using a previously vaulted payment method. | true | +| `threeDSecureData` | [JsonNullable\](../../models/components/ThreeDSecureData.md) | :heavy_minus_sign: | Pass through 3-D Secure data to support external 3-D Secure authorisation. If using an external 3-D Secure provider, you should not pass a `redirect_url` in the `payment_method` object for a transaction. | | +| `threeDSecure` | [JsonNullable\](../../models/components/ThreeDSecure.md) | :heavy_minus_sign: | Optional 3-D Secure values to use during the authentication flow. | | +| `metadata` | Map\ | :heavy_minus_sign: | Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it. | {
"cohort": "cohort-12345",
"order": "order-12345"
} | +| `isSubsequentPayment` | *Optional\* | :heavy_minus_sign: | Indicates whether the transaction represents a subsequent payment coming from a setup recurring payment. Please note there are some restrictions on how this flag may be used.

The flag can only be `false` (or not set) when the transaction meets one of the following criteria:

* It is not `merchant_initiated`.
* `payment_source` is set to `card_on_file`.

The flag can only be set to `true` when the transaction meets one of the following criteria:
* It is not `merchant_initiated`.
* `payment_source` is set to `recurring` or `installment` and `merchant_initiated` is set to `true`.
* `payment_source` is set to `card_on_file`. | true | +| `merchantInitiated` | *Optional\* | :heavy_minus_sign: | Indicates whether the transaction was initiated by the merchant (true) or customer (false). | true | +| `paymentSource` | [Optional\](../../models/components/TransactionPaymentSource.md) | :heavy_minus_sign: | The way payment method information made it to this transaction. | | +| `airline` | [JsonNullable\](../../models/components/Airline.md) | :heavy_minus_sign: | The airline addendum data which describes the airline booking associated with this transaction. | | +| `cartItems` | List\<[CartItem](../../models/components/CartItem.md)> | :heavy_minus_sign: | An array of cart items that represents the line items of a transaction. | | +| `statementDescriptor` | [JsonNullable\](../../models/components/StatementDescriptor.md) | :heavy_minus_sign: | Details about the payment and the merchant which may end up on the (bank) statement for the payment. | | +| `previousSchemeTransactionId` | *JsonNullable\* | :heavy_minus_sign: | A scheme's transaction identifier to use in connecting a merchant initiated transaction to a previous customer initiated transaction. If not provided, and a qualifying customer initiated transaction has been previously made with the stored payment method, then Gr4vy will populate this value with the identifier returned for that transaction. This field is also know as the Visa Transaction Identifier, or Mastercard Trace ID. | 123456789012345 | +| `browserInfo` | [JsonNullable\](../../models/components/BrowserInfo.md) | :heavy_minus_sign: | Information about the browser used by the buyer. This can be used by anti-fraud services. | | +| `shippingDetailsId` | *JsonNullable\* | :heavy_minus_sign: | The unique identifier of a set of shipping details stored for the buyer. If provided, the created transaction will include a copy of the details at the point of transaction creation; i.e. it will not be affected by later changes to the detail in the database. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | +| `connectionOptions` | [JsonNullable\](../../models/components/TransactionConnectionOptions.md) | :heavy_minus_sign: | Allows for passing optional configuration per connection to take advantage of connection specific features. When provided, the data is only passed to the target connection type to prevent sharing configuration across connections. Please note that each of the keys this object are in kebab-case, for example `cybersource-anti-fraud` as they represent the ID of the connector. All the other keys will be snake case, for example `merchant_defined_data` or camel case to match an external API that the connector uses. | | +| `asyncCapture` | *Optional\* | :heavy_minus_sign: | Whether to capture the transaction asynchronously when an authorization-capture split occurs.

This flag is only used if the transaction flow is split between authorization and capture.
The split itself is not controlled by this flag and depends on other conditions, including delayed capture support, direct capture support, card scheme, gift cards, and anti-fraud decision.

- When `async_capture` is `false` (default) and applicable, the capture is attempted in the same request.
- When `async_capture` is `true` and applicable, the capture is performed outside the context of this request.

Redirect transactions are not affected by this flag. This flag can only be set to `true` when `intent` is set to `capture`. Please check the public documentation for full authorization-capture split behavior details. | true | +| `antiFraudFingerprint` | *JsonNullable\* | :heavy_minus_sign: | This field represents the fingerprint data to be passed to the active anti-fraud service. | yGeBAFYgFmM= | +| `paymentServiceId` | *JsonNullable\* | :heavy_minus_sign: | The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped. | fffd152a-9532-4087-9a4f-de58754210f0 | +| `accountFundingTransaction` | *Optional\* | :heavy_minus_sign: | Marks the transaction as an AFT. Requires the payment service to support this feature, and might `recipient` and `buyer` data | true | +| `allowPartialAuthorization` | *Optional\* | :heavy_minus_sign: | Defines if the transaction will allow for a partial authorization. | | +| `recipient` | [JsonNullable\](../../models/components/Recipient.md) | :heavy_minus_sign: | The recipient of any account to account funding. For use with AFTs. | | +| `installmentCount` | *JsonNullable\* | :heavy_minus_sign: | The number of installments a buyer is required to make. | | +| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99` | 1299 | +| `merchantTaxId` | *JsonNullable\* | :heavy_minus_sign: | Merchant tax ID (for example, EIN or VAT number). | | +| `purchaseOrderNumber` | *JsonNullable\* | :heavy_minus_sign: | Invoice number or Purchase Order number. | | +| `customerReferenceNumber` | *JsonNullable\* | :heavy_minus_sign: | Customer code or reference. | | +| `amountIncludesTax` | *JsonNullable\* | :heavy_minus_sign: | Whether the tax is included in the amount. | false | +| `supplierOrderNumber` | *JsonNullable\* | :heavy_minus_sign: | The merchant's unique identifier for the sales order or invoice. | | +| `dutyAmount` | *JsonNullable\* | :heavy_minus_sign: | Total charges for import/export duties. | 1299 | +| `shippingAmount` | *JsonNullable\* | :heavy_minus_sign: | Total shipping amount. | 1299 | +| `integrationClient` | [JsonNullable\](../../models/components/IntegrationClient.md) | :heavy_minus_sign: | Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance. | web | +| `approvalExpiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the buyer's approval window for this transaction expires. If not provided, this is automatically computed from the connector's default expiration time. The value cannot exceed the connector's maximum approval window. | 2026-04-01T12:00:00+00:00 | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentServiceRequest.md b/docs/models/operations/CreatePaymentServiceRequest.md index b9af628d..79f3a303 100644 --- a/docs/models/operations/CreatePaymentServiceRequest.md +++ b/docs/models/operations/CreatePaymentServiceRequest.md @@ -3,8 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | -| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | -| `paymentServiceUpdate` | [PaymentServiceUpdate](../../models/components/PaymentServiceUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | +| `paymentServiceCreate` | [PaymentServiceCreate](../../models/components/PaymentServiceCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerGiftCardsOrderBy.md b/docs/models/operations/ListBuyerGiftCardsOrderBy.md new file mode 100644 index 00000000..ebe32f07 --- /dev/null +++ b/docs/models/operations/ListBuyerGiftCardsOrderBy.md @@ -0,0 +1,22 @@ +# ListBuyerGiftCardsOrderBy + +The direction to sort the gift cards in. + +## Example Usage + +```java +import com.gr4vy.sdk.models.operations.ListBuyerGiftCardsOrderBy; + +ListBuyerGiftCardsOrderBy value = ListBuyerGiftCardsOrderBy.ASC; + +// Open enum: use .of() to create instances from custom string values +ListBuyerGiftCardsOrderBy custom = ListBuyerGiftCardsOrderBy.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | asc | +| `DESC` | desc | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerGiftCardsRequest.md b/docs/models/operations/ListBuyerGiftCardsRequest.md index bf4a9dc7..1075b09c 100644 --- a/docs/models/operations/ListBuyerGiftCardsRequest.md +++ b/docs/models/operations/ListBuyerGiftCardsRequest.md @@ -3,8 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `sortBy` | [JsonNullable\](../../models/operations/ListBuyerGiftCardsSortBy.md) | :heavy_minus_sign: | The field to sort the gift cards by. | last_used_at | +| `orderBy` | [Optional\](../../models/operations/ListBuyerGiftCardsOrderBy.md) | :heavy_minus_sign: | The direction to sort the gift cards in. | desc | +| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerGiftCardsSortBy.md b/docs/models/operations/ListBuyerGiftCardsSortBy.md new file mode 100644 index 00000000..3c13472d --- /dev/null +++ b/docs/models/operations/ListBuyerGiftCardsSortBy.md @@ -0,0 +1,21 @@ +# ListBuyerGiftCardsSortBy + +The field to sort the gift cards by. + +## Example Usage + +```java +import com.gr4vy.sdk.models.operations.ListBuyerGiftCardsSortBy; + +ListBuyerGiftCardsSortBy value = ListBuyerGiftCardsSortBy.LAST_USED_AT; +``` + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `LAST_USED_AT` | last_used_at | +| `USAGE_COUNT` | usage_count | +| `CIT_LAST_USED_AT` | cit_last_used_at | +| `CIT_USAGE_COUNT` | cit_usage_count | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerPaymentMethodsOrderBy.md b/docs/models/operations/ListBuyerPaymentMethodsOrderBy.md new file mode 100644 index 00000000..542cb059 --- /dev/null +++ b/docs/models/operations/ListBuyerPaymentMethodsOrderBy.md @@ -0,0 +1,22 @@ +# ListBuyerPaymentMethodsOrderBy + +The direction to sort the payment methods in. + +## Example Usage + +```java +import com.gr4vy.sdk.models.operations.ListBuyerPaymentMethodsOrderBy; + +ListBuyerPaymentMethodsOrderBy value = ListBuyerPaymentMethodsOrderBy.ASC; + +// Open enum: use .of() to create instances from custom string values +ListBuyerPaymentMethodsOrderBy custom = ListBuyerPaymentMethodsOrderBy.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | asc | +| `DESC` | desc | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerPaymentMethodsRequest.md b/docs/models/operations/ListBuyerPaymentMethodsRequest.md index 2e5f5a84..e9f30d17 100644 --- a/docs/models/operations/ListBuyerPaymentMethodsRequest.md +++ b/docs/models/operations/ListBuyerPaymentMethodsRequest.md @@ -7,8 +7,8 @@ | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to query payment methods for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | | `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The external identifier of the buyer to query payment methods for. | buyer-12345 | -| `sortBy` | [JsonNullable\](../../models/operations/SortBy.md) | :heavy_minus_sign: | The field to sort the payment methods by. | last_used_at | -| `orderBy` | [Optional\](../../models/operations/OrderBy.md) | :heavy_minus_sign: | The direction to sort the payment methods in. | desc | +| `sortBy` | [JsonNullable\](../../models/operations/ListBuyerPaymentMethodsSortBy.md) | :heavy_minus_sign: | The field to sort the payment methods by. | last_used_at | +| `orderBy` | [Optional\](../../models/operations/ListBuyerPaymentMethodsOrderBy.md) | :heavy_minus_sign: | The direction to sort the payment methods in. | desc | | `country` | *JsonNullable\* | :heavy_minus_sign: | The country code to filter payment methods by. This only applies to payment methods with a `country` value. | US | | `currency` | *JsonNullable\* | :heavy_minus_sign: | The currency code to filter payment methods by. This only applies to payment methods with a `currency` value. | USD | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/SortBy.md b/docs/models/operations/ListBuyerPaymentMethodsSortBy.md similarity index 65% rename from docs/models/operations/SortBy.md rename to docs/models/operations/ListBuyerPaymentMethodsSortBy.md index d0e66944..ae4603f3 100644 --- a/docs/models/operations/SortBy.md +++ b/docs/models/operations/ListBuyerPaymentMethodsSortBy.md @@ -1,13 +1,13 @@ -# SortBy +# ListBuyerPaymentMethodsSortBy The field to sort the payment methods by. ## Example Usage ```java -import com.gr4vy.sdk.models.operations.SortBy; +import com.gr4vy.sdk.models.operations.ListBuyerPaymentMethodsSortBy; -SortBy value = SortBy.LAST_USED_AT; +ListBuyerPaymentMethodsSortBy value = ListBuyerPaymentMethodsSortBy.LAST_USED_AT; ``` diff --git a/docs/models/operations/OrderBy.md b/docs/models/operations/OrderBy.md deleted file mode 100644 index c2f0d886..00000000 --- a/docs/models/operations/OrderBy.md +++ /dev/null @@ -1,22 +0,0 @@ -# OrderBy - -The direction to sort the payment methods in. - -## Example Usage - -```java -import com.gr4vy.sdk.models.operations.OrderBy; - -OrderBy value = OrderBy.ASC; - -// Open enum: use .of() to create instances from custom string values -OrderBy custom = OrderBy.of("custom_value"); -``` - - -## Values - -| Name | Value | -| ------ | ------ | -| `ASC` | asc | -| `DESC` | desc | \ No newline at end of file diff --git a/docs/models/operations/UpdatePaymentMethodRequest.md b/docs/models/operations/UpdatePaymentMethodRequest.md new file mode 100644 index 00000000..14f80fd1 --- /dev/null +++ b/docs/models/operations/UpdatePaymentMethodRequest.md @@ -0,0 +1,10 @@ +# UpdatePaymentMethodRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | +| `paymentMethodUpdate` | [PaymentMethodUpdate](../../models/components/PaymentMethodUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UpdatePaymentMethodResponse.md b/docs/models/operations/UpdatePaymentMethodResponse.md new file mode 100644 index 00000000..7373e335 --- /dev/null +++ b/docs/models/operations/UpdatePaymentMethodResponse.md @@ -0,0 +1,11 @@ +# UpdatePaymentMethodResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `paymentMethod` | [Optional\](../../models/components/PaymentMethod.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/UpdatePaymentServiceRequest.md b/docs/models/operations/UpdatePaymentServiceRequest.md index 8fdb0139..a3fc7853 100644 --- a/docs/models/operations/UpdatePaymentServiceRequest.md +++ b/docs/models/operations/UpdatePaymentServiceRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | -| `paymentServiceCreate` | [PaymentServiceCreate](../../models/components/PaymentServiceCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | +| `paymentServiceUpdate` | [PaymentServiceUpdate](../../models/components/PaymentServiceUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdks/buyersgiftcards/README.md b/docs/sdks/buyersgiftcards/README.md index c559ff08..489a9ace 100644 --- a/docs/sdks/buyersgiftcards/README.md +++ b/docs/sdks/buyersgiftcards/README.md @@ -18,6 +18,7 @@ package hello.world; import com.gr4vy.sdk.Gr4vy; import com.gr4vy.sdk.models.errors.*; +import com.gr4vy.sdk.models.operations.ListBuyerGiftCardsRequest; import com.gr4vy.sdk.models.operations.ListBuyerGiftCardsResponse; import java.lang.Exception; @@ -30,7 +31,11 @@ public class Application { .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) .build(); + ListBuyerGiftCardsRequest req = ListBuyerGiftCardsRequest.builder() + .build(); + ListBuyerGiftCardsResponse res = sdk.buyers().giftCards().list() + .request(req) .call(); if (res.giftCardSummaries().isPresent()) { @@ -42,11 +47,9 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [ListBuyerGiftCardsRequest](../../models/operations/ListBuyerGiftCardsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response diff --git a/docs/sdks/buyerspaymentmethods/README.md b/docs/sdks/buyerspaymentmethods/README.md index ff2d1fcb..6a0ef4b6 100644 --- a/docs/sdks/buyerspaymentmethods/README.md +++ b/docs/sdks/buyerspaymentmethods/README.md @@ -33,7 +33,7 @@ public class Application { ListBuyerPaymentMethodsRequest req = ListBuyerPaymentMethodsRequest.builder() .buyerId("fe26475d-ec3e-4884-9553-f7356683f7f9") .buyerExternalIdentifier("buyer-12345") - .sortBy(SortBy.LAST_USED_AT) + .sortBy(ListBuyerPaymentMethodsSortBy.LAST_USED_AT) .country("US") .currency("USD") .build(); diff --git a/docs/sdks/paymentmethods/README.md b/docs/sdks/paymentmethods/README.md index 949190c2..0869232d 100644 --- a/docs/sdks/paymentmethods/README.md +++ b/docs/sdks/paymentmethods/README.md @@ -7,6 +7,7 @@ * [list](#list) - List all payment methods * [create](#create) - Create payment method * [get](#get) - Get payment method +* [update](#update) - Update payment method * [delete](#delete) - Delete payment method ## list @@ -212,6 +213,74 @@ public class Application { | models/errors/Error504 | 504 | application/json | | models/errors/APIException | 4XX, 5XX | \*/\* | +## update + +Update the details of a stored payment method. + +### Example Usage + + +```java +package hello.world; + +import com.gr4vy.sdk.Gr4vy; +import com.gr4vy.sdk.models.components.PaymentMethodUpdate; +import com.gr4vy.sdk.models.errors.*; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + Gr4vy sdk = Gr4vy.builder() + .merchantAccountId("") + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + UpdatePaymentMethodResponse res = sdk.paymentMethods().update() + .paymentMethodId("ef9496d8-53a5-4aad-8ca2-00eb68334389") + .paymentMethodUpdate(PaymentMethodUpdate.builder() + .build()) + .call(); + + if (res.paymentMethod().isPresent()) { + System.out.println(res.paymentMethod().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | +| `paymentMethodUpdate` | [PaymentMethodUpdate](../../models/components/PaymentMethodUpdate.md) | :heavy_check_mark: | N/A | | + +### Response + +**[UpdatePaymentMethodResponse](../../models/operations/UpdatePaymentMethodResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/Error400 | 400 | application/json | +| models/errors/Error401 | 401 | application/json | +| models/errors/Error403 | 403 | application/json | +| models/errors/Error404 | 404 | application/json | +| models/errors/Error405 | 405 | application/json | +| models/errors/Error409 | 409 | application/json | +| models/errors/HTTPValidationError | 422 | application/json | +| models/errors/Error425 | 425 | application/json | +| models/errors/Error429 | 429 | application/json | +| models/errors/Error500 | 500 | application/json | +| models/errors/Error502 | 502 | application/json | +| models/errors/Error504 | 504 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + ## delete Delete a payment method. diff --git a/docs/sdks/paymentservices/README.md b/docs/sdks/paymentservices/README.md index 7fff302e..51e7d47f 100644 --- a/docs/sdks/paymentservices/README.md +++ b/docs/sdks/paymentservices/README.md @@ -5,9 +5,9 @@ ### Available Operations * [list](#list) - List payment services -* [create](#create) - Update a configured payment service +* [create](#create) - Configure a payment service * [get](#get) - Get payment service -* [update](#update) - Configure a payment service +* [update](#update) - Update a configured payment service * [delete](#delete) - Delete a configured payment service * [verify](#verify) - Verify payment service credentials * [session](#session) - Create a session for a payment service definition @@ -83,11 +83,11 @@ public class Application { ## create -Updates the configuration of a payment service. +Configures a new payment service for use by merchants. ### Example Usage - + ```java package hello.world; @@ -95,7 +95,7 @@ import com.gr4vy.sdk.Gr4vy; import com.gr4vy.sdk.models.components.Field; import com.gr4vy.sdk.models.components.PaymentServiceCreate; import com.gr4vy.sdk.models.errors.*; -import com.gr4vy.sdk.models.operations.UpdatePaymentServiceResponse; +import com.gr4vy.sdk.models.operations.CreatePaymentServiceResponse; import java.lang.Exception; import java.util.List; @@ -108,15 +108,11 @@ public class Application { .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) .build(); - UpdatePaymentServiceResponse res = sdk.paymentServices().create() + CreatePaymentServiceResponse res = sdk.paymentServices().create() .paymentServiceCreate(PaymentServiceCreate.builder() .displayName("Stripe") .paymentServiceDefinitionId("stripe-card") .fields(List.of( - Field.builder() - .key("api_key") - .value("key-12345") - .build(), Field.builder() .key("api_key") .value("key-12345") @@ -150,7 +146,7 @@ public class Application { ### Response -**[UpdatePaymentServiceResponse](../../models/operations/UpdatePaymentServiceResponse.md)** +**[CreatePaymentServiceResponse](../../models/operations/CreatePaymentServiceResponse.md)** ### Errors @@ -236,18 +232,18 @@ public class Application { ## update -Configures a new payment service for use by merchants. +Updates the configuration of a payment service. ### Example Usage - + ```java package hello.world; import com.gr4vy.sdk.Gr4vy; import com.gr4vy.sdk.models.components.PaymentServiceUpdate; import com.gr4vy.sdk.models.errors.*; -import com.gr4vy.sdk.models.operations.CreatePaymentServiceResponse; +import com.gr4vy.sdk.models.operations.UpdatePaymentServiceResponse; import java.lang.Exception; public class Application { @@ -259,7 +255,7 @@ public class Application { .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) .build(); - CreatePaymentServiceResponse res = sdk.paymentServices().update() + UpdatePaymentServiceResponse res = sdk.paymentServices().update() .paymentServiceId("fffd152a-9532-4087-9a4f-de58754210f0") .paymentServiceUpdate(PaymentServiceUpdate.builder() .settlementReportingEnabled(true) @@ -283,7 +279,7 @@ public class Application { ### Response -**[CreatePaymentServiceResponse](../../models/operations/CreatePaymentServiceResponse.md)** +**[UpdatePaymentServiceResponse](../../models/operations/UpdatePaymentServiceResponse.md)** ### Errors diff --git a/gradle.properties b/gradle.properties index 9d426f78..066282b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.gr4vy artifactId=sdk -version=2.16.52 +version=2.16.53 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java b/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java index 0ce620d8..d02d1e49 100644 --- a/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java +++ b/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java @@ -11,10 +11,8 @@ import com.gr4vy.sdk.operations.ListBuyerGiftCards; import com.gr4vy.sdk.utils.Headers; import com.gr4vy.sdk.utils.Options; -import java.lang.String; import java.util.Optional; import java.util.concurrent.CompletableFuture; -import org.openapitools.jackson.nullable.JsonNullable; public class AsyncBuyersGiftCards { @@ -53,12 +51,11 @@ public ListBuyerGiftCardsRequestBuilder list() { * *

List all the stored gift cards for a specific buyer. * + * @param request The request object containing all the parameters for the API call. * @return {@code CompletableFuture} - The async response */ - public CompletableFuture listDirect() { - return list( - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty()); + public CompletableFuture list(ListBuyerGiftCardsRequest request) { + return list(request, Optional.empty()); } /** @@ -66,22 +63,11 @@ public CompletableFuture listDirect() { * *

List all the stored gift cards for a specific buyer. * - * @param buyerExternalIdentifier - * @param buyerId - * @param merchantAccountId + * @param request The request object containing all the parameters for the API call. * @param options additional options * @return {@code CompletableFuture} - The async response */ - public CompletableFuture list( - JsonNullable buyerExternalIdentifier, JsonNullable buyerId, - JsonNullable merchantAccountId, Optional options) { - ListBuyerGiftCardsRequest request = - ListBuyerGiftCardsRequest - .builder() - .buyerExternalIdentifier(buyerExternalIdentifier) - .buyerId(buyerId) - .merchantAccountId(merchantAccountId) - .build(); + public CompletableFuture list(ListBuyerGiftCardsRequest request, Optional options) { AsyncRequestOperation operation = new ListBuyerGiftCards.Async( sdkConfiguration, options, sdkConfiguration.retryScheduler(), diff --git a/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java b/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java index ab92881e..97a34a84 100644 --- a/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java +++ b/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java @@ -5,11 +5,13 @@ import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; +import com.gr4vy.sdk.models.components.PaymentMethodUpdate; import com.gr4vy.sdk.models.operations.Body; import com.gr4vy.sdk.models.operations.CreatePaymentMethodRequest; import com.gr4vy.sdk.models.operations.DeletePaymentMethodRequest; import com.gr4vy.sdk.models.operations.GetPaymentMethodRequest; import com.gr4vy.sdk.models.operations.ListPaymentMethodsRequest; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequest; import com.gr4vy.sdk.models.operations.async.CreatePaymentMethodRequestBuilder; import com.gr4vy.sdk.models.operations.async.CreatePaymentMethodResponse; import com.gr4vy.sdk.models.operations.async.DeletePaymentMethodRequestBuilder; @@ -18,10 +20,13 @@ import com.gr4vy.sdk.models.operations.async.GetPaymentMethodResponse; import com.gr4vy.sdk.models.operations.async.ListPaymentMethodsRequestBuilder; import com.gr4vy.sdk.models.operations.async.ListPaymentMethodsResponse; +import com.gr4vy.sdk.models.operations.async.UpdatePaymentMethodRequestBuilder; +import com.gr4vy.sdk.models.operations.async.UpdatePaymentMethodResponse; import com.gr4vy.sdk.operations.CreatePaymentMethod; import com.gr4vy.sdk.operations.DeletePaymentMethod; import com.gr4vy.sdk.operations.GetPaymentMethod; import com.gr4vy.sdk.operations.ListPaymentMethods; +import com.gr4vy.sdk.operations.UpdatePaymentMethod; import com.gr4vy.sdk.utils.Headers; import com.gr4vy.sdk.utils.Options; import java.lang.String; @@ -201,6 +206,57 @@ public CompletableFuture get( } + /** + * Update payment method + * + *

Update the details of a stored payment method. + * + * @return The async call builder + */ + public UpdatePaymentMethodRequestBuilder update() { + return new UpdatePaymentMethodRequestBuilder(sdkConfiguration); + } + + /** + * Update payment method + * + *

Update the details of a stored payment method. + * + * @param paymentMethodId The ID of the payment method + * @param paymentMethodUpdate Request body for updating a stored payment method. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture update(String paymentMethodId, PaymentMethodUpdate paymentMethodUpdate) { + return update(paymentMethodId, JsonNullable.undefined(), paymentMethodUpdate); + } + + /** + * Update payment method + * + *

Update the details of a stored payment method. + * + * @param paymentMethodId The ID of the payment method + * @param merchantAccountId + * @param paymentMethodUpdate Request body for updating a stored payment method. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture update( + String paymentMethodId, JsonNullable merchantAccountId, + PaymentMethodUpdate paymentMethodUpdate) { + UpdatePaymentMethodRequest request = + UpdatePaymentMethodRequest + .builder() + .paymentMethodId(paymentMethodId) + .merchantAccountId(merchantAccountId) + .paymentMethodUpdate(paymentMethodUpdate) + .build(); + AsyncRequestOperation operation + = new UpdatePaymentMethod.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + /** * Delete payment method * diff --git a/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java b/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java index cfe5e0d4..13a36eb2 100644 --- a/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java +++ b/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java @@ -109,46 +109,46 @@ public CompletableFuture list(ListPaymentServicesRe /** - * Update a configured payment service + * Configure a payment service * - *

Updates the configuration of a payment service. + *

Configures a new payment service for use by merchants. * * @return The async call builder */ - public UpdatePaymentServiceRequestBuilder create() { - return new UpdatePaymentServiceRequestBuilder(sdkConfiguration); + public CreatePaymentServiceRequestBuilder create() { + return new CreatePaymentServiceRequestBuilder(sdkConfiguration); } /** - * Update a configured payment service + * Configure a payment service * - *

Updates the configuration of a payment service. + *

Configures a new payment service for use by merchants. * * @param paymentServiceCreate Request body for activating a payment service - * @return {@code CompletableFuture} - The async response + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture create(PaymentServiceCreate paymentServiceCreate) { + public CompletableFuture create(PaymentServiceCreate paymentServiceCreate) { return create(JsonNullable.undefined(), paymentServiceCreate); } /** - * Update a configured payment service + * Configure a payment service * - *

Updates the configuration of a payment service. + *

Configures a new payment service for use by merchants. * * @param merchantAccountId * @param paymentServiceCreate Request body for activating a payment service - * @return {@code CompletableFuture} - The async response + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) { - UpdatePaymentServiceRequest request = - UpdatePaymentServiceRequest + public CompletableFuture create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) { + CreatePaymentServiceRequest request = + CreatePaymentServiceRequest .builder() .merchantAccountId(merchantAccountId) .paymentServiceCreate(paymentServiceCreate) .build(); - AsyncRequestOperation operation - = new UpdatePaymentService.Async(sdkConfiguration, _headers); + AsyncRequestOperation operation + = new CreatePaymentService.Async(sdkConfiguration, _headers); return operation.doRequest(request) .thenCompose(operation::handleResponse); } @@ -206,51 +206,51 @@ public CompletableFuture get( /** - * Configure a payment service + * Update a configured payment service * - *

Configures a new payment service for use by merchants. + *

Updates the configuration of a payment service. * * @return The async call builder */ - public CreatePaymentServiceRequestBuilder update() { - return new CreatePaymentServiceRequestBuilder(sdkConfiguration); + public UpdatePaymentServiceRequestBuilder update() { + return new UpdatePaymentServiceRequestBuilder(sdkConfiguration); } /** - * Configure a payment service + * Update a configured payment service * - *

Configures a new payment service for use by merchants. + *

Updates the configuration of a payment service. * * @param paymentServiceId the ID of the payment service * @param paymentServiceUpdate Request body for updating a Payment Service - * @return {@code CompletableFuture} - The async response + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) { + public CompletableFuture update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) { return update(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate); } /** - * Configure a payment service + * Update a configured payment service * - *

Configures a new payment service for use by merchants. + *

Updates the configuration of a payment service. * * @param paymentServiceId the ID of the payment service * @param merchantAccountId * @param paymentServiceUpdate Request body for updating a Payment Service - * @return {@code CompletableFuture} - The async response + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture update( + public CompletableFuture update( String paymentServiceId, JsonNullable merchantAccountId, PaymentServiceUpdate paymentServiceUpdate) { - CreatePaymentServiceRequest request = - CreatePaymentServiceRequest + UpdatePaymentServiceRequest request = + UpdatePaymentServiceRequest .builder() .paymentServiceId(paymentServiceId) .merchantAccountId(merchantAccountId) .paymentServiceUpdate(paymentServiceUpdate) .build(); - AsyncRequestOperation operation - = new CreatePaymentService.Async(sdkConfiguration, _headers); + AsyncRequestOperation operation + = new UpdatePaymentService.Async(sdkConfiguration, _headers); return operation.doRequest(request) .thenCompose(operation::handleResponse); } diff --git a/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java b/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java index f3803fe7..81f5e07b 100644 --- a/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java +++ b/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java @@ -11,9 +11,7 @@ import com.gr4vy.sdk.operations.ListBuyerGiftCards; import com.gr4vy.sdk.utils.Headers; import com.gr4vy.sdk.utils.Options; -import java.lang.String; import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; public class BuyersGiftCards { @@ -51,12 +49,12 @@ public ListBuyerGiftCardsRequestBuilder list() { * *

List all the stored gift cards for a specific buyer. * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public ListBuyerGiftCardsResponse listDirect() { - return list(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty()); + public ListBuyerGiftCardsResponse list(ListBuyerGiftCardsRequest request) { + return list(request, Optional.empty()); } /** @@ -64,23 +62,12 @@ public ListBuyerGiftCardsResponse listDirect() { * *

List all the stored gift cards for a specific buyer. * - * @param buyerExternalIdentifier - * @param buyerId - * @param merchantAccountId + * @param request The request object containing all the parameters for the API call. * @param options additional options * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public ListBuyerGiftCardsResponse list( - JsonNullable buyerExternalIdentifier, JsonNullable buyerId, - JsonNullable merchantAccountId, Optional options) { - ListBuyerGiftCardsRequest request = - ListBuyerGiftCardsRequest - .builder() - .buyerExternalIdentifier(buyerExternalIdentifier) - .buyerId(buyerId) - .merchantAccountId(merchantAccountId) - .build(); + public ListBuyerGiftCardsResponse list(ListBuyerGiftCardsRequest request, Optional options) { RequestOperation operation = new ListBuyerGiftCards.Sync(sdkConfiguration, options, _headers); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/gr4vy/sdk/PaymentMethods.java b/src/main/java/com/gr4vy/sdk/PaymentMethods.java index f8fb6b6f..2701ffc4 100644 --- a/src/main/java/com/gr4vy/sdk/PaymentMethods.java +++ b/src/main/java/com/gr4vy/sdk/PaymentMethods.java @@ -5,6 +5,7 @@ import static com.gr4vy.sdk.operations.Operations.RequestOperation; +import com.gr4vy.sdk.models.components.PaymentMethodUpdate; import com.gr4vy.sdk.models.operations.Body; import com.gr4vy.sdk.models.operations.CreatePaymentMethodRequest; import com.gr4vy.sdk.models.operations.CreatePaymentMethodRequestBuilder; @@ -18,10 +19,14 @@ import com.gr4vy.sdk.models.operations.ListPaymentMethodsRequest; import com.gr4vy.sdk.models.operations.ListPaymentMethodsRequestBuilder; import com.gr4vy.sdk.models.operations.ListPaymentMethodsResponse; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequest; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequestBuilder; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodResponse; import com.gr4vy.sdk.operations.CreatePaymentMethod; import com.gr4vy.sdk.operations.DeletePaymentMethod; import com.gr4vy.sdk.operations.GetPaymentMethod; import com.gr4vy.sdk.operations.ListPaymentMethods; +import com.gr4vy.sdk.operations.UpdatePaymentMethod; import com.gr4vy.sdk.utils.Headers; import com.gr4vy.sdk.utils.Options; import java.lang.String; @@ -195,6 +200,57 @@ public GetPaymentMethodResponse get( return operation.handleResponse(operation.doRequest(request)); } + /** + * Update payment method + * + *

Update the details of a stored payment method. + * + * @return The call builder + */ + public UpdatePaymentMethodRequestBuilder update() { + return new UpdatePaymentMethodRequestBuilder(sdkConfiguration); + } + + /** + * Update payment method + * + *

Update the details of a stored payment method. + * + * @param paymentMethodId The ID of the payment method + * @param paymentMethodUpdate Request body for updating a stored payment method. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public UpdatePaymentMethodResponse update(String paymentMethodId, PaymentMethodUpdate paymentMethodUpdate) { + return update(paymentMethodId, JsonNullable.undefined(), paymentMethodUpdate); + } + + /** + * Update payment method + * + *

Update the details of a stored payment method. + * + * @param paymentMethodId The ID of the payment method + * @param merchantAccountId + * @param paymentMethodUpdate Request body for updating a stored payment method. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public UpdatePaymentMethodResponse update( + String paymentMethodId, JsonNullable merchantAccountId, + PaymentMethodUpdate paymentMethodUpdate) { + UpdatePaymentMethodRequest request = + UpdatePaymentMethodRequest + .builder() + .paymentMethodId(paymentMethodId) + .merchantAccountId(merchantAccountId) + .paymentMethodUpdate(paymentMethodUpdate) + .build(); + RequestOperation operation + = new UpdatePaymentMethod.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * Delete payment method * diff --git a/src/main/java/com/gr4vy/sdk/PaymentServices.java b/src/main/java/com/gr4vy/sdk/PaymentServices.java index d6a31c71..0ecdd593 100644 --- a/src/main/java/com/gr4vy/sdk/PaymentServices.java +++ b/src/main/java/com/gr4vy/sdk/PaymentServices.java @@ -105,48 +105,48 @@ public ListPaymentServicesResponse list(ListPaymentServicesRequest request, Opti } /** - * Update a configured payment service + * Configure a payment service * - *

Updates the configuration of a payment service. + *

Configures a new payment service for use by merchants. * * @return The call builder */ - public UpdatePaymentServiceRequestBuilder create() { - return new UpdatePaymentServiceRequestBuilder(sdkConfiguration); + public CreatePaymentServiceRequestBuilder create() { + return new CreatePaymentServiceRequestBuilder(sdkConfiguration); } /** - * Update a configured payment service + * Configure a payment service * - *

Updates the configuration of a payment service. + *

Configures a new payment service for use by merchants. * * @param paymentServiceCreate Request body for activating a payment service * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public UpdatePaymentServiceResponse create(PaymentServiceCreate paymentServiceCreate) { + public CreatePaymentServiceResponse create(PaymentServiceCreate paymentServiceCreate) { return create(JsonNullable.undefined(), paymentServiceCreate); } /** - * Update a configured payment service + * Configure a payment service * - *

Updates the configuration of a payment service. + *

Configures a new payment service for use by merchants. * * @param merchantAccountId * @param paymentServiceCreate Request body for activating a payment service * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public UpdatePaymentServiceResponse create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) { - UpdatePaymentServiceRequest request = - UpdatePaymentServiceRequest + public CreatePaymentServiceResponse create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) { + CreatePaymentServiceRequest request = + CreatePaymentServiceRequest .builder() .merchantAccountId(merchantAccountId) .paymentServiceCreate(paymentServiceCreate) .build(); - RequestOperation operation - = new UpdatePaymentService.Sync(sdkConfiguration, _headers); + RequestOperation operation + = new CreatePaymentService.Sync(sdkConfiguration, _headers); return operation.handleResponse(operation.doRequest(request)); } @@ -200,34 +200,34 @@ public GetPaymentServiceResponse get( } /** - * Configure a payment service + * Update a configured payment service * - *

Configures a new payment service for use by merchants. + *

Updates the configuration of a payment service. * * @return The call builder */ - public CreatePaymentServiceRequestBuilder update() { - return new CreatePaymentServiceRequestBuilder(sdkConfiguration); + public UpdatePaymentServiceRequestBuilder update() { + return new UpdatePaymentServiceRequestBuilder(sdkConfiguration); } /** - * Configure a payment service + * Update a configured payment service * - *

Configures a new payment service for use by merchants. + *

Updates the configuration of a payment service. * * @param paymentServiceId the ID of the payment service * @param paymentServiceUpdate Request body for updating a Payment Service * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public CreatePaymentServiceResponse update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) { + public UpdatePaymentServiceResponse update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) { return update(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate); } /** - * Configure a payment service + * Update a configured payment service * - *

Configures a new payment service for use by merchants. + *

Updates the configuration of a payment service. * * @param paymentServiceId the ID of the payment service * @param merchantAccountId @@ -235,18 +235,18 @@ public CreatePaymentServiceResponse update(String paymentServiceId, PaymentServi * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public CreatePaymentServiceResponse update( + public UpdatePaymentServiceResponse update( String paymentServiceId, JsonNullable merchantAccountId, PaymentServiceUpdate paymentServiceUpdate) { - CreatePaymentServiceRequest request = - CreatePaymentServiceRequest + UpdatePaymentServiceRequest request = + UpdatePaymentServiceRequest .builder() .paymentServiceId(paymentServiceId) .merchantAccountId(merchantAccountId) .paymentServiceUpdate(paymentServiceUpdate) .build(); - RequestOperation operation - = new CreatePaymentService.Sync(sdkConfiguration, _headers); + RequestOperation operation + = new UpdatePaymentService.Sync(sdkConfiguration, _headers); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java index e2e6d732..647e3c6d 100644 --- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java +++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java @@ -22,8 +22,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "1.0.0"; - public static final String SDK_VERSION = "2.16.52"; - public static final String GEN_VERSION = "2.873.1"; + public static final String SDK_VERSION = "2.16.53"; + public static final String GEN_VERSION = "2.881.4"; private static final String BASE_PACKAGE = "com.gr4vy.sdk"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java b/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java index 2d7b0712..2b1d991f 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java +++ b/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java @@ -23,6 +23,7 @@ public class DigitalWalletProvider { public static final DigitalWalletProvider APPLE = new DigitalWalletProvider("apple"); public static final DigitalWalletProvider GOOGLE = new DigitalWalletProvider("google"); public static final DigitalWalletProvider CLICK_TO_PAY = new DigitalWalletProvider("click-to-pay"); + public static final DigitalWalletProvider PAZE = new DigitalWalletProvider("paze"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -99,6 +100,7 @@ private static final Map createValuesMap() { map.put("apple", APPLE); map.put("google", GOOGLE); map.put("click-to-pay", CLICK_TO_PAY); + map.put("paze", PAZE); return map; } @@ -107,6 +109,7 @@ private static final Map createEnumsMap() { map.put("apple", DigitalWalletProviderEnum.APPLE); map.put("google", DigitalWalletProviderEnum.GOOGLE); map.put("click-to-pay", DigitalWalletProviderEnum.CLICK_TO_PAY); + map.put("paze", DigitalWalletProviderEnum.PAZE); return map; } @@ -115,7 +118,8 @@ public enum DigitalWalletProviderEnum { APPLE("apple"), GOOGLE("google"), - CLICK_TO_PAY("click-to-pay"),; + CLICK_TO_PAY("click-to-pay"), + PAZE("paze"),; private final String value; diff --git a/src/main/java/com/gr4vy/sdk/models/components/EcommpayOptions.java b/src/main/java/com/gr4vy/sdk/models/components/EcommpayOptions.java new file mode 100644 index 00000000..72c0f10d --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/components/EcommpayOptions.java @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class EcommpayOptions { + /** + * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("booking_start_date") + private JsonNullable bookingStartDate; + + /** + * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("booking_end_date") + private JsonNullable bookingEndDate; + + @JsonCreator + public EcommpayOptions( + @JsonProperty("booking_start_date") JsonNullable bookingStartDate, + @JsonProperty("booking_end_date") JsonNullable bookingEndDate) { + Utils.checkNotNull(bookingStartDate, "bookingStartDate"); + Utils.checkNotNull(bookingEndDate, "bookingEndDate"); + this.bookingStartDate = bookingStartDate; + this.bookingEndDate = bookingEndDate; + } + + public EcommpayOptions() { + this(JsonNullable.undefined(), JsonNullable.undefined()); + } + + /** + * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + @JsonIgnore + public JsonNullable bookingStartDate() { + return bookingStartDate; + } + + /** + * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + @JsonIgnore + public JsonNullable bookingEndDate() { + return bookingEndDate; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public EcommpayOptions withBookingStartDate(String bookingStartDate) { + Utils.checkNotNull(bookingStartDate, "bookingStartDate"); + this.bookingStartDate = JsonNullable.of(bookingStartDate); + return this; + } + + /** + * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public EcommpayOptions withBookingStartDate(JsonNullable bookingStartDate) { + Utils.checkNotNull(bookingStartDate, "bookingStartDate"); + this.bookingStartDate = bookingStartDate; + return this; + } + + /** + * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public EcommpayOptions withBookingEndDate(String bookingEndDate) { + Utils.checkNotNull(bookingEndDate, "bookingEndDate"); + this.bookingEndDate = JsonNullable.of(bookingEndDate); + return this; + } + + /** + * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public EcommpayOptions withBookingEndDate(JsonNullable bookingEndDate) { + Utils.checkNotNull(bookingEndDate, "bookingEndDate"); + this.bookingEndDate = bookingEndDate; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EcommpayOptions other = (EcommpayOptions) o; + return + Utils.enhancedDeepEquals(this.bookingStartDate, other.bookingStartDate) && + Utils.enhancedDeepEquals(this.bookingEndDate, other.bookingEndDate); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + bookingStartDate, bookingEndDate); + } + + @Override + public String toString() { + return Utils.toString(EcommpayOptions.class, + "bookingStartDate", bookingStartDate, + "bookingEndDate", bookingEndDate); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable bookingStartDate = JsonNullable.undefined(); + + private JsonNullable bookingEndDate = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public Builder bookingStartDate(String bookingStartDate) { + Utils.checkNotNull(bookingStartDate, "bookingStartDate"); + this.bookingStartDate = JsonNullable.of(bookingStartDate); + return this; + } + + /** + * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public Builder bookingStartDate(JsonNullable bookingStartDate) { + Utils.checkNotNull(bookingStartDate, "bookingStartDate"); + this.bookingStartDate = bookingStartDate; + return this; + } + + + /** + * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public Builder bookingEndDate(String bookingEndDate) { + Utils.checkNotNull(bookingEndDate, "bookingEndDate"); + this.bookingEndDate = JsonNullable.of(bookingEndDate); + return this; + } + + /** + * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs. + */ + public Builder bookingEndDate(JsonNullable bookingEndDate) { + Utils.checkNotNull(bookingEndDate, "bookingEndDate"); + this.bookingEndDate = bookingEndDate; + return this; + } + + public EcommpayOptions build() { + + return new EcommpayOptions( + bookingStartDate, bookingEndDate); + } + + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java b/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java index 7a5b104a..86e82602 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java +++ b/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -88,6 +89,32 @@ public class GiftCard { @JsonProperty("updated_at") private OffsetDateTime updatedAt; + /** + * The timestamp when this gift card was last used in a transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("last_used_at") + private JsonNullable lastUsedAt; + + /** + * The number of times this gift card has been used in transactions. + */ + @JsonProperty("usage_count") + private long usageCount; + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("cit_last_used_at") + private JsonNullable citLastUsedAt; + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + @JsonProperty("cit_usage_count") + private long citUsageCount; + @JsonCreator public GiftCard( @JsonProperty("id") String id, @@ -99,7 +126,11 @@ public GiftCard( @JsonProperty("expiration_date") JsonNullable expirationDate, @JsonProperty("buyer") JsonNullable buyer, @JsonProperty("created_at") OffsetDateTime createdAt, - @JsonProperty("updated_at") OffsetDateTime updatedAt) { + @JsonProperty("updated_at") OffsetDateTime updatedAt, + @JsonProperty("last_used_at") JsonNullable lastUsedAt, + @JsonProperty("usage_count") long usageCount, + @JsonProperty("cit_last_used_at") JsonNullable citLastUsedAt, + @JsonProperty("cit_usage_count") long citUsageCount) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(giftCardService, "giftCardService"); @@ -110,6 +141,10 @@ public GiftCard( Utils.checkNotNull(buyer, "buyer"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + Utils.checkNotNull(usageCount, "usageCount"); + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + Utils.checkNotNull(citUsageCount, "citUsageCount"); this.type = Builder._SINGLETON_VALUE_Type.value(); this.id = id; this.merchantAccountId = merchantAccountId; @@ -121,6 +156,10 @@ public GiftCard( this.buyer = buyer; this.createdAt = createdAt; this.updatedAt = updatedAt; + this.lastUsedAt = lastUsedAt; + this.usageCount = usageCount; + this.citLastUsedAt = citLastUsedAt; + this.citUsageCount = citUsageCount; } public GiftCard( @@ -131,11 +170,14 @@ public GiftCard( String subBin, String last4, OffsetDateTime createdAt, - OffsetDateTime updatedAt) { + OffsetDateTime updatedAt, + long usageCount, + long citUsageCount) { this(id, merchantAccountId, giftCardService, bin, subBin, last4, JsonNullable.undefined(), JsonNullable.undefined(), createdAt, - updatedAt); + updatedAt, JsonNullable.undefined(), usageCount, + JsonNullable.undefined(), citUsageCount); } /** @@ -225,6 +267,38 @@ public OffsetDateTime updatedAt() { return updatedAt; } + /** + * The timestamp when this gift card was last used in a transaction. + */ + @JsonIgnore + public JsonNullable lastUsedAt() { + return lastUsedAt; + } + + /** + * The number of times this gift card has been used in transactions. + */ + @JsonIgnore + public long usageCount() { + return usageCount; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + @JsonIgnore + public JsonNullable citLastUsedAt() { + return citLastUsedAt; + } + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + @JsonIgnore + public long citUsageCount() { + return citUsageCount; + } + public static Builder builder() { return new Builder(); } @@ -337,6 +411,60 @@ public GiftCard withUpdatedAt(OffsetDateTime updatedAt) { return this; } + /** + * The timestamp when this gift card was last used in a transaction. + */ + public GiftCard withLastUsedAt(OffsetDateTime lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = JsonNullable.of(lastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction. + */ + public GiftCard withLastUsedAt(JsonNullable lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = lastUsedAt; + return this; + } + + /** + * The number of times this gift card has been used in transactions. + */ + public GiftCard withUsageCount(long usageCount) { + Utils.checkNotNull(usageCount, "usageCount"); + this.usageCount = usageCount; + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public GiftCard withCitLastUsedAt(OffsetDateTime citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = JsonNullable.of(citLastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public GiftCard withCitLastUsedAt(JsonNullable citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = citLastUsedAt; + return this; + } + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + public GiftCard withCitUsageCount(long citUsageCount) { + Utils.checkNotNull(citUsageCount, "citUsageCount"); + this.citUsageCount = citUsageCount; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -357,7 +485,11 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.expirationDate, other.expirationDate) && Utils.enhancedDeepEquals(this.buyer, other.buyer) && Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.lastUsedAt, other.lastUsedAt) && + Utils.enhancedDeepEquals(this.usageCount, other.usageCount) && + Utils.enhancedDeepEquals(this.citLastUsedAt, other.citLastUsedAt) && + Utils.enhancedDeepEquals(this.citUsageCount, other.citUsageCount); } @Override @@ -366,7 +498,8 @@ public int hashCode() { type, id, merchantAccountId, giftCardService, bin, subBin, last4, expirationDate, buyer, - createdAt, updatedAt); + createdAt, updatedAt, lastUsedAt, + usageCount, citLastUsedAt, citUsageCount); } @Override @@ -382,7 +515,11 @@ public String toString() { "expirationDate", expirationDate, "buyer", buyer, "createdAt", createdAt, - "updatedAt", updatedAt); + "updatedAt", updatedAt, + "lastUsedAt", lastUsedAt, + "usageCount", usageCount, + "citLastUsedAt", citLastUsedAt, + "citUsageCount", citUsageCount); } @SuppressWarnings("UnusedReturnValue") @@ -408,6 +545,14 @@ public final static class Builder { private OffsetDateTime updatedAt; + private JsonNullable lastUsedAt = JsonNullable.undefined(); + + private Long usageCount; + + private JsonNullable citLastUsedAt = JsonNullable.undefined(); + + private Long citUsageCount; + private Builder() { // force use of static builder() method } @@ -529,13 +674,72 @@ public Builder updatedAt(OffsetDateTime updatedAt) { return this; } + + /** + * The timestamp when this gift card was last used in a transaction. + */ + public Builder lastUsedAt(OffsetDateTime lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = JsonNullable.of(lastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction. + */ + public Builder lastUsedAt(JsonNullable lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = lastUsedAt; + return this; + } + + + /** + * The number of times this gift card has been used in transactions. + */ + public Builder usageCount(long usageCount) { + Utils.checkNotNull(usageCount, "usageCount"); + this.usageCount = usageCount; + return this; + } + + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public Builder citLastUsedAt(OffsetDateTime citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = JsonNullable.of(citLastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public Builder citLastUsedAt(JsonNullable citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = citLastUsedAt; + return this; + } + + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + public Builder citUsageCount(long citUsageCount) { + Utils.checkNotNull(citUsageCount, "citUsageCount"); + this.citUsageCount = citUsageCount; + return this; + } + public GiftCard build() { return new GiftCard( id, merchantAccountId, giftCardService, bin, subBin, last4, expirationDate, buyer, createdAt, - updatedAt); + updatedAt, lastUsedAt, usageCount, + citLastUsedAt, citUsageCount); } diff --git a/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java b/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java index 133cbb5e..d0fee25a 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java +++ b/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java @@ -105,6 +105,32 @@ public class GiftCardSummary { @JsonProperty("balance_raw_error_message") private JsonNullable balanceRawErrorMessage; + /** + * The timestamp when this gift card was last used in a transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("last_used_at") + private JsonNullable lastUsedAt; + + /** + * The number of times this gift card has been used in transactions. + */ + @JsonProperty("usage_count") + private long usageCount; + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("cit_last_used_at") + private JsonNullable citLastUsedAt; + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + @JsonProperty("cit_usage_count") + private long citUsageCount; + @JsonCreator public GiftCardSummary( @JsonProperty("id") JsonNullable id, @@ -117,7 +143,11 @@ public GiftCardSummary( @JsonProperty("balance") JsonNullable balance, @JsonProperty("balance_error_code") JsonNullable balanceErrorCode, @JsonProperty("balance_raw_error_code") JsonNullable balanceRawErrorCode, - @JsonProperty("balance_raw_error_message") JsonNullable balanceRawErrorMessage) { + @JsonProperty("balance_raw_error_message") JsonNullable balanceRawErrorMessage, + @JsonProperty("last_used_at") JsonNullable lastUsedAt, + @JsonProperty("usage_count") long usageCount, + @JsonProperty("cit_last_used_at") JsonNullable citLastUsedAt, + @JsonProperty("cit_usage_count") long citUsageCount) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(bin, "bin"); @@ -129,6 +159,10 @@ public GiftCardSummary( Utils.checkNotNull(balanceErrorCode, "balanceErrorCode"); Utils.checkNotNull(balanceRawErrorCode, "balanceRawErrorCode"); Utils.checkNotNull(balanceRawErrorMessage, "balanceRawErrorMessage"); + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + Utils.checkNotNull(usageCount, "usageCount"); + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + Utils.checkNotNull(citUsageCount, "citUsageCount"); this.type = Builder._SINGLETON_VALUE_Type.value(); this.id = id; this.merchantAccountId = merchantAccountId; @@ -141,17 +175,24 @@ public GiftCardSummary( this.balanceErrorCode = balanceErrorCode; this.balanceRawErrorCode = balanceRawErrorCode; this.balanceRawErrorMessage = balanceRawErrorMessage; + this.lastUsedAt = lastUsedAt; + this.usageCount = usageCount; + this.citLastUsedAt = citLastUsedAt; + this.citUsageCount = citUsageCount; } public GiftCardSummary( String merchantAccountId, String bin, String subBin, - String last4) { + String last4, + long usageCount, + long citUsageCount) { this(JsonNullable.undefined(), merchantAccountId, bin, subBin, last4, JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + usageCount, JsonNullable.undefined(), citUsageCount); } /** @@ -255,6 +296,38 @@ public JsonNullable balanceRawErrorMessage() { return balanceRawErrorMessage; } + /** + * The timestamp when this gift card was last used in a transaction. + */ + @JsonIgnore + public JsonNullable lastUsedAt() { + return lastUsedAt; + } + + /** + * The number of times this gift card has been used in transactions. + */ + @JsonIgnore + public long usageCount() { + return usageCount; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + @JsonIgnore + public JsonNullable citLastUsedAt() { + return citLastUsedAt; + } + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + @JsonIgnore + public long citUsageCount() { + return citUsageCount; + } + public static Builder builder() { return new Builder(); } @@ -430,6 +503,60 @@ public GiftCardSummary withBalanceRawErrorMessage(JsonNullable balanceRa return this; } + /** + * The timestamp when this gift card was last used in a transaction. + */ + public GiftCardSummary withLastUsedAt(OffsetDateTime lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = JsonNullable.of(lastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction. + */ + public GiftCardSummary withLastUsedAt(JsonNullable lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = lastUsedAt; + return this; + } + + /** + * The number of times this gift card has been used in transactions. + */ + public GiftCardSummary withUsageCount(long usageCount) { + Utils.checkNotNull(usageCount, "usageCount"); + this.usageCount = usageCount; + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public GiftCardSummary withCitLastUsedAt(OffsetDateTime citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = JsonNullable.of(citLastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public GiftCardSummary withCitLastUsedAt(JsonNullable citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = citLastUsedAt; + return this; + } + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + public GiftCardSummary withCitUsageCount(long citUsageCount) { + Utils.checkNotNull(citUsageCount, "citUsageCount"); + this.citUsageCount = citUsageCount; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -451,7 +578,11 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.balance, other.balance) && Utils.enhancedDeepEquals(this.balanceErrorCode, other.balanceErrorCode) && Utils.enhancedDeepEquals(this.balanceRawErrorCode, other.balanceRawErrorCode) && - Utils.enhancedDeepEquals(this.balanceRawErrorMessage, other.balanceRawErrorMessage); + Utils.enhancedDeepEquals(this.balanceRawErrorMessage, other.balanceRawErrorMessage) && + Utils.enhancedDeepEquals(this.lastUsedAt, other.lastUsedAt) && + Utils.enhancedDeepEquals(this.usageCount, other.usageCount) && + Utils.enhancedDeepEquals(this.citLastUsedAt, other.citLastUsedAt) && + Utils.enhancedDeepEquals(this.citUsageCount, other.citUsageCount); } @Override @@ -460,7 +591,9 @@ public int hashCode() { type, id, merchantAccountId, bin, subBin, last4, currency, expirationDate, balance, - balanceErrorCode, balanceRawErrorCode, balanceRawErrorMessage); + balanceErrorCode, balanceRawErrorCode, balanceRawErrorMessage, + lastUsedAt, usageCount, citLastUsedAt, + citUsageCount); } @Override @@ -477,7 +610,11 @@ public String toString() { "balance", balance, "balanceErrorCode", balanceErrorCode, "balanceRawErrorCode", balanceRawErrorCode, - "balanceRawErrorMessage", balanceRawErrorMessage); + "balanceRawErrorMessage", balanceRawErrorMessage, + "lastUsedAt", lastUsedAt, + "usageCount", usageCount, + "citLastUsedAt", citLastUsedAt, + "citUsageCount", citUsageCount); } @SuppressWarnings("UnusedReturnValue") @@ -505,6 +642,14 @@ public final static class Builder { private JsonNullable balanceRawErrorMessage = JsonNullable.undefined(); + private JsonNullable lastUsedAt = JsonNullable.undefined(); + + private Long usageCount; + + private JsonNullable citLastUsedAt = JsonNullable.undefined(); + + private Long citUsageCount; + private Builder() { // force use of static builder() method } @@ -690,13 +835,72 @@ public Builder balanceRawErrorMessage(JsonNullable balanceRawErrorMessag return this; } + + /** + * The timestamp when this gift card was last used in a transaction. + */ + public Builder lastUsedAt(OffsetDateTime lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = JsonNullable.of(lastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction. + */ + public Builder lastUsedAt(JsonNullable lastUsedAt) { + Utils.checkNotNull(lastUsedAt, "lastUsedAt"); + this.lastUsedAt = lastUsedAt; + return this; + } + + + /** + * The number of times this gift card has been used in transactions. + */ + public Builder usageCount(long usageCount) { + Utils.checkNotNull(usageCount, "usageCount"); + this.usageCount = usageCount; + return this; + } + + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public Builder citLastUsedAt(OffsetDateTime citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = JsonNullable.of(citLastUsedAt); + return this; + } + + /** + * The timestamp when this gift card was last used in a transaction for client initiated transactions. + */ + public Builder citLastUsedAt(JsonNullable citLastUsedAt) { + Utils.checkNotNull(citLastUsedAt, "citLastUsedAt"); + this.citLastUsedAt = citLastUsedAt; + return this; + } + + + /** + * The number of times this gift card has been used in transactions for client initiated transactions. + */ + public Builder citUsageCount(long citUsageCount) { + Utils.checkNotNull(citUsageCount, "citUsageCount"); + this.citUsageCount = citUsageCount; + return this; + } + public GiftCardSummary build() { return new GiftCardSummary( id, merchantAccountId, bin, subBin, last4, currency, expirationDate, balance, balanceErrorCode, - balanceRawErrorCode, balanceRawErrorMessage); + balanceRawErrorCode, balanceRawErrorMessage, lastUsedAt, + usageCount, citLastUsedAt, citUsageCount); } diff --git a/src/main/java/com/gr4vy/sdk/models/components/Method.java b/src/main/java/com/gr4vy/sdk/models/components/Method.java index 502575a1..e3fff663 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/Method.java +++ b/src/main/java/com/gr4vy/sdk/models/components/Method.java @@ -95,8 +95,10 @@ public class Method { public static final Method PAYMAYA = new Method("paymaya"); public static final Method PAYPAL = new Method("paypal"); public static final Method PAYPALPAYLATER = new Method("paypalpaylater"); + public static final Method PAYPAY = new Method("paypay"); public static final Method PAYTO = new Method("payto"); public static final Method PAYVALIDA = new Method("payvalida"); + public static final Method PAZE = new Method("paze"); public static final Method PICPAY = new Method("picpay"); public static final Method PIX = new Method("pix"); public static final Method PLAID = new Method("plaid"); @@ -281,8 +283,10 @@ private static final Map createValuesMap() { map.put("paymaya", PAYMAYA); map.put("paypal", PAYPAL); map.put("paypalpaylater", PAYPALPAYLATER); + map.put("paypay", PAYPAY); map.put("payto", PAYTO); map.put("payvalida", PAYVALIDA); + map.put("paze", PAZE); map.put("picpay", PICPAY); map.put("pix", PIX); map.put("plaid", PLAID); @@ -399,8 +403,10 @@ private static final Map createEnumsMap() { map.put("paymaya", MethodEnum.PAYMAYA); map.put("paypal", MethodEnum.PAYPAL); map.put("paypalpaylater", MethodEnum.PAYPALPAYLATER); + map.put("paypay", MethodEnum.PAYPAY); map.put("payto", MethodEnum.PAYTO); map.put("payvalida", MethodEnum.PAYVALIDA); + map.put("paze", MethodEnum.PAZE); map.put("picpay", MethodEnum.PICPAY); map.put("pix", MethodEnum.PIX); map.put("plaid", MethodEnum.PLAID); @@ -518,8 +524,10 @@ public enum MethodEnum { PAYMAYA("paymaya"), PAYPAL("paypal"), PAYPALPAYLATER("paypalpaylater"), + PAYPAY("paypay"), PAYTO("payto"), PAYVALIDA("payvalida"), + PAZE("paze"), PICPAY("picpay"), PIX("pix"), PLAID("plaid"), diff --git a/src/main/java/com/gr4vy/sdk/models/components/Mode.java b/src/main/java/com/gr4vy/sdk/models/components/Mode.java index 3de5e25a..a4378595 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/Mode.java +++ b/src/main/java/com/gr4vy/sdk/models/components/Mode.java @@ -28,6 +28,7 @@ public class Mode { public static final Mode CLICK_TO_PAY = new Mode("click-to-pay"); public static final Mode GIFT_CARD = new Mode("gift-card"); public static final Mode BANK = new Mode("bank"); + public static final Mode PAZE = new Mode("paze"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -109,6 +110,7 @@ private static final Map createValuesMap() { map.put("click-to-pay", CLICK_TO_PAY); map.put("gift-card", GIFT_CARD); map.put("bank", BANK); + map.put("paze", PAZE); return map; } @@ -122,6 +124,7 @@ private static final Map createEnumsMap() { map.put("click-to-pay", ModeEnum.CLICK_TO_PAY); map.put("gift-card", ModeEnum.GIFT_CARD); map.put("bank", ModeEnum.BANK); + map.put("paze", ModeEnum.PAZE); return map; } @@ -135,7 +138,8 @@ public enum ModeEnum { CHECKOUT_SESSION("checkout-session"), CLICK_TO_PAY("click-to-pay"), GIFT_CARD("gift-card"), - BANK("bank"),; + BANK("bank"), + PAZE("paze"),; private final String value; diff --git a/src/main/java/com/gr4vy/sdk/models/components/PaymentMethod.java b/src/main/java/com/gr4vy/sdk/models/components/PaymentMethod.java index 3c2de723..ae60e7c6 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/PaymentMethod.java +++ b/src/main/java/com/gr4vy/sdk/models/components/PaymentMethod.java @@ -166,6 +166,20 @@ public class PaymentMethod { @JsonProperty("usage_count") private long usageCount; + /** + * The scheme transaction identifier stored against this payment method. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("scheme_transaction_id") + private Optional schemeTransactionId; + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("scheme_transaction_id_scheme") + private Optional schemeTransactionIdScheme; + /** * The optional buyer for which this payment method has been stored. */ @@ -217,6 +231,8 @@ public PaymentMethod( @JsonProperty("has_replacement") boolean hasReplacement, @JsonProperty("last_used_at") JsonNullable lastUsedAt, @JsonProperty("usage_count") long usageCount, + @JsonProperty("scheme_transaction_id") Optional schemeTransactionId, + @JsonProperty("scheme_transaction_id_scheme") Optional schemeTransactionIdScheme, @JsonProperty("buyer") JsonNullable buyer, @JsonProperty("external_identifier") JsonNullable externalIdentifier, @JsonProperty("status") PaymentMethodStatus status, @@ -241,6 +257,8 @@ public PaymentMethod( Utils.checkNotNull(hasReplacement, "hasReplacement"); Utils.checkNotNull(lastUsedAt, "lastUsedAt"); Utils.checkNotNull(usageCount, "usageCount"); + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); Utils.checkNotNull(buyer, "buyer"); Utils.checkNotNull(externalIdentifier, "externalIdentifier"); Utils.checkNotNull(status, "status"); @@ -266,6 +284,8 @@ public PaymentMethod( this.hasReplacement = hasReplacement; this.lastUsedAt = lastUsedAt; this.usageCount = usageCount; + this.schemeTransactionId = schemeTransactionId; + this.schemeTransactionIdScheme = schemeTransactionIdScheme; this.buyer = buyer; this.externalIdentifier = externalIdentifier; this.status = status; @@ -289,8 +309,9 @@ public PaymentMethod( JsonNullable.undefined(), JsonNullable.undefined(), id, merchantAccountId, JsonNullable.undefined(), JsonNullable.undefined(), citUsageCount, hasReplacement, JsonNullable.undefined(), - usageCount, JsonNullable.undefined(), JsonNullable.undefined(), - status, createdAt, updatedAt); + usageCount, Optional.empty(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), status, + createdAt, updatedAt); } /** @@ -459,6 +480,23 @@ public long usageCount() { return usageCount; } + /** + * The scheme transaction identifier stored against this payment method. + */ + @JsonIgnore + public Optional schemeTransactionId() { + return schemeTransactionId; + } + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional schemeTransactionIdScheme() { + return (Optional) schemeTransactionIdScheme; + } + /** * The optional buyer for which this payment method has been stored. */ @@ -796,6 +834,44 @@ public PaymentMethod withUsageCount(long usageCount) { return this; } + /** + * The scheme transaction identifier stored against this payment method. + */ + public PaymentMethod withSchemeTransactionId(String schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = Optional.ofNullable(schemeTransactionId); + return this; + } + + + /** + * The scheme transaction identifier stored against this payment method. + */ + public PaymentMethod withSchemeTransactionId(Optional schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = schemeTransactionId; + return this; + } + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public PaymentMethod withSchemeTransactionIdScheme(CardScheme schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = Optional.ofNullable(schemeTransactionIdScheme); + return this; + } + + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public PaymentMethod withSchemeTransactionIdScheme(Optional schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = schemeTransactionIdScheme; + return this; + } + /** * The optional buyer for which this payment method has been stored. */ @@ -886,6 +962,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.hasReplacement, other.hasReplacement) && Utils.enhancedDeepEquals(this.lastUsedAt, other.lastUsedAt) && Utils.enhancedDeepEquals(this.usageCount, other.usageCount) && + Utils.enhancedDeepEquals(this.schemeTransactionId, other.schemeTransactionId) && + Utils.enhancedDeepEquals(this.schemeTransactionIdScheme, other.schemeTransactionIdScheme) && Utils.enhancedDeepEquals(this.buyer, other.buyer) && Utils.enhancedDeepEquals(this.externalIdentifier, other.externalIdentifier) && Utils.enhancedDeepEquals(this.status, other.status) && @@ -902,9 +980,9 @@ public int hashCode() { method, mode, scheme, id, merchantAccountId, additionalSchemes, citLastUsedAt, citUsageCount, hasReplacement, - lastUsedAt, usageCount, buyer, - externalIdentifier, status, createdAt, - updatedAt); + lastUsedAt, usageCount, schemeTransactionId, + schemeTransactionIdScheme, buyer, externalIdentifier, + status, createdAt, updatedAt); } @Override @@ -930,6 +1008,8 @@ public String toString() { "hasReplacement", hasReplacement, "lastUsedAt", lastUsedAt, "usageCount", usageCount, + "schemeTransactionId", schemeTransactionId, + "schemeTransactionIdScheme", schemeTransactionIdScheme, "buyer", buyer, "externalIdentifier", externalIdentifier, "status", status, @@ -978,6 +1058,10 @@ public final static class Builder { private Long usageCount; + private Optional schemeTransactionId = Optional.empty(); + + private Optional schemeTransactionIdScheme = Optional.empty(); + private JsonNullable buyer = JsonNullable.undefined(); private JsonNullable externalIdentifier = JsonNullable.undefined(); @@ -1306,6 +1390,44 @@ public Builder usageCount(long usageCount) { } + /** + * The scheme transaction identifier stored against this payment method. + */ + public Builder schemeTransactionId(String schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = Optional.ofNullable(schemeTransactionId); + return this; + } + + /** + * The scheme transaction identifier stored against this payment method. + */ + public Builder schemeTransactionId(Optional schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = schemeTransactionId; + return this; + } + + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public Builder schemeTransactionIdScheme(CardScheme schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = Optional.ofNullable(schemeTransactionIdScheme); + return this; + } + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public Builder schemeTransactionIdScheme(Optional schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = schemeTransactionIdScheme; + return this; + } + + /** * The optional buyer for which this payment method has been stored. */ @@ -1379,8 +1501,9 @@ public PaymentMethod build() { mode, scheme, id, merchantAccountId, additionalSchemes, citLastUsedAt, citUsageCount, hasReplacement, lastUsedAt, - usageCount, buyer, externalIdentifier, - status, createdAt, updatedAt); + usageCount, schemeTransactionId, schemeTransactionIdScheme, + buyer, externalIdentifier, status, + createdAt, updatedAt); } diff --git a/src/main/java/com/gr4vy/sdk/models/components/PaymentMethodSummary.java b/src/main/java/com/gr4vy/sdk/models/components/PaymentMethodSummary.java index 677cdfb6..a1a24cb0 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/PaymentMethodSummary.java +++ b/src/main/java/com/gr4vy/sdk/models/components/PaymentMethodSummary.java @@ -166,6 +166,20 @@ public class PaymentMethodSummary { @JsonProperty("usage_count") private long usageCount; + /** + * The scheme transaction identifier stored against this payment method. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("scheme_transaction_id") + private Optional schemeTransactionId; + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("scheme_transaction_id_scheme") + private Optional schemeTransactionIdScheme; + @JsonCreator public PaymentMethodSummary( @JsonProperty("approval_url") JsonNullable approvalUrl, @@ -186,7 +200,9 @@ public PaymentMethodSummary( @JsonProperty("cit_usage_count") long citUsageCount, @JsonProperty("has_replacement") boolean hasReplacement, @JsonProperty("last_used_at") JsonNullable lastUsedAt, - @JsonProperty("usage_count") long usageCount) { + @JsonProperty("usage_count") long usageCount, + @JsonProperty("scheme_transaction_id") Optional schemeTransactionId, + @JsonProperty("scheme_transaction_id_scheme") Optional schemeTransactionIdScheme) { Utils.checkNotNull(approvalUrl, "approvalUrl"); Utils.checkNotNull(country, "country"); Utils.checkNotNull(currency, "currency"); @@ -206,6 +222,8 @@ public PaymentMethodSummary( Utils.checkNotNull(hasReplacement, "hasReplacement"); Utils.checkNotNull(lastUsedAt, "lastUsedAt"); Utils.checkNotNull(usageCount, "usageCount"); + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); this.type = Builder._SINGLETON_VALUE_Type.value(); this.approvalUrl = approvalUrl; this.country = country; @@ -226,6 +244,8 @@ public PaymentMethodSummary( this.hasReplacement = hasReplacement; this.lastUsedAt = lastUsedAt; this.usageCount = usageCount; + this.schemeTransactionId = schemeTransactionId; + this.schemeTransactionIdScheme = schemeTransactionIdScheme; } public PaymentMethodSummary( @@ -241,7 +261,7 @@ public PaymentMethodSummary( JsonNullable.undefined(), JsonNullable.undefined(), id, merchantAccountId, JsonNullable.undefined(), JsonNullable.undefined(), citUsageCount, hasReplacement, JsonNullable.undefined(), - usageCount); + usageCount, Optional.empty(), Optional.empty()); } /** @@ -410,6 +430,23 @@ public long usageCount() { return usageCount; } + /** + * The scheme transaction identifier stored against this payment method. + */ + @JsonIgnore + public Optional schemeTransactionId() { + return schemeTransactionId; + } + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional schemeTransactionIdScheme() { + return (Optional) schemeTransactionIdScheme; + } + public static Builder builder() { return new Builder(); } @@ -709,6 +746,44 @@ public PaymentMethodSummary withUsageCount(long usageCount) { return this; } + /** + * The scheme transaction identifier stored against this payment method. + */ + public PaymentMethodSummary withSchemeTransactionId(String schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = Optional.ofNullable(schemeTransactionId); + return this; + } + + + /** + * The scheme transaction identifier stored against this payment method. + */ + public PaymentMethodSummary withSchemeTransactionId(Optional schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = schemeTransactionId; + return this; + } + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public PaymentMethodSummary withSchemeTransactionIdScheme(CardScheme schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = Optional.ofNullable(schemeTransactionIdScheme); + return this; + } + + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public PaymentMethodSummary withSchemeTransactionIdScheme(Optional schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = schemeTransactionIdScheme; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -738,7 +813,9 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.citUsageCount, other.citUsageCount) && Utils.enhancedDeepEquals(this.hasReplacement, other.hasReplacement) && Utils.enhancedDeepEquals(this.lastUsedAt, other.lastUsedAt) && - Utils.enhancedDeepEquals(this.usageCount, other.usageCount); + Utils.enhancedDeepEquals(this.usageCount, other.usageCount) && + Utils.enhancedDeepEquals(this.schemeTransactionId, other.schemeTransactionId) && + Utils.enhancedDeepEquals(this.schemeTransactionIdScheme, other.schemeTransactionIdScheme); } @Override @@ -750,7 +827,8 @@ public int hashCode() { method, mode, scheme, id, merchantAccountId, additionalSchemes, citLastUsedAt, citUsageCount, hasReplacement, - lastUsedAt, usageCount); + lastUsedAt, usageCount, schemeTransactionId, + schemeTransactionIdScheme); } @Override @@ -775,7 +853,9 @@ public String toString() { "citUsageCount", citUsageCount, "hasReplacement", hasReplacement, "lastUsedAt", lastUsedAt, - "usageCount", usageCount); + "usageCount", usageCount, + "schemeTransactionId", schemeTransactionId, + "schemeTransactionIdScheme", schemeTransactionIdScheme); } @SuppressWarnings("UnusedReturnValue") @@ -819,6 +899,10 @@ public final static class Builder { private Long usageCount; + private Optional schemeTransactionId = Optional.empty(); + + private Optional schemeTransactionIdScheme = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -1136,6 +1220,44 @@ public Builder usageCount(long usageCount) { return this; } + + /** + * The scheme transaction identifier stored against this payment method. + */ + public Builder schemeTransactionId(String schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = Optional.ofNullable(schemeTransactionId); + return this; + } + + /** + * The scheme transaction identifier stored against this payment method. + */ + public Builder schemeTransactionId(Optional schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = schemeTransactionId; + return this; + } + + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public Builder schemeTransactionIdScheme(CardScheme schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = Optional.ofNullable(schemeTransactionIdScheme); + return this; + } + + /** + * The scheme associated with scheme_transaction_id. Only applies to card payments. + */ + public Builder schemeTransactionIdScheme(Optional schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = schemeTransactionIdScheme; + return this; + } + public PaymentMethodSummary build() { return new PaymentMethodSummary( @@ -1145,7 +1267,7 @@ public PaymentMethodSummary build() { mode, scheme, id, merchantAccountId, additionalSchemes, citLastUsedAt, citUsageCount, hasReplacement, lastUsedAt, - usageCount); + usageCount, schemeTransactionId, schemeTransactionIdScheme); } diff --git a/src/main/java/com/gr4vy/sdk/models/components/PaymentMethodUpdate.java b/src/main/java/com/gr4vy/sdk/models/components/PaymentMethodUpdate.java new file mode 100644 index 00000000..73f6d4a8 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/components/PaymentMethodUpdate.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * PaymentMethodUpdate + * + *

Request body for updating a stored payment method. + */ +public class PaymentMethodUpdate { + /** + * The new expiration date for the payment method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expiration_date") + private JsonNullable expirationDate; + + /** + * A scheme transaction identifier to associate with this payment method. Explicitly setting this field + * to `null` will also clear `scheme_transaction_id_scheme` as a side-effect. When setting a new value + * and `scheme_transaction_id_scheme` is both omitted from the payload and previously + * unset,`scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scheme_transaction_id") + private JsonNullable schemeTransactionId; + + /** + * The scheme associated with `scheme_transaction_id`. Only applies to card payments. When setting a + * new value for `scheme_transaction_id`, if `scheme_transaction_id_scheme`is both omitted from the + * payload and previously unset, `scheme_transaction_id_scheme` will be populated from the payment + * method's existing `scheme`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scheme_transaction_id_scheme") + private JsonNullable schemeTransactionIdScheme; + + @JsonCreator + public PaymentMethodUpdate( + @JsonProperty("expiration_date") JsonNullable expirationDate, + @JsonProperty("scheme_transaction_id") JsonNullable schemeTransactionId, + @JsonProperty("scheme_transaction_id_scheme") JsonNullable schemeTransactionIdScheme) { + Utils.checkNotNull(expirationDate, "expirationDate"); + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.expirationDate = expirationDate; + this.schemeTransactionId = schemeTransactionId; + this.schemeTransactionIdScheme = schemeTransactionIdScheme; + } + + public PaymentMethodUpdate() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + } + + /** + * The new expiration date for the payment method. + */ + @JsonIgnore + public JsonNullable expirationDate() { + return expirationDate; + } + + /** + * A scheme transaction identifier to associate with this payment method. Explicitly setting this field + * to `null` will also clear `scheme_transaction_id_scheme` as a side-effect. When setting a new value + * and `scheme_transaction_id_scheme` is both omitted from the payload and previously + * unset,`scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. + */ + @JsonIgnore + public JsonNullable schemeTransactionId() { + return schemeTransactionId; + } + + /** + * The scheme associated with `scheme_transaction_id`. Only applies to card payments. When setting a + * new value for `scheme_transaction_id`, if `scheme_transaction_id_scheme`is both omitted from the + * payload and previously unset, `scheme_transaction_id_scheme` will be populated from the payment + * method's existing `scheme`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable schemeTransactionIdScheme() { + return (JsonNullable) schemeTransactionIdScheme; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The new expiration date for the payment method. + */ + public PaymentMethodUpdate withExpirationDate(String expirationDate) { + Utils.checkNotNull(expirationDate, "expirationDate"); + this.expirationDate = JsonNullable.of(expirationDate); + return this; + } + + /** + * The new expiration date for the payment method. + */ + public PaymentMethodUpdate withExpirationDate(JsonNullable expirationDate) { + Utils.checkNotNull(expirationDate, "expirationDate"); + this.expirationDate = expirationDate; + return this; + } + + /** + * A scheme transaction identifier to associate with this payment method. Explicitly setting this field + * to `null` will also clear `scheme_transaction_id_scheme` as a side-effect. When setting a new value + * and `scheme_transaction_id_scheme` is both omitted from the payload and previously + * unset,`scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. + */ + public PaymentMethodUpdate withSchemeTransactionId(String schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = JsonNullable.of(schemeTransactionId); + return this; + } + + /** + * A scheme transaction identifier to associate with this payment method. Explicitly setting this field + * to `null` will also clear `scheme_transaction_id_scheme` as a side-effect. When setting a new value + * and `scheme_transaction_id_scheme` is both omitted from the payload and previously + * unset,`scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. + */ + public PaymentMethodUpdate withSchemeTransactionId(JsonNullable schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = schemeTransactionId; + return this; + } + + /** + * The scheme associated with `scheme_transaction_id`. Only applies to card payments. When setting a + * new value for `scheme_transaction_id`, if `scheme_transaction_id_scheme`is both omitted from the + * payload and previously unset, `scheme_transaction_id_scheme` will be populated from the payment + * method's existing `scheme`. + */ + public PaymentMethodUpdate withSchemeTransactionIdScheme(CardScheme schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = JsonNullable.of(schemeTransactionIdScheme); + return this; + } + + /** + * The scheme associated with `scheme_transaction_id`. Only applies to card payments. When setting a + * new value for `scheme_transaction_id`, if `scheme_transaction_id_scheme`is both omitted from the + * payload and previously unset, `scheme_transaction_id_scheme` will be populated from the payment + * method's existing `scheme`. + */ + public PaymentMethodUpdate withSchemeTransactionIdScheme(JsonNullable schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = schemeTransactionIdScheme; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentMethodUpdate other = (PaymentMethodUpdate) o; + return + Utils.enhancedDeepEquals(this.expirationDate, other.expirationDate) && + Utils.enhancedDeepEquals(this.schemeTransactionId, other.schemeTransactionId) && + Utils.enhancedDeepEquals(this.schemeTransactionIdScheme, other.schemeTransactionIdScheme); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + expirationDate, schemeTransactionId, schemeTransactionIdScheme); + } + + @Override + public String toString() { + return Utils.toString(PaymentMethodUpdate.class, + "expirationDate", expirationDate, + "schemeTransactionId", schemeTransactionId, + "schemeTransactionIdScheme", schemeTransactionIdScheme); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable expirationDate = JsonNullable.undefined(); + + private JsonNullable schemeTransactionId = JsonNullable.undefined(); + + private JsonNullable schemeTransactionIdScheme = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The new expiration date for the payment method. + */ + public Builder expirationDate(String expirationDate) { + Utils.checkNotNull(expirationDate, "expirationDate"); + this.expirationDate = JsonNullable.of(expirationDate); + return this; + } + + /** + * The new expiration date for the payment method. + */ + public Builder expirationDate(JsonNullable expirationDate) { + Utils.checkNotNull(expirationDate, "expirationDate"); + this.expirationDate = expirationDate; + return this; + } + + + /** + * A scheme transaction identifier to associate with this payment method. Explicitly setting this field + * to `null` will also clear `scheme_transaction_id_scheme` as a side-effect. When setting a new value + * and `scheme_transaction_id_scheme` is both omitted from the payload and previously + * unset,`scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. + */ + public Builder schemeTransactionId(String schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = JsonNullable.of(schemeTransactionId); + return this; + } + + /** + * A scheme transaction identifier to associate with this payment method. Explicitly setting this field + * to `null` will also clear `scheme_transaction_id_scheme` as a side-effect. When setting a new value + * and `scheme_transaction_id_scheme` is both omitted from the payload and previously + * unset,`scheme_transaction_id_scheme` will be populated from the payment method's existing `scheme`. + */ + public Builder schemeTransactionId(JsonNullable schemeTransactionId) { + Utils.checkNotNull(schemeTransactionId, "schemeTransactionId"); + this.schemeTransactionId = schemeTransactionId; + return this; + } + + + /** + * The scheme associated with `scheme_transaction_id`. Only applies to card payments. When setting a + * new value for `scheme_transaction_id`, if `scheme_transaction_id_scheme`is both omitted from the + * payload and previously unset, `scheme_transaction_id_scheme` will be populated from the payment + * method's existing `scheme`. + */ + public Builder schemeTransactionIdScheme(CardScheme schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = JsonNullable.of(schemeTransactionIdScheme); + return this; + } + + /** + * The scheme associated with `scheme_transaction_id`. Only applies to card payments. When setting a + * new value for `scheme_transaction_id`, if `scheme_transaction_id_scheme`is both omitted from the + * payload and previously unset, `scheme_transaction_id_scheme` will be populated from the payment + * method's existing `scheme`. + */ + public Builder schemeTransactionIdScheme(JsonNullable schemeTransactionIdScheme) { + Utils.checkNotNull(schemeTransactionIdScheme, "schemeTransactionIdScheme"); + this.schemeTransactionIdScheme = schemeTransactionIdScheme; + return this; + } + + public PaymentMethodUpdate build() { + + return new PaymentMethodUpdate( + expirationDate, schemeTransactionId, schemeTransactionIdScheme); + } + + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/components/RedirectPaymentMethodCreateMethod.java b/src/main/java/com/gr4vy/sdk/models/components/RedirectPaymentMethodCreateMethod.java index b72710c2..c8f901a7 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/RedirectPaymentMethodCreateMethod.java +++ b/src/main/java/com/gr4vy/sdk/models/components/RedirectPaymentMethodCreateMethod.java @@ -91,6 +91,7 @@ public class RedirectPaymentMethodCreateMethod { public static final RedirectPaymentMethodCreateMethod PAYMAYA = new RedirectPaymentMethodCreateMethod("paymaya"); public static final RedirectPaymentMethodCreateMethod PAYPAL = new RedirectPaymentMethodCreateMethod("paypal"); public static final RedirectPaymentMethodCreateMethod PAYPALPAYLATER = new RedirectPaymentMethodCreateMethod("paypalpaylater"); + public static final RedirectPaymentMethodCreateMethod PAYPAY = new RedirectPaymentMethodCreateMethod("paypay"); public static final RedirectPaymentMethodCreateMethod PAYTO = new RedirectPaymentMethodCreateMethod("payto"); public static final RedirectPaymentMethodCreateMethod PAYVALIDA = new RedirectPaymentMethodCreateMethod("payvalida"); public static final RedirectPaymentMethodCreateMethod PICPAY = new RedirectPaymentMethodCreateMethod("picpay"); @@ -267,6 +268,7 @@ private static final Map createValues map.put("paymaya", PAYMAYA); map.put("paypal", PAYPAL); map.put("paypalpaylater", PAYPALPAYLATER); + map.put("paypay", PAYPAY); map.put("payto", PAYTO); map.put("payvalida", PAYVALIDA); map.put("picpay", PICPAY); @@ -375,6 +377,7 @@ private static final Map createEn map.put("paymaya", RedirectPaymentMethodCreateMethodEnum.PAYMAYA); map.put("paypal", RedirectPaymentMethodCreateMethodEnum.PAYPAL); map.put("paypalpaylater", RedirectPaymentMethodCreateMethodEnum.PAYPALPAYLATER); + map.put("paypay", RedirectPaymentMethodCreateMethodEnum.PAYPAY); map.put("payto", RedirectPaymentMethodCreateMethodEnum.PAYTO); map.put("payvalida", RedirectPaymentMethodCreateMethodEnum.PAYVALIDA); map.put("picpay", RedirectPaymentMethodCreateMethodEnum.PICPAY); @@ -484,6 +487,7 @@ public enum RedirectPaymentMethodCreateMethodEnum { PAYMAYA("paymaya"), PAYPAL("paypal"), PAYPALPAYLATER("paypalpaylater"), + PAYPAY("paypay"), PAYTO("payto"), PAYVALIDA("payvalida"), PICPAY("picpay"), diff --git a/src/main/java/com/gr4vy/sdk/models/components/TransactionConnectionOptions.java b/src/main/java/com/gr4vy/sdk/models/components/TransactionConnectionOptions.java index f760ed26..be492c4e 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/TransactionConnectionOptions.java +++ b/src/main/java/com/gr4vy/sdk/models/components/TransactionConnectionOptions.java @@ -66,6 +66,13 @@ public class TransactionConnectionOptions { @JsonProperty("adyen-ideal") private JsonNullable adyenIdeal; + /** + * Custom options to be passed to the `adyen-paypay` connector. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("adyen-paypay") + private JsonNullable adyenPaypay; + /** * Custom options to be passed to the `adyen-pix` connector. */ @@ -171,6 +178,20 @@ public class TransactionConnectionOptions { @JsonProperty("dlocal-pix") private JsonNullable dlocalPix; + /** + * Custom options to be passed to the `dlocal-gcash` connector. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("dlocal-gcash") + private JsonNullable dlocalGcash; + + /** + * Custom options to be passed to the `ecommpay-card` connector. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ecommpay-card") + private JsonNullable ecommpayCard; + /** * Custom options to be passed to the `fiserv-card` connector. */ @@ -255,6 +276,13 @@ public class TransactionConnectionOptions { @JsonProperty("mock-card") private JsonNullable mockCard; + /** + * Custom options to be passed to the `mockds-card` connector. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mockds-card") + private JsonNullable mockdsCard; + /** * Custom options to be passed to the `nuvei-card` connector. */ @@ -376,6 +404,7 @@ public TransactionConnectionOptions( @JsonProperty("adyen-cashapp") JsonNullable adyenCashapp, @JsonProperty("adyen-giropay") JsonNullable adyenGiropay, @JsonProperty("adyen-ideal") JsonNullable adyenIdeal, + @JsonProperty("adyen-paypay") JsonNullable adyenPaypay, @JsonProperty("adyen-pix") JsonNullable adyenPix, @JsonProperty("adyen-sepa") JsonNullable adyenSepa, @JsonProperty("adyen-sofort") JsonNullable adyenSofort, @@ -391,6 +420,8 @@ public TransactionConnectionOptions( @JsonProperty("dlocal-nequi") JsonNullable dlocalNequi, @JsonProperty("dlocal-upi") JsonNullable dlocalUpi, @JsonProperty("dlocal-pix") JsonNullable dlocalPix, + @JsonProperty("dlocal-gcash") JsonNullable dlocalGcash, + @JsonProperty("ecommpay-card") JsonNullable ecommpayCard, @JsonProperty("fiserv-card") JsonNullable fiservCard, @JsonProperty("forter-anti-fraud") JsonNullable forterAntiFraud, @JsonProperty("gem-gem") JsonNullable gemGem, @@ -403,6 +434,7 @@ public TransactionConnectionOptions( @JsonProperty("mattilda-tapifintechs") JsonNullable mattildaTapifintechs, @JsonProperty("monato-spei") JsonNullable monatoSpei, @JsonProperty("mock-card") JsonNullable mockCard, + @JsonProperty("mockds-card") JsonNullable mockdsCard, @JsonProperty("nuvei-card") JsonNullable nuveiCard, @JsonProperty("nuvei-ideal") JsonNullable nuveiIdeal, @JsonProperty("nuvei-klarna") JsonNullable nuveiKlarna, @@ -426,6 +458,7 @@ public TransactionConnectionOptions( Utils.checkNotNull(adyenCashapp, "adyenCashapp"); Utils.checkNotNull(adyenGiropay, "adyenGiropay"); Utils.checkNotNull(adyenIdeal, "adyenIdeal"); + Utils.checkNotNull(adyenPaypay, "adyenPaypay"); Utils.checkNotNull(adyenPix, "adyenPix"); Utils.checkNotNull(adyenSepa, "adyenSepa"); Utils.checkNotNull(adyenSofort, "adyenSofort"); @@ -441,6 +474,8 @@ public TransactionConnectionOptions( Utils.checkNotNull(dlocalNequi, "dlocalNequi"); Utils.checkNotNull(dlocalUpi, "dlocalUpi"); Utils.checkNotNull(dlocalPix, "dlocalPix"); + Utils.checkNotNull(dlocalGcash, "dlocalGcash"); + Utils.checkNotNull(ecommpayCard, "ecommpayCard"); Utils.checkNotNull(fiservCard, "fiservCard"); Utils.checkNotNull(forterAntiFraud, "forterAntiFraud"); Utils.checkNotNull(gemGem, "gemGem"); @@ -453,6 +488,7 @@ public TransactionConnectionOptions( Utils.checkNotNull(mattildaTapifintechs, "mattildaTapifintechs"); Utils.checkNotNull(monatoSpei, "monatoSpei"); Utils.checkNotNull(mockCard, "mockCard"); + Utils.checkNotNull(mockdsCard, "mockdsCard"); Utils.checkNotNull(nuveiCard, "nuveiCard"); Utils.checkNotNull(nuveiIdeal, "nuveiIdeal"); Utils.checkNotNull(nuveiKlarna, "nuveiKlarna"); @@ -476,6 +512,7 @@ public TransactionConnectionOptions( this.adyenCashapp = adyenCashapp; this.adyenGiropay = adyenGiropay; this.adyenIdeal = adyenIdeal; + this.adyenPaypay = adyenPaypay; this.adyenPix = adyenPix; this.adyenSepa = adyenSepa; this.adyenSofort = adyenSofort; @@ -491,6 +528,8 @@ public TransactionConnectionOptions( this.dlocalNequi = dlocalNequi; this.dlocalUpi = dlocalUpi; this.dlocalPix = dlocalPix; + this.dlocalGcash = dlocalGcash; + this.ecommpayCard = ecommpayCard; this.fiservCard = fiservCard; this.forterAntiFraud = forterAntiFraud; this.gemGem = gemGem; @@ -503,6 +542,7 @@ public TransactionConnectionOptions( this.mattildaTapifintechs = mattildaTapifintechs; this.monatoSpei = monatoSpei; this.mockCard = mockCard; + this.mockdsCard = mockdsCard; this.nuveiCard = nuveiCard; this.nuveiIdeal = nuveiIdeal; this.nuveiKlarna = nuveiKlarna; @@ -538,7 +578,8 @@ public TransactionConnectionOptions() { JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -605,6 +646,15 @@ public JsonNullable adyenIdeal() { return (JsonNullable) adyenIdeal; } + /** + * Custom options to be passed to the `adyen-paypay` connector. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable adyenPaypay() { + return (JsonNullable) adyenPaypay; + } + /** * Custom options to be passed to the `adyen-pix` connector. */ @@ -740,6 +790,24 @@ public JsonNullable dlocalPix() { return (JsonNullable) dlocalPix; } + /** + * Custom options to be passed to the `dlocal-gcash` connector. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable dlocalGcash() { + return (JsonNullable) dlocalGcash; + } + + /** + * Custom options to be passed to the `ecommpay-card` connector. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable ecommpayCard() { + return (JsonNullable) ecommpayCard; + } + /** * Custom options to be passed to the `fiserv-card` connector. */ @@ -848,6 +916,15 @@ public JsonNullable mockCard() { return (JsonNullable) mockCard; } + /** + * Custom options to be passed to the `mockds-card` connector. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable mockdsCard() { + return (JsonNullable) mockdsCard; + } + /** * Custom options to be passed to the `nuvei-card` connector. */ @@ -1125,6 +1202,24 @@ public TransactionConnectionOptions withAdyenIdeal(JsonNullable adyenPaypay) { + Utils.checkNotNull(adyenPaypay, "adyenPaypay"); + this.adyenPaypay = adyenPaypay; + return this; + } + /** * Custom options to be passed to the `adyen-pix` connector. */ @@ -1395,6 +1490,42 @@ public TransactionConnectionOptions withDlocalPix(JsonNullable dlocalGcash) { + Utils.checkNotNull(dlocalGcash, "dlocalGcash"); + this.dlocalGcash = dlocalGcash; + return this; + } + + /** + * Custom options to be passed to the `ecommpay-card` connector. + */ + public TransactionConnectionOptions withEcommpayCard(EcommpayOptions ecommpayCard) { + Utils.checkNotNull(ecommpayCard, "ecommpayCard"); + this.ecommpayCard = JsonNullable.of(ecommpayCard); + return this; + } + + /** + * Custom options to be passed to the `ecommpay-card` connector. + */ + public TransactionConnectionOptions withEcommpayCard(JsonNullable ecommpayCard) { + Utils.checkNotNull(ecommpayCard, "ecommpayCard"); + this.ecommpayCard = ecommpayCard; + return this; + } + /** * Custom options to be passed to the `fiserv-card` connector. */ @@ -1611,6 +1742,24 @@ public TransactionConnectionOptions withMockCard(JsonNullable mockdsCard) { + Utils.checkNotNull(mockdsCard, "mockdsCard"); + this.mockdsCard = mockdsCard; + return this; + } + /** * Custom options to be passed to the `nuvei-card` connector. */ @@ -1916,6 +2065,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.adyenCashapp, other.adyenCashapp) && Utils.enhancedDeepEquals(this.adyenGiropay, other.adyenGiropay) && Utils.enhancedDeepEquals(this.adyenIdeal, other.adyenIdeal) && + Utils.enhancedDeepEquals(this.adyenPaypay, other.adyenPaypay) && Utils.enhancedDeepEquals(this.adyenPix, other.adyenPix) && Utils.enhancedDeepEquals(this.adyenSepa, other.adyenSepa) && Utils.enhancedDeepEquals(this.adyenSofort, other.adyenSofort) && @@ -1931,6 +2081,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.dlocalNequi, other.dlocalNequi) && Utils.enhancedDeepEquals(this.dlocalUpi, other.dlocalUpi) && Utils.enhancedDeepEquals(this.dlocalPix, other.dlocalPix) && + Utils.enhancedDeepEquals(this.dlocalGcash, other.dlocalGcash) && + Utils.enhancedDeepEquals(this.ecommpayCard, other.ecommpayCard) && Utils.enhancedDeepEquals(this.fiservCard, other.fiservCard) && Utils.enhancedDeepEquals(this.forterAntiFraud, other.forterAntiFraud) && Utils.enhancedDeepEquals(this.gemGem, other.gemGem) && @@ -1943,6 +2095,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.mattildaTapifintechs, other.mattildaTapifintechs) && Utils.enhancedDeepEquals(this.monatoSpei, other.monatoSpei) && Utils.enhancedDeepEquals(this.mockCard, other.mockCard) && + Utils.enhancedDeepEquals(this.mockdsCard, other.mockdsCard) && Utils.enhancedDeepEquals(this.nuveiCard, other.nuveiCard) && Utils.enhancedDeepEquals(this.nuveiIdeal, other.nuveiIdeal) && Utils.enhancedDeepEquals(this.nuveiKlarna, other.nuveiKlarna) && @@ -1966,21 +2119,22 @@ public int hashCode() { return Utils.enhancedHash( accountUpdater, adyenAfterpay, adyenAlipay, adyenCard, adyenCashapp, adyenGiropay, - adyenIdeal, adyenPix, adyenSepa, - adyenSofort, adyenSwish, adyenVipps, - affirmAffirm, braintreeCard, chaseorbitalCard, - cybersourceAntiFraud, cybersourceCard, cybersourceIdeal, - cybersourceKcp, dlocalNequi, dlocalUpi, - dlocalPix, fiservCard, forterAntiFraud, + adyenIdeal, adyenPaypay, adyenPix, + adyenSepa, adyenSofort, adyenSwish, + adyenVipps, affirmAffirm, braintreeCard, + chaseorbitalCard, cybersourceAntiFraud, cybersourceCard, + cybersourceIdeal, cybersourceKcp, dlocalNequi, + dlocalUpi, dlocalPix, dlocalGcash, + ecommpayCard, fiservCard, forterAntiFraud, gemGem, gemGemds, givingblockGivingblock, gocardlessGocardless, latitudeLatitude, latitudeLatitudeds, mattildaTapi, mattildaTapifintechs, monatoSpei, - mockCard, nuveiCard, nuveiIdeal, - nuveiKlarna, nuveiPse, oxxoOxxo, - paypalPaypal, paypalPaypalpaylater, powertranzCard, - riskifiedAntiFraud, stripeAffirm, stripeCard, - stripeKlarna, travelhubCard, trustlyTrustly, - wpayEverydaypay, wpayPayto); + mockCard, mockdsCard, nuveiCard, + nuveiIdeal, nuveiKlarna, nuveiPse, + oxxoOxxo, paypalPaypal, paypalPaypalpaylater, + powertranzCard, riskifiedAntiFraud, stripeAffirm, + stripeCard, stripeKlarna, travelhubCard, + trustlyTrustly, wpayEverydaypay, wpayPayto); } @Override @@ -1993,6 +2147,7 @@ public String toString() { "adyenCashapp", adyenCashapp, "adyenGiropay", adyenGiropay, "adyenIdeal", adyenIdeal, + "adyenPaypay", adyenPaypay, "adyenPix", adyenPix, "adyenSepa", adyenSepa, "adyenSofort", adyenSofort, @@ -2008,6 +2163,8 @@ public String toString() { "dlocalNequi", dlocalNequi, "dlocalUpi", dlocalUpi, "dlocalPix", dlocalPix, + "dlocalGcash", dlocalGcash, + "ecommpayCard", ecommpayCard, "fiservCard", fiservCard, "forterAntiFraud", forterAntiFraud, "gemGem", gemGem, @@ -2020,6 +2177,7 @@ public String toString() { "mattildaTapifintechs", mattildaTapifintechs, "monatoSpei", monatoSpei, "mockCard", mockCard, + "mockdsCard", mockdsCard, "nuveiCard", nuveiCard, "nuveiIdeal", nuveiIdeal, "nuveiKlarna", nuveiKlarna, @@ -2055,6 +2213,8 @@ public final static class Builder { private JsonNullable adyenIdeal = JsonNullable.undefined(); + private JsonNullable adyenPaypay = JsonNullable.undefined(); + private JsonNullable adyenPix = JsonNullable.undefined(); private JsonNullable adyenSepa = JsonNullable.undefined(); @@ -2085,6 +2245,10 @@ public final static class Builder { private JsonNullable dlocalPix = JsonNullable.undefined(); + private JsonNullable dlocalGcash = JsonNullable.undefined(); + + private JsonNullable ecommpayCard = JsonNullable.undefined(); + private JsonNullable fiservCard = JsonNullable.undefined(); private JsonNullable forterAntiFraud = JsonNullable.undefined(); @@ -2109,6 +2273,8 @@ public final static class Builder { private JsonNullable mockCard = JsonNullable.undefined(); + private JsonNullable mockdsCard = JsonNullable.undefined(); + private JsonNullable nuveiCard = JsonNullable.undefined(); private JsonNullable nuveiIdeal = JsonNullable.undefined(); @@ -2281,6 +2447,25 @@ public Builder adyenIdeal(JsonNullable adyenIdeal) { } + /** + * Custom options to be passed to the `adyen-paypay` connector. + */ + public Builder adyenPaypay(AdyenOptions adyenPaypay) { + Utils.checkNotNull(adyenPaypay, "adyenPaypay"); + this.adyenPaypay = JsonNullable.of(adyenPaypay); + return this; + } + + /** + * Custom options to be passed to the `adyen-paypay` connector. + */ + public Builder adyenPaypay(JsonNullable adyenPaypay) { + Utils.checkNotNull(adyenPaypay, "adyenPaypay"); + this.adyenPaypay = adyenPaypay; + return this; + } + + /** * Custom options to be passed to the `adyen-pix` connector. */ @@ -2566,6 +2751,44 @@ public Builder dlocalPix(JsonNullable dlocalPix) { } + /** + * Custom options to be passed to the `dlocal-gcash` connector. + */ + public Builder dlocalGcash(DlocalOptions dlocalGcash) { + Utils.checkNotNull(dlocalGcash, "dlocalGcash"); + this.dlocalGcash = JsonNullable.of(dlocalGcash); + return this; + } + + /** + * Custom options to be passed to the `dlocal-gcash` connector. + */ + public Builder dlocalGcash(JsonNullable dlocalGcash) { + Utils.checkNotNull(dlocalGcash, "dlocalGcash"); + this.dlocalGcash = dlocalGcash; + return this; + } + + + /** + * Custom options to be passed to the `ecommpay-card` connector. + */ + public Builder ecommpayCard(EcommpayOptions ecommpayCard) { + Utils.checkNotNull(ecommpayCard, "ecommpayCard"); + this.ecommpayCard = JsonNullable.of(ecommpayCard); + return this; + } + + /** + * Custom options to be passed to the `ecommpay-card` connector. + */ + public Builder ecommpayCard(JsonNullable ecommpayCard) { + Utils.checkNotNull(ecommpayCard, "ecommpayCard"); + this.ecommpayCard = ecommpayCard; + return this; + } + + /** * Custom options to be passed to the `fiserv-card` connector. */ @@ -2794,6 +3017,25 @@ public Builder mockCard(JsonNullable mockCard) { } + /** + * Custom options to be passed to the `mockds-card` connector. + */ + public Builder mockdsCard(MockCardOptions mockdsCard) { + Utils.checkNotNull(mockdsCard, "mockdsCard"); + this.mockdsCard = JsonNullable.of(mockdsCard); + return this; + } + + /** + * Custom options to be passed to the `mockds-card` connector. + */ + public Builder mockdsCard(JsonNullable mockdsCard) { + Utils.checkNotNull(mockdsCard, "mockdsCard"); + this.mockdsCard = mockdsCard; + return this; + } + + /** * Custom options to be passed to the `nuvei-card` connector. */ @@ -3102,21 +3344,22 @@ public TransactionConnectionOptions build() { return new TransactionConnectionOptions( accountUpdater, adyenAfterpay, adyenAlipay, adyenCard, adyenCashapp, adyenGiropay, - adyenIdeal, adyenPix, adyenSepa, - adyenSofort, adyenSwish, adyenVipps, - affirmAffirm, braintreeCard, chaseorbitalCard, - cybersourceAntiFraud, cybersourceCard, cybersourceIdeal, - cybersourceKcp, dlocalNequi, dlocalUpi, - dlocalPix, fiservCard, forterAntiFraud, + adyenIdeal, adyenPaypay, adyenPix, + adyenSepa, adyenSofort, adyenSwish, + adyenVipps, affirmAffirm, braintreeCard, + chaseorbitalCard, cybersourceAntiFraud, cybersourceCard, + cybersourceIdeal, cybersourceKcp, dlocalNequi, + dlocalUpi, dlocalPix, dlocalGcash, + ecommpayCard, fiservCard, forterAntiFraud, gemGem, gemGemds, givingblockGivingblock, gocardlessGocardless, latitudeLatitude, latitudeLatitudeds, mattildaTapi, mattildaTapifintechs, monatoSpei, - mockCard, nuveiCard, nuveiIdeal, - nuveiKlarna, nuveiPse, oxxoOxxo, - paypalPaypal, paypalPaypalpaylater, powertranzCard, - riskifiedAntiFraud, stripeAffirm, stripeCard, - stripeKlarna, travelhubCard, trustlyTrustly, - wpayEverydaypay, wpayPayto); + mockCard, mockdsCard, nuveiCard, + nuveiIdeal, nuveiKlarna, nuveiPse, + oxxoOxxo, paypalPaypal, paypalPaypalpaylater, + powertranzCard, riskifiedAntiFraud, stripeAffirm, + stripeCard, stripeKlarna, travelhubCard, + trustlyTrustly, wpayEverydaypay, wpayPayto); } } diff --git a/src/main/java/com/gr4vy/sdk/models/components/TransactionCreate.java b/src/main/java/com/gr4vy/sdk/models/components/TransactionCreate.java index 4df29978..3aea3395 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/TransactionCreate.java +++ b/src/main/java/com/gr4vy/sdk/models/components/TransactionCreate.java @@ -16,6 +16,7 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; import java.util.Optional; @@ -239,13 +240,20 @@ public class TransactionCreate { private JsonNullable connectionOptions; /** - * Whether to capture the transaction asynchronously. + * Whether to capture the transaction asynchronously when an authorization-capture split occurs. * - *

- When `async_capture` is `false` (default), the transaction is captured in the same request. - * - When `async_capture` is `true`, the transaction is automatically captured at a later time. + *

This flag is only used if the transaction flow is split between authorization and capture. + * The split itself is not controlled by this flag and depends on other conditions, including delayed + * capture support, direct capture support, card scheme, gift cards, and anti-fraud decision. + * + *

- When `async_capture` is `false` (default) and applicable, the capture is attempted in the same + * request. + * - When `async_capture` is `true` and applicable, the capture is performed outside the context of + * this request. * *

Redirect transactions are not affected by this flag. This flag can only be set to `true` when - * `intent` is set to `capture`. + * `intent` is set to `capture`. Please check the public documentation for full authorization-capture + * split behavior details. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("async_capture") @@ -360,6 +368,15 @@ public class TransactionCreate { @JsonProperty("integration_client") private JsonNullable integrationClient; + /** + * The date and time when the buyer's approval window for this transaction expires. If not provided, + * this is automatically computed from the connector's default expiration time. The value cannot exceed + * the connector's maximum approval window. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("approval_expires_at") + private JsonNullable approvalExpiresAt; + @JsonCreator public TransactionCreate( @JsonProperty("amount") long amount, @@ -401,7 +418,8 @@ public TransactionCreate( @JsonProperty("supplier_order_number") JsonNullable supplierOrderNumber, @JsonProperty("duty_amount") JsonNullable dutyAmount, @JsonProperty("shipping_amount") JsonNullable shippingAmount, - @JsonProperty("integration_client") JsonNullable integrationClient) { + @JsonProperty("integration_client") JsonNullable integrationClient, + @JsonProperty("approval_expires_at") JsonNullable approvalExpiresAt) { Utils.checkNotNull(amount, "amount"); Utils.checkNotNull(currency, "currency"); Utils.checkNotNull(country, "country"); @@ -442,6 +460,7 @@ public TransactionCreate( Utils.checkNotNull(dutyAmount, "dutyAmount"); Utils.checkNotNull(shippingAmount, "shippingAmount"); Utils.checkNotNull(integrationClient, "integrationClient"); + Utils.checkNotNull(approvalExpiresAt, "approvalExpiresAt"); this.amount = amount; this.currency = currency; this.country = country; @@ -482,6 +501,7 @@ public TransactionCreate( this.dutyAmount = dutyAmount; this.shippingAmount = shippingAmount; this.integrationClient = integrationClient; + this.approvalExpiresAt = approvalExpiresAt; } public TransactionCreate( @@ -500,7 +520,7 @@ public TransactionCreate( JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -757,13 +777,20 @@ public JsonNullable connectionOptions() { } /** - * Whether to capture the transaction asynchronously. + * Whether to capture the transaction asynchronously when an authorization-capture split occurs. * - *

- When `async_capture` is `false` (default), the transaction is captured in the same request. - * - When `async_capture` is `true`, the transaction is automatically captured at a later time. + *

This flag is only used if the transaction flow is split between authorization and capture. + * The split itself is not controlled by this flag and depends on other conditions, including delayed + * capture support, direct capture support, card scheme, gift cards, and anti-fraud decision. + * + *

- When `async_capture` is `false` (default) and applicable, the capture is attempted in the same + * request. + * - When `async_capture` is `true` and applicable, the capture is performed outside the context of + * this request. * *

Redirect transactions are not affected by this flag. This flag can only be set to `true` when - * `intent` is set to `capture`. + * `intent` is set to `capture`. Please check the public documentation for full authorization-capture + * split behavior details. */ @JsonIgnore public Optional asyncCapture() { @@ -896,6 +923,16 @@ public JsonNullable integrationClient() { return (JsonNullable) integrationClient; } + /** + * The date and time when the buyer's approval window for this transaction expires. If not provided, + * this is automatically computed from the connector's default expiration time. The value cannot exceed + * the connector's maximum approval window. + */ + @JsonIgnore + public JsonNullable approvalExpiresAt() { + return approvalExpiresAt; + } + public static Builder builder() { return new Builder(); } @@ -1413,13 +1450,20 @@ public TransactionCreate withConnectionOptions(JsonNullableThis flag is only used if the transaction flow is split between authorization and capture. + * The split itself is not controlled by this flag and depends on other conditions, including delayed + * capture support, direct capture support, card scheme, gift cards, and anti-fraud decision. * - *

- When `async_capture` is `false` (default), the transaction is captured in the same request. - * - When `async_capture` is `true`, the transaction is automatically captured at a later time. + *

- When `async_capture` is `false` (default) and applicable, the capture is attempted in the same + * request. + * - When `async_capture` is `true` and applicable, the capture is performed outside the context of + * this request. * *

Redirect transactions are not affected by this flag. This flag can only be set to `true` when - * `intent` is set to `capture`. + * `intent` is set to `capture`. Please check the public documentation for full authorization-capture + * split behavior details. */ public TransactionCreate withAsyncCapture(boolean asyncCapture) { Utils.checkNotNull(asyncCapture, "asyncCapture"); @@ -1429,13 +1473,20 @@ public TransactionCreate withAsyncCapture(boolean asyncCapture) { /** - * Whether to capture the transaction asynchronously. + * Whether to capture the transaction asynchronously when an authorization-capture split occurs. + * + *

This flag is only used if the transaction flow is split between authorization and capture. + * The split itself is not controlled by this flag and depends on other conditions, including delayed + * capture support, direct capture support, card scheme, gift cards, and anti-fraud decision. * - *

- When `async_capture` is `false` (default), the transaction is captured in the same request. - * - When `async_capture` is `true`, the transaction is automatically captured at a later time. + *

- When `async_capture` is `false` (default) and applicable, the capture is attempted in the same + * request. + * - When `async_capture` is `true` and applicable, the capture is performed outside the context of + * this request. * *

Redirect transactions are not affected by this flag. This flag can only be set to `true` when - * `intent` is set to `capture`. + * `intent` is set to `capture`. Please check the public documentation for full authorization-capture + * split behavior details. */ public TransactionCreate withAsyncCapture(Optional asyncCapture) { Utils.checkNotNull(asyncCapture, "asyncCapture"); @@ -1723,6 +1774,28 @@ public TransactionCreate withIntegrationClient(JsonNullable approvalExpiresAt) { + Utils.checkNotNull(approvalExpiresAt, "approvalExpiresAt"); + this.approvalExpiresAt = approvalExpiresAt; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -1772,7 +1845,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.supplierOrderNumber, other.supplierOrderNumber) && Utils.enhancedDeepEquals(this.dutyAmount, other.dutyAmount) && Utils.enhancedDeepEquals(this.shippingAmount, other.shippingAmount) && - Utils.enhancedDeepEquals(this.integrationClient, other.integrationClient); + Utils.enhancedDeepEquals(this.integrationClient, other.integrationClient) && + Utils.enhancedDeepEquals(this.approvalExpiresAt, other.approvalExpiresAt); } @Override @@ -1791,7 +1865,7 @@ public int hashCode() { installmentCount, taxAmount, merchantTaxId, purchaseOrderNumber, customerReferenceNumber, amountIncludesTax, supplierOrderNumber, dutyAmount, shippingAmount, - integrationClient); + integrationClient, approvalExpiresAt); } @Override @@ -1836,7 +1910,8 @@ public String toString() { "supplierOrderNumber", supplierOrderNumber, "dutyAmount", dutyAmount, "shippingAmount", shippingAmount, - "integrationClient", integrationClient); + "integrationClient", integrationClient, + "approvalExpiresAt", approvalExpiresAt); } @SuppressWarnings("UnusedReturnValue") @@ -1922,6 +1997,8 @@ public final static class Builder { private JsonNullable integrationClient = JsonNullable.undefined(); + private JsonNullable approvalExpiresAt = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -2458,13 +2535,20 @@ public Builder connectionOptions(JsonNullable- When `async_capture` is `false` (default), the transaction is captured in the same request. - * - When `async_capture` is `true`, the transaction is automatically captured at a later time. + *

This flag is only used if the transaction flow is split between authorization and capture. + * The split itself is not controlled by this flag and depends on other conditions, including delayed + * capture support, direct capture support, card scheme, gift cards, and anti-fraud decision. + * + *

- When `async_capture` is `false` (default) and applicable, the capture is attempted in the same + * request. + * - When `async_capture` is `true` and applicable, the capture is performed outside the context of + * this request. * *

Redirect transactions are not affected by this flag. This flag can only be set to `true` when - * `intent` is set to `capture`. + * `intent` is set to `capture`. Please check the public documentation for full authorization-capture + * split behavior details. */ public Builder asyncCapture(boolean asyncCapture) { Utils.checkNotNull(asyncCapture, "asyncCapture"); @@ -2473,13 +2557,20 @@ public Builder asyncCapture(boolean asyncCapture) { } /** - * Whether to capture the transaction asynchronously. + * Whether to capture the transaction asynchronously when an authorization-capture split occurs. + * + *

This flag is only used if the transaction flow is split between authorization and capture. + * The split itself is not controlled by this flag and depends on other conditions, including delayed + * capture support, direct capture support, card scheme, gift cards, and anti-fraud decision. * - *

- When `async_capture` is `false` (default), the transaction is captured in the same request. - * - When `async_capture` is `true`, the transaction is automatically captured at a later time. + *

- When `async_capture` is `false` (default) and applicable, the capture is attempted in the same + * request. + * - When `async_capture` is `true` and applicable, the capture is performed outside the context of + * this request. * *

Redirect transactions are not affected by this flag. This flag can only be set to `true` when - * `intent` is set to `capture`. + * `intent` is set to `capture`. Please check the public documentation for full authorization-capture + * split behavior details. */ public Builder asyncCapture(Optional asyncCapture) { Utils.checkNotNull(asyncCapture, "asyncCapture"); @@ -2780,6 +2871,29 @@ public Builder integrationClient(JsonNullable integ return this; } + + /** + * The date and time when the buyer's approval window for this transaction expires. If not provided, + * this is automatically computed from the connector's default expiration time. The value cannot exceed + * the connector's maximum approval window. + */ + public Builder approvalExpiresAt(OffsetDateTime approvalExpiresAt) { + Utils.checkNotNull(approvalExpiresAt, "approvalExpiresAt"); + this.approvalExpiresAt = JsonNullable.of(approvalExpiresAt); + return this; + } + + /** + * The date and time when the buyer's approval window for this transaction expires. If not provided, + * this is automatically computed from the connector's default expiration time. The value cannot exceed + * the connector's maximum approval window. + */ + public Builder approvalExpiresAt(JsonNullable approvalExpiresAt) { + Utils.checkNotNull(approvalExpiresAt, "approvalExpiresAt"); + this.approvalExpiresAt = approvalExpiresAt; + return this; + } + public TransactionCreate build() { if (store == null) { store = _SINGLETON_VALUE_Store.value(); @@ -2814,7 +2928,7 @@ public TransactionCreate build() { installmentCount, taxAmount, merchantTaxId, purchaseOrderNumber, customerReferenceNumber, amountIncludesTax, supplierOrderNumber, dutyAmount, shippingAmount, - integrationClient); + integrationClient, approvalExpiresAt); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java index eb7cea78..20e75ca9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.gr4vy.sdk.models.components.PaymentServiceUpdate; +import com.gr4vy.sdk.models.components.PaymentServiceCreate; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; @@ -14,12 +14,6 @@ public class CreatePaymentServiceRequest { - /** - * the ID of the payment service - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_id") - private String paymentServiceId; - /** * The ID of the merchant account to use for this request. */ @@ -28,33 +22,21 @@ public class CreatePaymentServiceRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private PaymentServiceUpdate paymentServiceUpdate; + private PaymentServiceCreate paymentServiceCreate; @JsonCreator public CreatePaymentServiceRequest( - String paymentServiceId, JsonNullable merchantAccountId, - PaymentServiceUpdate paymentServiceUpdate) { - Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + PaymentServiceCreate paymentServiceCreate) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); - this.paymentServiceId = paymentServiceId; + Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); this.merchantAccountId = merchantAccountId; - this.paymentServiceUpdate = paymentServiceUpdate; + this.paymentServiceCreate = paymentServiceCreate; } public CreatePaymentServiceRequest( - String paymentServiceId, - PaymentServiceUpdate paymentServiceUpdate) { - this(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate); - } - - /** - * the ID of the payment service - */ - @JsonIgnore - public String paymentServiceId() { - return paymentServiceId; + PaymentServiceCreate paymentServiceCreate) { + this(JsonNullable.undefined(), paymentServiceCreate); } /** @@ -66,8 +48,8 @@ public JsonNullable merchantAccountId() { } @JsonIgnore - public PaymentServiceUpdate paymentServiceUpdate() { - return paymentServiceUpdate; + public PaymentServiceCreate paymentServiceCreate() { + return paymentServiceCreate; } public static Builder builder() { @@ -75,15 +57,6 @@ public static Builder builder() { } - /** - * the ID of the payment service - */ - public CreatePaymentServiceRequest withPaymentServiceId(String paymentServiceId) { - Utils.checkNotNull(paymentServiceId, "paymentServiceId"); - this.paymentServiceId = paymentServiceId; - return this; - } - /** * The ID of the merchant account to use for this request. */ @@ -102,9 +75,9 @@ public CreatePaymentServiceRequest withMerchantAccountId(JsonNullable me return this; } - public CreatePaymentServiceRequest withPaymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { - Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); - this.paymentServiceUpdate = paymentServiceUpdate; + public CreatePaymentServiceRequest withPaymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { + Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); + this.paymentServiceCreate = paymentServiceCreate; return this; } @@ -118,49 +91,35 @@ public boolean equals(java.lang.Object o) { } CreatePaymentServiceRequest other = (CreatePaymentServiceRequest) o; return - Utils.enhancedDeepEquals(this.paymentServiceId, other.paymentServiceId) && Utils.enhancedDeepEquals(this.merchantAccountId, other.merchantAccountId) && - Utils.enhancedDeepEquals(this.paymentServiceUpdate, other.paymentServiceUpdate); + Utils.enhancedDeepEquals(this.paymentServiceCreate, other.paymentServiceCreate); } @Override public int hashCode() { return Utils.enhancedHash( - paymentServiceId, merchantAccountId, paymentServiceUpdate); + merchantAccountId, paymentServiceCreate); } @Override public String toString() { return Utils.toString(CreatePaymentServiceRequest.class, - "paymentServiceId", paymentServiceId, "merchantAccountId", merchantAccountId, - "paymentServiceUpdate", paymentServiceUpdate); + "paymentServiceCreate", paymentServiceCreate); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private String paymentServiceId; - private JsonNullable merchantAccountId = JsonNullable.undefined(); - private PaymentServiceUpdate paymentServiceUpdate; + private PaymentServiceCreate paymentServiceCreate; private Builder() { // force use of static builder() method } - /** - * the ID of the payment service - */ - public Builder paymentServiceId(String paymentServiceId) { - Utils.checkNotNull(paymentServiceId, "paymentServiceId"); - this.paymentServiceId = paymentServiceId; - return this; - } - - /** * The ID of the merchant account to use for this request. */ @@ -180,16 +139,16 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } - public Builder paymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { - Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); - this.paymentServiceUpdate = paymentServiceUpdate; + public Builder paymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { + Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); + this.paymentServiceCreate = paymentServiceCreate; return this; } public CreatePaymentServiceRequest build() { return new CreatePaymentServiceRequest( - paymentServiceId, merchantAccountId, paymentServiceUpdate); + merchantAccountId, paymentServiceCreate); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java index ea836995..e9c3cbdb 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java @@ -6,7 +6,7 @@ import static com.gr4vy.sdk.operations.Operations.RequestOperation; import com.gr4vy.sdk.SDKConfiguration; -import com.gr4vy.sdk.models.components.PaymentServiceUpdate; +import com.gr4vy.sdk.models.components.PaymentServiceCreate; import com.gr4vy.sdk.operations.CreatePaymentService; import com.gr4vy.sdk.utils.Headers; import com.gr4vy.sdk.utils.Utils; @@ -15,9 +15,8 @@ public class CreatePaymentServiceRequestBuilder { - private String paymentServiceId; private JsonNullable merchantAccountId = JsonNullable.undefined(); - private PaymentServiceUpdate paymentServiceUpdate; + private PaymentServiceCreate paymentServiceCreate; private final SDKConfiguration sdkConfiguration; private final Headers _headers = new Headers(); @@ -25,12 +24,6 @@ public CreatePaymentServiceRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public CreatePaymentServiceRequestBuilder paymentServiceId(String paymentServiceId) { - Utils.checkNotNull(paymentServiceId, "paymentServiceId"); - this.paymentServiceId = paymentServiceId; - return this; - } - public CreatePaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.merchantAccountId = JsonNullable.of(merchantAccountId); @@ -43,18 +36,17 @@ public CreatePaymentServiceRequestBuilder merchantAccountId(JsonNullable return this; } - public CreatePaymentServiceRequestBuilder paymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { - Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); - this.paymentServiceUpdate = paymentServiceUpdate; + public CreatePaymentServiceRequestBuilder paymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { + Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); + this.paymentServiceCreate = paymentServiceCreate; return this; } private CreatePaymentServiceRequest buildRequest() { - CreatePaymentServiceRequest request = new CreatePaymentServiceRequest(paymentServiceId, - merchantAccountId, - paymentServiceUpdate); + CreatePaymentServiceRequest request = new CreatePaymentServiceRequest(merchantAccountId, + paymentServiceCreate); return request; } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/OrderBy.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsOrderBy.java similarity index 54% rename from src/main/java/com/gr4vy/sdk/models/operations/OrderBy.java rename to src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsOrderBy.java index c953aa9b..a9d23b7a 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/OrderBy.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsOrderBy.java @@ -19,40 +19,40 @@ * Use {@code asEnum()} for switch expressions. */ /** - * OrderBy + * ListBuyerGiftCardsOrderBy * - *

The direction to sort the payment methods in. + *

The direction to sort the gift cards in. */ -public class OrderBy { +public class ListBuyerGiftCardsOrderBy { - public static final OrderBy ASC = new OrderBy("asc"); - public static final OrderBy DESC = new OrderBy("desc"); + public static final ListBuyerGiftCardsOrderBy ASC = new ListBuyerGiftCardsOrderBy("asc"); + public static final ListBuyerGiftCardsOrderBy DESC = new ListBuyerGiftCardsOrderBy("desc"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not // careful). Keep this field lower case to avoid clashing with // generated member names which will always be upper cased (Java // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); private final String value; - private OrderBy(String value) { + private ListBuyerGiftCardsOrderBy(String value) { this.value = value; } /** - * Returns a OrderBy with the given value. For a specific value the + * Returns a ListBuyerGiftCardsOrderBy with the given value. For a specific value the * returned object will always be a singleton so reference equality * is satisfied when the values are the same. * - * @param value value to be wrapped as OrderBy + * @param value value to be wrapped as ListBuyerGiftCardsOrderBy */ @JsonCreator - public static OrderBy of(String value) { - synchronized (OrderBy.class) { - return values.computeIfAbsent(value, v -> new OrderBy(v)); + public static ListBuyerGiftCardsOrderBy of(String value) { + synchronized (ListBuyerGiftCardsOrderBy.class) { + return values.computeIfAbsent(value, v -> new ListBuyerGiftCardsOrderBy(v)); } } @@ -61,7 +61,7 @@ public String value() { return value; } - public Optional asEnum() { + public Optional asEnum() { return Optional.ofNullable(enums.getOrDefault(value, null)); } @@ -82,45 +82,45 @@ public boolean equals(java.lang.Object obj) { return false; if (getClass() != obj.getClass()) return false; - OrderBy other = (OrderBy) obj; + ListBuyerGiftCardsOrderBy other = (ListBuyerGiftCardsOrderBy) obj; return Objects.equals(value, other.value); } @Override public String toString() { - return "OrderBy [value=" + value + "]"; + return "ListBuyerGiftCardsOrderBy [value=" + value + "]"; } // return an array just like an enum - public static OrderBy[] values() { - synchronized (OrderBy.class) { - return values.values().toArray(new OrderBy[] {}); + public static ListBuyerGiftCardsOrderBy[] values() { + synchronized (ListBuyerGiftCardsOrderBy.class) { + return values.values().toArray(new ListBuyerGiftCardsOrderBy[] {}); } } - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); map.put("asc", ASC); map.put("desc", DESC); return map; } - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("asc", OrderByEnum.ASC); - map.put("desc", OrderByEnum.DESC); + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("asc", ListBuyerGiftCardsOrderByEnum.ASC); + map.put("desc", ListBuyerGiftCardsOrderByEnum.DESC); return map; } - public enum OrderByEnum { + public enum ListBuyerGiftCardsOrderByEnum { ASC("asc"), DESC("desc"),; private final String value; - private OrderByEnum(String value) { + private ListBuyerGiftCardsOrderByEnum(String value) { this.value = value; } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java index eb52251e..aa9680fd 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java @@ -5,10 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -21,6 +25,18 @@ public class ListBuyerGiftCardsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=buyer_id") private JsonNullable buyerId; + /** + * The field to sort the gift cards by. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort_by") + private JsonNullable sortBy; + + /** + * The direction to sort the gift cards in. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=order_by") + private Optional orderBy; + /** * The ID of the merchant account to use for this request. */ @@ -31,17 +47,24 @@ public class ListBuyerGiftCardsRequest { public ListBuyerGiftCardsRequest( JsonNullable buyerExternalIdentifier, JsonNullable buyerId, + JsonNullable sortBy, + Optional orderBy, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(sortBy, "sortBy"); + Utils.checkNotNull(orderBy, "orderBy"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerExternalIdentifier = buyerExternalIdentifier; this.buyerId = buyerId; + this.sortBy = sortBy; + this.orderBy = orderBy; this.merchantAccountId = merchantAccountId; } public ListBuyerGiftCardsRequest() { - this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -54,6 +77,24 @@ public JsonNullable buyerId() { return buyerId; } + /** + * The field to sort the gift cards by. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable sortBy() { + return (JsonNullable) sortBy; + } + + /** + * The direction to sort the gift cards in. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional orderBy() { + return (Optional) orderBy; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +132,43 @@ public ListBuyerGiftCardsRequest withBuyerId(JsonNullable buyerId) { return this; } + /** + * The field to sort the gift cards by. + */ + public ListBuyerGiftCardsRequest withSortBy(ListBuyerGiftCardsSortBy sortBy) { + Utils.checkNotNull(sortBy, "sortBy"); + this.sortBy = JsonNullable.of(sortBy); + return this; + } + + /** + * The field to sort the gift cards by. + */ + public ListBuyerGiftCardsRequest withSortBy(JsonNullable sortBy) { + Utils.checkNotNull(sortBy, "sortBy"); + this.sortBy = sortBy; + return this; + } + + /** + * The direction to sort the gift cards in. + */ + public ListBuyerGiftCardsRequest withOrderBy(ListBuyerGiftCardsOrderBy orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = Optional.ofNullable(orderBy); + return this; + } + + + /** + * The direction to sort the gift cards in. + */ + public ListBuyerGiftCardsRequest withOrderBy(Optional orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = orderBy; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -121,13 +199,16 @@ public boolean equals(java.lang.Object o) { return Utils.enhancedDeepEquals(this.buyerExternalIdentifier, other.buyerExternalIdentifier) && Utils.enhancedDeepEquals(this.buyerId, other.buyerId) && + Utils.enhancedDeepEquals(this.sortBy, other.sortBy) && + Utils.enhancedDeepEquals(this.orderBy, other.orderBy) && Utils.enhancedDeepEquals(this.merchantAccountId, other.merchantAccountId); } @Override public int hashCode() { return Utils.enhancedHash( - buyerExternalIdentifier, buyerId, merchantAccountId); + buyerExternalIdentifier, buyerId, sortBy, + orderBy, merchantAccountId); } @Override @@ -135,6 +216,8 @@ public String toString() { return Utils.toString(ListBuyerGiftCardsRequest.class, "buyerExternalIdentifier", buyerExternalIdentifier, "buyerId", buyerId, + "sortBy", sortBy, + "orderBy", orderBy, "merchantAccountId", merchantAccountId); } @@ -145,6 +228,10 @@ public final static class Builder { private JsonNullable buyerId = JsonNullable.undefined(); + private JsonNullable sortBy = JsonNullable.undefined(); + + private Optional orderBy; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -178,6 +265,44 @@ public Builder buyerId(JsonNullable buyerId) { } + /** + * The field to sort the gift cards by. + */ + public Builder sortBy(ListBuyerGiftCardsSortBy sortBy) { + Utils.checkNotNull(sortBy, "sortBy"); + this.sortBy = JsonNullable.of(sortBy); + return this; + } + + /** + * The field to sort the gift cards by. + */ + public Builder sortBy(JsonNullable sortBy) { + Utils.checkNotNull(sortBy, "sortBy"); + this.sortBy = sortBy; + return this; + } + + + /** + * The direction to sort the gift cards in. + */ + public Builder orderBy(ListBuyerGiftCardsOrderBy orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = Optional.ofNullable(orderBy); + return this; + } + + /** + * The direction to sort the gift cards in. + */ + public Builder orderBy(Optional orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = orderBy; + return this; + } + + /** * The ID of the merchant account to use for this request. */ @@ -197,10 +322,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListBuyerGiftCardsRequest build() { + if (orderBy == null) { + orderBy = _SINGLETON_VALUE_OrderBy.value(); + } return new ListBuyerGiftCardsRequest( - buyerExternalIdentifier, buyerId, merchantAccountId); + buyerExternalIdentifier, buyerId, sortBy, + orderBy, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_OrderBy = + new LazySingletonValue<>( + "order_by", + "\"desc\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java index d2f79cb9..de3af577 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java @@ -11,15 +11,11 @@ import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; -import java.lang.String; import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; public class ListBuyerGiftCardsRequestBuilder { - private JsonNullable buyerExternalIdentifier = JsonNullable.undefined(); - private JsonNullable buyerId = JsonNullable.undefined(); - private JsonNullable merchantAccountId = JsonNullable.undefined(); + private ListBuyerGiftCardsRequest request; private Optional retryConfig = Optional.empty(); private final SDKConfiguration sdkConfiguration; private final Headers _headers = new Headers(); @@ -28,39 +24,9 @@ public ListBuyerGiftCardsRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public ListBuyerGiftCardsRequestBuilder buyerExternalIdentifier(String buyerExternalIdentifier) { - Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); - this.buyerExternalIdentifier = JsonNullable.of(buyerExternalIdentifier); - return this; - } - - public ListBuyerGiftCardsRequestBuilder buyerExternalIdentifier(JsonNullable buyerExternalIdentifier) { - Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); - this.buyerExternalIdentifier = buyerExternalIdentifier; - return this; - } - - public ListBuyerGiftCardsRequestBuilder buyerId(String buyerId) { - Utils.checkNotNull(buyerId, "buyerId"); - this.buyerId = JsonNullable.of(buyerId); - return this; - } - - public ListBuyerGiftCardsRequestBuilder buyerId(JsonNullable buyerId) { - Utils.checkNotNull(buyerId, "buyerId"); - this.buyerId = buyerId; - return this; - } - - public ListBuyerGiftCardsRequestBuilder merchantAccountId(String merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = JsonNullable.of(merchantAccountId); - return this; - } - - public ListBuyerGiftCardsRequestBuilder merchantAccountId(JsonNullable merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = merchantAccountId; + public ListBuyerGiftCardsRequestBuilder request(ListBuyerGiftCardsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } @@ -76,16 +42,6 @@ public ListBuyerGiftCardsRequestBuilder retryConfig(Optional retryC return this; } - - private ListBuyerGiftCardsRequest buildRequest() { - - ListBuyerGiftCardsRequest request = new ListBuyerGiftCardsRequest(buyerExternalIdentifier, - buyerId, - merchantAccountId); - - return request; - } - public ListBuyerGiftCardsResponse call() { Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) @@ -93,7 +49,6 @@ public ListBuyerGiftCardsResponse call() { RequestOperation operation = new ListBuyerGiftCards.Sync(sdkConfiguration, options, _headers); - ListBuyerGiftCardsRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsSortBy.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsSortBy.java new file mode 100644 index 00000000..c50645a1 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsSortBy.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ListBuyerGiftCardsSortBy + * + *

The field to sort the gift cards by. + */ +public enum ListBuyerGiftCardsSortBy { + LAST_USED_AT("last_used_at"), + USAGE_COUNT("usage_count"), + CIT_LAST_USED_AT("cit_last_used_at"), + CIT_USAGE_COUNT("cit_usage_count"); + + @JsonValue + private final String value; + + ListBuyerGiftCardsSortBy(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ListBuyerGiftCardsSortBy o: ListBuyerGiftCardsSortBy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsOrderBy.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsOrderBy.java new file mode 100644 index 00000000..c90f30f2 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsOrderBy.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ListBuyerPaymentMethodsOrderBy + * + *

The direction to sort the payment methods in. + */ +public class ListBuyerPaymentMethodsOrderBy { + + public static final ListBuyerPaymentMethodsOrderBy ASC = new ListBuyerPaymentMethodsOrderBy("asc"); + public static final ListBuyerPaymentMethodsOrderBy DESC = new ListBuyerPaymentMethodsOrderBy("desc"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ListBuyerPaymentMethodsOrderBy(String value) { + this.value = value; + } + + /** + * Returns a ListBuyerPaymentMethodsOrderBy with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ListBuyerPaymentMethodsOrderBy + */ + @JsonCreator + public static ListBuyerPaymentMethodsOrderBy of(String value) { + synchronized (ListBuyerPaymentMethodsOrderBy.class) { + return values.computeIfAbsent(value, v -> new ListBuyerPaymentMethodsOrderBy(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ListBuyerPaymentMethodsOrderBy other = (ListBuyerPaymentMethodsOrderBy) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ListBuyerPaymentMethodsOrderBy [value=" + value + "]"; + } + + // return an array just like an enum + public static ListBuyerPaymentMethodsOrderBy[] values() { + synchronized (ListBuyerPaymentMethodsOrderBy.class) { + return values.values().toArray(new ListBuyerPaymentMethodsOrderBy[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("asc", ASC); + map.put("desc", DESC); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("asc", ListBuyerPaymentMethodsOrderByEnum.ASC); + map.put("desc", ListBuyerPaymentMethodsOrderByEnum.DESC); + return map; + } + + + public enum ListBuyerPaymentMethodsOrderByEnum { + + ASC("asc"), + DESC("desc"),; + + private final String value; + + private ListBuyerPaymentMethodsOrderByEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java index bade75f0..869fff4b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java @@ -33,13 +33,13 @@ public class ListBuyerPaymentMethodsRequest { * The field to sort the payment methods by. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort_by") - private JsonNullable sortBy; + private JsonNullable sortBy; /** * The direction to sort the payment methods in. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=order_by") - private Optional orderBy; + private Optional orderBy; /** * The country code to filter payment methods by. This only applies to payment methods with a `country` @@ -65,8 +65,8 @@ public class ListBuyerPaymentMethodsRequest { public ListBuyerPaymentMethodsRequest( JsonNullable buyerId, JsonNullable buyerExternalIdentifier, - JsonNullable sortBy, - Optional orderBy, + JsonNullable sortBy, + Optional orderBy, JsonNullable country, JsonNullable currency, JsonNullable merchantAccountId) { @@ -113,8 +113,8 @@ public JsonNullable buyerExternalIdentifier() { */ @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable sortBy() { - return (JsonNullable) sortBy; + public JsonNullable sortBy() { + return (JsonNullable) sortBy; } /** @@ -122,8 +122,8 @@ public JsonNullable sortBy() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional orderBy() { - return (Optional) orderBy; + public Optional orderBy() { + return (Optional) orderBy; } /** @@ -196,7 +196,7 @@ public ListBuyerPaymentMethodsRequest withBuyerExternalIdentifier(JsonNullable sortBy) { + public ListBuyerPaymentMethodsRequest withSortBy(JsonNullable sortBy) { Utils.checkNotNull(sortBy, "sortBy"); this.sortBy = sortBy; return this; @@ -214,7 +214,7 @@ public ListBuyerPaymentMethodsRequest withSortBy(JsonNullable /** * The direction to sort the payment methods in. */ - public ListBuyerPaymentMethodsRequest withOrderBy(OrderBy orderBy) { + public ListBuyerPaymentMethodsRequest withOrderBy(ListBuyerPaymentMethodsOrderBy orderBy) { Utils.checkNotNull(orderBy, "orderBy"); this.orderBy = Optional.ofNullable(orderBy); return this; @@ -224,7 +224,7 @@ public ListBuyerPaymentMethodsRequest withOrderBy(OrderBy orderBy) { /** * The direction to sort the payment methods in. */ - public ListBuyerPaymentMethodsRequest withOrderBy(Optional orderBy) { + public ListBuyerPaymentMethodsRequest withOrderBy(Optional orderBy) { Utils.checkNotNull(orderBy, "orderBy"); this.orderBy = orderBy; return this; @@ -334,9 +334,9 @@ public final static class Builder { private JsonNullable buyerExternalIdentifier = JsonNullable.undefined(); - private JsonNullable sortBy = JsonNullable.undefined(); + private JsonNullable sortBy = JsonNullable.undefined(); - private Optional orderBy; + private Optional orderBy; private JsonNullable country = JsonNullable.undefined(); @@ -390,7 +390,7 @@ public Builder buyerExternalIdentifier(JsonNullable buyerExternalIdentif /** * The field to sort the payment methods by. */ - public Builder sortBy(SortBy sortBy) { + public Builder sortBy(ListBuyerPaymentMethodsSortBy sortBy) { Utils.checkNotNull(sortBy, "sortBy"); this.sortBy = JsonNullable.of(sortBy); return this; @@ -399,7 +399,7 @@ public Builder sortBy(SortBy sortBy) { /** * The field to sort the payment methods by. */ - public Builder sortBy(JsonNullable sortBy) { + public Builder sortBy(JsonNullable sortBy) { Utils.checkNotNull(sortBy, "sortBy"); this.sortBy = sortBy; return this; @@ -409,7 +409,7 @@ public Builder sortBy(JsonNullable sortBy) { /** * The direction to sort the payment methods in. */ - public Builder orderBy(OrderBy orderBy) { + public Builder orderBy(ListBuyerPaymentMethodsOrderBy orderBy) { Utils.checkNotNull(orderBy, "orderBy"); this.orderBy = Optional.ofNullable(orderBy); return this; @@ -418,7 +418,7 @@ public Builder orderBy(OrderBy orderBy) { /** * The direction to sort the payment methods in. */ - public Builder orderBy(Optional orderBy) { + public Builder orderBy(Optional orderBy) { Utils.checkNotNull(orderBy, "orderBy"); this.orderBy = orderBy; return this; @@ -497,10 +497,10 @@ public ListBuyerPaymentMethodsRequest build() { } - private static final LazySingletonValue> _SINGLETON_VALUE_OrderBy = + private static final LazySingletonValue> _SINGLETON_VALUE_OrderBy = new LazySingletonValue<>( "order_by", "\"desc\"", - new TypeReference>() {}); + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/SortBy.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsSortBy.java similarity index 71% rename from src/main/java/com/gr4vy/sdk/models/operations/SortBy.java rename to src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsSortBy.java index e67dee67..a8dde989 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/SortBy.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsSortBy.java @@ -9,11 +9,11 @@ import java.util.Optional; /** - * SortBy + * ListBuyerPaymentMethodsSortBy * *

The field to sort the payment methods by. */ -public enum SortBy { +public enum ListBuyerPaymentMethodsSortBy { LAST_USED_AT("last_used_at"), USAGE_COUNT("usage_count"), CIT_LAST_USED_AT("cit_last_used_at"), @@ -22,7 +22,7 @@ public enum SortBy { @JsonValue private final String value; - SortBy(String value) { + ListBuyerPaymentMethodsSortBy(String value) { this.value = value; } @@ -30,8 +30,8 @@ public String value() { return value; } - public static Optional fromValue(String value) { - for (SortBy o: SortBy.values()) { + public static Optional fromValue(String value) { + for (ListBuyerPaymentMethodsSortBy o: ListBuyerPaymentMethodsSortBy.values()) { if (Objects.deepEquals(o.value, value)) { return Optional.of(o); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequest.java new file mode 100644 index 00000000..65a70abd --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequest.java @@ -0,0 +1,196 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.gr4vy.sdk.models.components.PaymentMethodUpdate; +import com.gr4vy.sdk.utils.SpeakeasyMetadata; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class UpdatePaymentMethodRequest { + /** + * The ID of the payment method + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_method_id") + private String paymentMethodId; + + /** + * The ID of the merchant account to use for this request. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-gr4vy-merchant-account-id") + private JsonNullable merchantAccountId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private PaymentMethodUpdate paymentMethodUpdate; + + @JsonCreator + public UpdatePaymentMethodRequest( + String paymentMethodId, + JsonNullable merchantAccountId, + PaymentMethodUpdate paymentMethodUpdate) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + Utils.checkNotNull(paymentMethodUpdate, "paymentMethodUpdate"); + this.paymentMethodId = paymentMethodId; + this.merchantAccountId = merchantAccountId; + this.paymentMethodUpdate = paymentMethodUpdate; + } + + public UpdatePaymentMethodRequest( + String paymentMethodId, + PaymentMethodUpdate paymentMethodUpdate) { + this(paymentMethodId, JsonNullable.undefined(), paymentMethodUpdate); + } + + /** + * The ID of the payment method + */ + @JsonIgnore + public String paymentMethodId() { + return paymentMethodId; + } + + /** + * The ID of the merchant account to use for this request. + */ + @JsonIgnore + public JsonNullable merchantAccountId() { + return merchantAccountId; + } + + @JsonIgnore + public PaymentMethodUpdate paymentMethodUpdate() { + return paymentMethodUpdate; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the payment method + */ + public UpdatePaymentMethodRequest withPaymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + /** + * The ID of the merchant account to use for this request. + */ + public UpdatePaymentMethodRequest withMerchantAccountId(String merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = JsonNullable.of(merchantAccountId); + return this; + } + + /** + * The ID of the merchant account to use for this request. + */ + public UpdatePaymentMethodRequest withMerchantAccountId(JsonNullable merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = merchantAccountId; + return this; + } + + public UpdatePaymentMethodRequest withPaymentMethodUpdate(PaymentMethodUpdate paymentMethodUpdate) { + Utils.checkNotNull(paymentMethodUpdate, "paymentMethodUpdate"); + this.paymentMethodUpdate = paymentMethodUpdate; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePaymentMethodRequest other = (UpdatePaymentMethodRequest) o; + return + Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId) && + Utils.enhancedDeepEquals(this.merchantAccountId, other.merchantAccountId) && + Utils.enhancedDeepEquals(this.paymentMethodUpdate, other.paymentMethodUpdate); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + paymentMethodId, merchantAccountId, paymentMethodUpdate); + } + + @Override + public String toString() { + return Utils.toString(UpdatePaymentMethodRequest.class, + "paymentMethodId", paymentMethodId, + "merchantAccountId", merchantAccountId, + "paymentMethodUpdate", paymentMethodUpdate); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String paymentMethodId; + + private JsonNullable merchantAccountId = JsonNullable.undefined(); + + private PaymentMethodUpdate paymentMethodUpdate; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the payment method + */ + public Builder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + + /** + * The ID of the merchant account to use for this request. + */ + public Builder merchantAccountId(String merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = JsonNullable.of(merchantAccountId); + return this; + } + + /** + * The ID of the merchant account to use for this request. + */ + public Builder merchantAccountId(JsonNullable merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = merchantAccountId; + return this; + } + + + public Builder paymentMethodUpdate(PaymentMethodUpdate paymentMethodUpdate) { + Utils.checkNotNull(paymentMethodUpdate, "paymentMethodUpdate"); + this.paymentMethodUpdate = paymentMethodUpdate; + return this; + } + + public UpdatePaymentMethodRequest build() { + + return new UpdatePaymentMethodRequest( + paymentMethodId, merchantAccountId, paymentMethodUpdate); + } + + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequestBuilder.java new file mode 100644 index 00000000..2710c053 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodRequestBuilder.java @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import static com.gr4vy.sdk.operations.Operations.RequestOperation; + +import com.gr4vy.sdk.SDKConfiguration; +import com.gr4vy.sdk.models.components.PaymentMethodUpdate; +import com.gr4vy.sdk.operations.UpdatePaymentMethod; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.Utils; +import java.lang.String; +import org.openapitools.jackson.nullable.JsonNullable; + +public class UpdatePaymentMethodRequestBuilder { + + private String paymentMethodId; + private JsonNullable merchantAccountId = JsonNullable.undefined(); + private PaymentMethodUpdate paymentMethodUpdate; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public UpdatePaymentMethodRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdatePaymentMethodRequestBuilder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + public UpdatePaymentMethodRequestBuilder merchantAccountId(String merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = JsonNullable.of(merchantAccountId); + return this; + } + + public UpdatePaymentMethodRequestBuilder merchantAccountId(JsonNullable merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = merchantAccountId; + return this; + } + + public UpdatePaymentMethodRequestBuilder paymentMethodUpdate(PaymentMethodUpdate paymentMethodUpdate) { + Utils.checkNotNull(paymentMethodUpdate, "paymentMethodUpdate"); + this.paymentMethodUpdate = paymentMethodUpdate; + return this; + } + + + private UpdatePaymentMethodRequest buildRequest() { + + UpdatePaymentMethodRequest request = new UpdatePaymentMethodRequest(paymentMethodId, + merchantAccountId, + paymentMethodUpdate); + + return request; + } + + public UpdatePaymentMethodResponse call() { + + RequestOperation operation + = new UpdatePaymentMethod.Sync(sdkConfiguration, _headers); + UpdatePaymentMethodRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodResponse.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodResponse.java new file mode 100644 index 00000000..bea3e7e6 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentMethodResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.gr4vy.sdk.models.components.PaymentMethod; +import com.gr4vy.sdk.utils.Response; +import com.gr4vy.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class UpdatePaymentMethodResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful Response + */ + private Optional paymentMethod; + + @JsonCreator + public UpdatePaymentMethodResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional paymentMethod) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.paymentMethod = paymentMethod; + } + + public UpdatePaymentMethodResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful Response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional paymentMethod() { + return (Optional) paymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdatePaymentMethodResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdatePaymentMethodResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdatePaymentMethodResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful Response + */ + public UpdatePaymentMethodResponse withPaymentMethod(PaymentMethod paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = Optional.ofNullable(paymentMethod); + return this; + } + + + /** + * Successful Response + */ + public UpdatePaymentMethodResponse withPaymentMethod(Optional paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePaymentMethodResponse other = (UpdatePaymentMethodResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + paymentMethod); + } + + @Override + public String toString() { + return Utils.toString(UpdatePaymentMethodResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "paymentMethod", paymentMethod); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional paymentMethod = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful Response + */ + public Builder paymentMethod(PaymentMethod paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = Optional.ofNullable(paymentMethod); + return this; + } + + /** + * Successful Response + */ + public Builder paymentMethod(Optional paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + public UpdatePaymentMethodResponse build() { + + return new UpdatePaymentMethodResponse( + contentType, statusCode, rawResponse, + paymentMethod); + } + + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java index 16a1e120..a71a3f6d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.gr4vy.sdk.models.components.PaymentServiceCreate; +import com.gr4vy.sdk.models.components.PaymentServiceUpdate; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; @@ -14,6 +14,12 @@ public class UpdatePaymentServiceRequest { + /** + * the ID of the payment service + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_id") + private String paymentServiceId; + /** * The ID of the merchant account to use for this request. */ @@ -22,21 +28,33 @@ public class UpdatePaymentServiceRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private PaymentServiceCreate paymentServiceCreate; + private PaymentServiceUpdate paymentServiceUpdate; @JsonCreator public UpdatePaymentServiceRequest( + String paymentServiceId, JsonNullable merchantAccountId, - PaymentServiceCreate paymentServiceCreate) { + PaymentServiceUpdate paymentServiceUpdate) { + Utils.checkNotNull(paymentServiceId, "paymentServiceId"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); + Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); + this.paymentServiceId = paymentServiceId; this.merchantAccountId = merchantAccountId; - this.paymentServiceCreate = paymentServiceCreate; + this.paymentServiceUpdate = paymentServiceUpdate; } public UpdatePaymentServiceRequest( - PaymentServiceCreate paymentServiceCreate) { - this(JsonNullable.undefined(), paymentServiceCreate); + String paymentServiceId, + PaymentServiceUpdate paymentServiceUpdate) { + this(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate); + } + + /** + * the ID of the payment service + */ + @JsonIgnore + public String paymentServiceId() { + return paymentServiceId; } /** @@ -48,8 +66,8 @@ public JsonNullable merchantAccountId() { } @JsonIgnore - public PaymentServiceCreate paymentServiceCreate() { - return paymentServiceCreate; + public PaymentServiceUpdate paymentServiceUpdate() { + return paymentServiceUpdate; } public static Builder builder() { @@ -57,6 +75,15 @@ public static Builder builder() { } + /** + * the ID of the payment service + */ + public UpdatePaymentServiceRequest withPaymentServiceId(String paymentServiceId) { + Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + this.paymentServiceId = paymentServiceId; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -75,9 +102,9 @@ public UpdatePaymentServiceRequest withMerchantAccountId(JsonNullable me return this; } - public UpdatePaymentServiceRequest withPaymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { - Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); - this.paymentServiceCreate = paymentServiceCreate; + public UpdatePaymentServiceRequest withPaymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { + Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); + this.paymentServiceUpdate = paymentServiceUpdate; return this; } @@ -91,35 +118,49 @@ public boolean equals(java.lang.Object o) { } UpdatePaymentServiceRequest other = (UpdatePaymentServiceRequest) o; return + Utils.enhancedDeepEquals(this.paymentServiceId, other.paymentServiceId) && Utils.enhancedDeepEquals(this.merchantAccountId, other.merchantAccountId) && - Utils.enhancedDeepEquals(this.paymentServiceCreate, other.paymentServiceCreate); + Utils.enhancedDeepEquals(this.paymentServiceUpdate, other.paymentServiceUpdate); } @Override public int hashCode() { return Utils.enhancedHash( - merchantAccountId, paymentServiceCreate); + paymentServiceId, merchantAccountId, paymentServiceUpdate); } @Override public String toString() { return Utils.toString(UpdatePaymentServiceRequest.class, + "paymentServiceId", paymentServiceId, "merchantAccountId", merchantAccountId, - "paymentServiceCreate", paymentServiceCreate); + "paymentServiceUpdate", paymentServiceUpdate); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { + private String paymentServiceId; + private JsonNullable merchantAccountId = JsonNullable.undefined(); - private PaymentServiceCreate paymentServiceCreate; + private PaymentServiceUpdate paymentServiceUpdate; private Builder() { // force use of static builder() method } + /** + * the ID of the payment service + */ + public Builder paymentServiceId(String paymentServiceId) { + Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + this.paymentServiceId = paymentServiceId; + return this; + } + + /** * The ID of the merchant account to use for this request. */ @@ -139,16 +180,16 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } - public Builder paymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { - Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); - this.paymentServiceCreate = paymentServiceCreate; + public Builder paymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { + Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); + this.paymentServiceUpdate = paymentServiceUpdate; return this; } public UpdatePaymentServiceRequest build() { return new UpdatePaymentServiceRequest( - merchantAccountId, paymentServiceCreate); + paymentServiceId, merchantAccountId, paymentServiceUpdate); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java index 68b5866f..03b23fec 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java @@ -6,7 +6,7 @@ import static com.gr4vy.sdk.operations.Operations.RequestOperation; import com.gr4vy.sdk.SDKConfiguration; -import com.gr4vy.sdk.models.components.PaymentServiceCreate; +import com.gr4vy.sdk.models.components.PaymentServiceUpdate; import com.gr4vy.sdk.operations.UpdatePaymentService; import com.gr4vy.sdk.utils.Headers; import com.gr4vy.sdk.utils.Utils; @@ -15,8 +15,9 @@ public class UpdatePaymentServiceRequestBuilder { + private String paymentServiceId; private JsonNullable merchantAccountId = JsonNullable.undefined(); - private PaymentServiceCreate paymentServiceCreate; + private PaymentServiceUpdate paymentServiceUpdate; private final SDKConfiguration sdkConfiguration; private final Headers _headers = new Headers(); @@ -24,6 +25,12 @@ public UpdatePaymentServiceRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } + public UpdatePaymentServiceRequestBuilder paymentServiceId(String paymentServiceId) { + Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + this.paymentServiceId = paymentServiceId; + return this; + } + public UpdatePaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.merchantAccountId = JsonNullable.of(merchantAccountId); @@ -36,17 +43,18 @@ public UpdatePaymentServiceRequestBuilder merchantAccountId(JsonNullable return this; } - public UpdatePaymentServiceRequestBuilder paymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { - Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); - this.paymentServiceCreate = paymentServiceCreate; + public UpdatePaymentServiceRequestBuilder paymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { + Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); + this.paymentServiceUpdate = paymentServiceUpdate; return this; } private UpdatePaymentServiceRequest buildRequest() { - UpdatePaymentServiceRequest request = new UpdatePaymentServiceRequest(merchantAccountId, - paymentServiceCreate); + UpdatePaymentServiceRequest request = new UpdatePaymentServiceRequest(paymentServiceId, + merchantAccountId, + paymentServiceUpdate); return request; } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/CreatePaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/async/CreatePaymentServiceRequestBuilder.java index a5fdd2c2..e51b7350 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/async/CreatePaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/async/CreatePaymentServiceRequestBuilder.java @@ -6,7 +6,7 @@ import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; import com.gr4vy.sdk.SDKConfiguration; -import com.gr4vy.sdk.models.components.PaymentServiceUpdate; +import com.gr4vy.sdk.models.components.PaymentServiceCreate; import com.gr4vy.sdk.models.operations.CreatePaymentServiceRequest; import com.gr4vy.sdk.operations.CreatePaymentService; import com.gr4vy.sdk.utils.Headers; @@ -17,9 +17,8 @@ public class CreatePaymentServiceRequestBuilder { - private String paymentServiceId; private JsonNullable merchantAccountId = JsonNullable.undefined(); - private PaymentServiceUpdate paymentServiceUpdate; + private PaymentServiceCreate paymentServiceCreate; private final SDKConfiguration sdkConfiguration; private final Headers _headers = new Headers(); @@ -27,12 +26,6 @@ public CreatePaymentServiceRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public CreatePaymentServiceRequestBuilder paymentServiceId(String paymentServiceId) { - Utils.checkNotNull(paymentServiceId, "paymentServiceId"); - this.paymentServiceId = paymentServiceId; - return this; - } - public CreatePaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.merchantAccountId = JsonNullable.of(merchantAccountId); @@ -45,18 +38,17 @@ public CreatePaymentServiceRequestBuilder merchantAccountId(JsonNullable return this; } - public CreatePaymentServiceRequestBuilder paymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { - Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); - this.paymentServiceUpdate = paymentServiceUpdate; + public CreatePaymentServiceRequestBuilder paymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { + Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); + this.paymentServiceCreate = paymentServiceCreate; return this; } private CreatePaymentServiceRequest buildRequest() { - CreatePaymentServiceRequest request = new CreatePaymentServiceRequest(paymentServiceId, - merchantAccountId, - paymentServiceUpdate); + CreatePaymentServiceRequest request = new CreatePaymentServiceRequest(merchantAccountId, + paymentServiceCreate); return request; } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/ListBuyerGiftCardsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/async/ListBuyerGiftCardsRequestBuilder.java index 16c8addf..48c47786 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/async/ListBuyerGiftCardsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/async/ListBuyerGiftCardsRequestBuilder.java @@ -12,16 +12,12 @@ import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; -import java.lang.String; import java.util.Optional; import java.util.concurrent.CompletableFuture; -import org.openapitools.jackson.nullable.JsonNullable; public class ListBuyerGiftCardsRequestBuilder { - private JsonNullable buyerExternalIdentifier = JsonNullable.undefined(); - private JsonNullable buyerId = JsonNullable.undefined(); - private JsonNullable merchantAccountId = JsonNullable.undefined(); + private ListBuyerGiftCardsRequest request; private Optional retryConfig = Optional.empty(); private final SDKConfiguration sdkConfiguration; private final Headers _headers = new Headers(); @@ -30,39 +26,9 @@ public ListBuyerGiftCardsRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public ListBuyerGiftCardsRequestBuilder buyerExternalIdentifier(String buyerExternalIdentifier) { - Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); - this.buyerExternalIdentifier = JsonNullable.of(buyerExternalIdentifier); - return this; - } - - public ListBuyerGiftCardsRequestBuilder buyerExternalIdentifier(JsonNullable buyerExternalIdentifier) { - Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); - this.buyerExternalIdentifier = buyerExternalIdentifier; - return this; - } - - public ListBuyerGiftCardsRequestBuilder buyerId(String buyerId) { - Utils.checkNotNull(buyerId, "buyerId"); - this.buyerId = JsonNullable.of(buyerId); - return this; - } - - public ListBuyerGiftCardsRequestBuilder buyerId(JsonNullable buyerId) { - Utils.checkNotNull(buyerId, "buyerId"); - this.buyerId = buyerId; - return this; - } - - public ListBuyerGiftCardsRequestBuilder merchantAccountId(String merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = JsonNullable.of(merchantAccountId); - return this; - } - - public ListBuyerGiftCardsRequestBuilder merchantAccountId(JsonNullable merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = merchantAccountId; + public ListBuyerGiftCardsRequestBuilder request(ListBuyerGiftCardsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } @@ -78,16 +44,6 @@ public ListBuyerGiftCardsRequestBuilder retryConfig(Optional retryC return this; } - - private ListBuyerGiftCardsRequest buildRequest() { - - ListBuyerGiftCardsRequest request = new ListBuyerGiftCardsRequest(buyerExternalIdentifier, - buyerId, - merchantAccountId); - - return request; - } - public CompletableFuture call() { Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) @@ -97,7 +53,6 @@ public CompletableFuture call() { = new ListBuyerGiftCards.Async( sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers); - ListBuyerGiftCardsRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentMethodRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentMethodRequestBuilder.java new file mode 100644 index 00000000..1ba7d9bd --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentMethodRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations.async; + +import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; + +import com.gr4vy.sdk.SDKConfiguration; +import com.gr4vy.sdk.models.components.PaymentMethodUpdate; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequest; +import com.gr4vy.sdk.operations.UpdatePaymentMethod; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.Utils; +import java.lang.String; +import java.util.concurrent.CompletableFuture; +import org.openapitools.jackson.nullable.JsonNullable; + +public class UpdatePaymentMethodRequestBuilder { + + private String paymentMethodId; + private JsonNullable merchantAccountId = JsonNullable.undefined(); + private PaymentMethodUpdate paymentMethodUpdate; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public UpdatePaymentMethodRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdatePaymentMethodRequestBuilder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + public UpdatePaymentMethodRequestBuilder merchantAccountId(String merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = JsonNullable.of(merchantAccountId); + return this; + } + + public UpdatePaymentMethodRequestBuilder merchantAccountId(JsonNullable merchantAccountId) { + Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.merchantAccountId = merchantAccountId; + return this; + } + + public UpdatePaymentMethodRequestBuilder paymentMethodUpdate(PaymentMethodUpdate paymentMethodUpdate) { + Utils.checkNotNull(paymentMethodUpdate, "paymentMethodUpdate"); + this.paymentMethodUpdate = paymentMethodUpdate; + return this; + } + + + private UpdatePaymentMethodRequest buildRequest() { + + UpdatePaymentMethodRequest request = new UpdatePaymentMethodRequest(paymentMethodId, + merchantAccountId, + paymentMethodUpdate); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new UpdatePaymentMethod.Async(sdkConfiguration, _headers); + UpdatePaymentMethodRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentMethodResponse.java b/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentMethodResponse.java new file mode 100644 index 00000000..ea747df6 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentMethodResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.gr4vy.sdk.models.components.PaymentMethod; +import com.gr4vy.sdk.utils.AsyncResponse; +import com.gr4vy.sdk.utils.Blob; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class UpdatePaymentMethodResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful Response + */ + private Optional paymentMethod; + + @JsonCreator + public UpdatePaymentMethodResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional paymentMethod) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.paymentMethod = paymentMethod; + } + + public UpdatePaymentMethodResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful Response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional paymentMethod() { + return (Optional) paymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdatePaymentMethodResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdatePaymentMethodResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdatePaymentMethodResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful Response + */ + public UpdatePaymentMethodResponse withPaymentMethod(PaymentMethod paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = Optional.ofNullable(paymentMethod); + return this; + } + + + /** + * Successful Response + */ + public UpdatePaymentMethodResponse withPaymentMethod(Optional paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePaymentMethodResponse other = (UpdatePaymentMethodResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + paymentMethod); + } + + @Override + public String toString() { + return Utils.toString(UpdatePaymentMethodResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "paymentMethod", paymentMethod); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional paymentMethod = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful Response + */ + public Builder paymentMethod(PaymentMethod paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = Optional.ofNullable(paymentMethod); + return this; + } + + /** + * Successful Response + */ + public Builder paymentMethod(Optional paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + public UpdatePaymentMethodResponse build() { + + return new UpdatePaymentMethodResponse( + contentType, statusCode, rawResponse, + paymentMethod); + } + + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentServiceRequestBuilder.java index 26bf4187..bb5ffd0b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/async/UpdatePaymentServiceRequestBuilder.java @@ -6,7 +6,7 @@ import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; import com.gr4vy.sdk.SDKConfiguration; -import com.gr4vy.sdk.models.components.PaymentServiceCreate; +import com.gr4vy.sdk.models.components.PaymentServiceUpdate; import com.gr4vy.sdk.models.operations.UpdatePaymentServiceRequest; import com.gr4vy.sdk.operations.UpdatePaymentService; import com.gr4vy.sdk.utils.Headers; @@ -17,8 +17,9 @@ public class UpdatePaymentServiceRequestBuilder { + private String paymentServiceId; private JsonNullable merchantAccountId = JsonNullable.undefined(); - private PaymentServiceCreate paymentServiceCreate; + private PaymentServiceUpdate paymentServiceUpdate; private final SDKConfiguration sdkConfiguration; private final Headers _headers = new Headers(); @@ -26,6 +27,12 @@ public UpdatePaymentServiceRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } + public UpdatePaymentServiceRequestBuilder paymentServiceId(String paymentServiceId) { + Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + this.paymentServiceId = paymentServiceId; + return this; + } + public UpdatePaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.merchantAccountId = JsonNullable.of(merchantAccountId); @@ -38,17 +45,18 @@ public UpdatePaymentServiceRequestBuilder merchantAccountId(JsonNullable return this; } - public UpdatePaymentServiceRequestBuilder paymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { - Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); - this.paymentServiceCreate = paymentServiceCreate; + public UpdatePaymentServiceRequestBuilder paymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { + Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); + this.paymentServiceUpdate = paymentServiceUpdate; return this; } private UpdatePaymentServiceRequest buildRequest() { - UpdatePaymentServiceRequest request = new UpdatePaymentServiceRequest(merchantAccountId, - paymentServiceCreate); + UpdatePaymentServiceRequest request = new UpdatePaymentServiceRequest(paymentServiceId, + merchantAccountId, + paymentServiceUpdate); return request; } diff --git a/src/main/java/com/gr4vy/sdk/operations/AddBuyer.java b/src/main/java/com/gr4vy/sdk/operations/AddBuyer.java index 10c4ac73..a0ff4bef 100644 --- a/src/main/java/com/gr4vy/sdk/operations/AddBuyer.java +++ b/src/main/java/com/gr4vy/sdk/operations/AddBuyer.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(AddBuyerRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(AddBuyerRequest request) if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/AddBuyerShippingDetails.java b/src/main/java/com/gr4vy/sdk/operations/AddBuyerShippingDetails.java index a2da5022..2d706709 100644 --- a/src/main/java/com/gr4vy/sdk/operations/AddBuyerShippingDetails.java +++ b/src/main/java/com/gr4vy/sdk/operations/AddBuyerShippingDetails.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(AddBuyerShippingDetailsRequest reques HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(AddBuyerShippingDetailsRe if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/AddPaymentLink.java b/src/main/java/com/gr4vy/sdk/operations/AddPaymentLink.java index cc571b05..928b1bcf 100644 --- a/src/main/java/com/gr4vy/sdk/operations/AddPaymentLink.java +++ b/src/main/java/com/gr4vy/sdk/operations/AddPaymentLink.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(AddPaymentLinkRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(AddPaymentLinkRequest req if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/AddReport.java b/src/main/java/com/gr4vy/sdk/operations/AddReport.java index 7ab51971..4c31647e 100644 --- a/src/main/java/com/gr4vy/sdk/operations/AddReport.java +++ b/src/main/java/com/gr4vy/sdk/operations/AddReport.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(AddReportRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(AddReportRequest request) if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CancelTransaction.java b/src/main/java/com/gr4vy/sdk/operations/CancelTransaction.java index f06e2ae4..9326a9c4 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CancelTransaction.java +++ b/src/main/java/com/gr4vy/sdk/operations/CancelTransaction.java @@ -143,7 +143,7 @@ public HttpResponse doRequest(CancelTransactionRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -300,7 +300,7 @@ public CompletableFuture> doRequest(CancelTransactionRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CaptureTransaction.java b/src/main/java/com/gr4vy/sdk/operations/CaptureTransaction.java index 60062944..889f0dc1 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CaptureTransaction.java +++ b/src/main/java/com/gr4vy/sdk/operations/CaptureTransaction.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(CaptureTransactionRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(CaptureTransactionRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ConfigureDigitalWallet.java b/src/main/java/com/gr4vy/sdk/operations/ConfigureDigitalWallet.java index 17f4dcaa..3cedf536 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ConfigureDigitalWallet.java +++ b/src/main/java/com/gr4vy/sdk/operations/ConfigureDigitalWallet.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(ConfigureDigitalWalletRequest request HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(ConfigureDigitalWalletReq if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateAccountUpdaterJob.java b/src/main/java/com/gr4vy/sdk/operations/CreateAccountUpdaterJob.java index eadba37f..5ece16ae 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateAccountUpdaterJob.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateAccountUpdaterJob.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreateAccountUpdaterJobRequest reques HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -319,7 +319,7 @@ public CompletableFuture> doRequest(CreateAccountUpdaterJobRe if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateApplePayDigitalWalletSession.java b/src/main/java/com/gr4vy/sdk/operations/CreateApplePayDigitalWalletSession.java index 24c6fa36..fa7c2c07 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateApplePayDigitalWalletSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateApplePayDigitalWalletSession.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreateApplePayDigitalWalletSessionReq HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(CreateApplePayDigitalWall if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateCheckoutSession.java b/src/main/java/com/gr4vy/sdk/operations/CreateCheckoutSession.java index fd1205b1..6a89dfaa 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateCheckoutSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateCheckoutSession.java @@ -154,7 +154,7 @@ public HttpResponse doRequest(CreateCheckoutSessionRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -311,7 +311,7 @@ public CompletableFuture> doRequest(CreateCheckoutSessionRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateClickToPayDigitalWalletSession.java b/src/main/java/com/gr4vy/sdk/operations/CreateClickToPayDigitalWalletSession.java index 564fe300..f95bbbdc 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateClickToPayDigitalWalletSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateClickToPayDigitalWalletSession.java @@ -152,7 +152,7 @@ public HttpResponse doRequest(ClickToPaySessionRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -309,7 +309,7 @@ public CompletableFuture> doRequest(ClickToPaySessionRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateFullTransactionRefund.java b/src/main/java/com/gr4vy/sdk/operations/CreateFullTransactionRefund.java index e646c029..52ed8f32 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateFullTransactionRefund.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateFullTransactionRefund.java @@ -156,7 +156,7 @@ public HttpResponse doRequest(CreateFullTransactionRefundRequest re HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -313,7 +313,7 @@ public CompletableFuture> doRequest(CreateFullTransactionRefu if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateGiftCard.java b/src/main/java/com/gr4vy/sdk/operations/CreateGiftCard.java index 1a9cb482..6d32a32f 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateGiftCard.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateGiftCard.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreateGiftCardRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(CreateGiftCardRequest req if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateGooglePayDigitalWalletSession.java b/src/main/java/com/gr4vy/sdk/operations/CreateGooglePayDigitalWalletSession.java index 13ff9ac3..d5dfd2ef 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateGooglePayDigitalWalletSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateGooglePayDigitalWalletSession.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreateGooglePayDigitalWalletSessionRe HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(CreateGooglePayDigitalWal if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateMerchantAccount.java b/src/main/java/com/gr4vy/sdk/operations/CreateMerchantAccount.java index 78cecff5..6426d3eb 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateMerchantAccount.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateMerchantAccount.java @@ -152,7 +152,7 @@ public HttpResponse doRequest(MerchantAccountCreate request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -309,7 +309,7 @@ public CompletableFuture> doRequest(MerchantAccountCreate req if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethod.java b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethod.java index 8ef89119..8f2b6a52 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethod.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethod.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreatePaymentMethodRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(CreatePaymentMethodReques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkToken.java b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkToken.java index 1bb0c843..d1214ce1 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkToken.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkToken.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(CreatePaymentMethodNetworkTokenReques HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(CreatePaymentMethodNetwor if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkTokenCryptogram.java b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkTokenCryptogram.java index 125a2ab6..d7019fab 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkTokenCryptogram.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodNetworkTokenCryptogram.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(CreatePaymentMethodNetworkTokenCrypto HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(CreatePaymentMethodNetwor if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodPaymentServiceToken.java b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodPaymentServiceToken.java index 0c4a4828..5743cdb9 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodPaymentServiceToken.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentMethodPaymentServiceToken.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(CreatePaymentMethodPaymentServiceToke HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(CreatePaymentMethodPaymen if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentService.java b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentService.java index e35060cd..2769f3b8 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentService.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentService.java @@ -102,20 +102,18 @@ AfterErrorContextImpl createAfterErrorContext() { java.util.Optional.empty(), securitySource()); } - HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { String url = Utils.generateURL( - klass, this.baseUrl, - "/payment-services/{payment_service_id}", - request, this.operationGlobals); - HTTPRequest req = new HTTPRequest(url, "PUT"); + "/payment-services"); + HTTPRequest req = new HTTPRequest(url, "POST"); Object convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "paymentServiceUpdate", + "paymentServiceCreate", "json", false); if (serializedRequestBody == null) { @@ -139,7 +137,7 @@ public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { } private HttpRequest onBuildRequest(CreatePaymentServiceRequest request) throws Exception { - HttpRequest req = buildRequest(request, CreatePaymentServiceRequest.class, new TypeReference() {}); + HttpRequest req = buildRequest(request, new TypeReference() {}); return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); } @@ -160,7 +158,7 @@ public HttpResponse doRequest(CreatePaymentServiceRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -188,7 +186,7 @@ public CreatePaymentServiceResponse handleResponse(HttpResponse res CreatePaymentServiceResponse res = resBuilder.build(); - if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.statusCodeMatches(response.statusCode(), "201")) { if (Utils.contentTypeMatches(contentType, "application/json")) { return res.withPaymentService(Utils.unmarshal(response, new TypeReference() {})); } else { @@ -298,7 +296,7 @@ public Async(SDKConfiguration sdkConfiguration, Headers _headers) { } private CompletableFuture onBuildRequest(CreatePaymentServiceRequest request) throws Exception { - HttpRequest req = buildRequest(request, CreatePaymentServiceRequest.class, new TypeReference() {}); + HttpRequest req = buildRequest(request, new TypeReference() {}); return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); } @@ -317,7 +315,7 @@ public CompletableFuture> doRequest(CreatePaymentServiceReque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -342,7 +340,7 @@ public CompletableFuture() {}) .thenApply(res::withPaymentService); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceDefinitionSession.java b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceDefinitionSession.java index 7e4a9a9c..d907a201 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceDefinitionSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceDefinitionSession.java @@ -154,7 +154,7 @@ public HttpResponse doRequest(CreatePaymentServiceDefinitionSession HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -311,7 +311,7 @@ public CompletableFuture> doRequest(CreatePaymentServiceDefin if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceSession.java b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceSession.java index 3958903d..a7a18d48 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePaymentServiceSession.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(CreatePaymentServiceSessionRequest re HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(CreatePaymentServiceSessi if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreatePayout.java b/src/main/java/com/gr4vy/sdk/operations/CreatePayout.java index 5ca7130d..ae8b1088 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreatePayout.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreatePayout.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreatePayoutRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(CreatePayoutRequest reque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateReportExecutionUrl.java b/src/main/java/com/gr4vy/sdk/operations/CreateReportExecutionUrl.java index 551ae7e8..62254357 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateReportExecutionUrl.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateReportExecutionUrl.java @@ -156,7 +156,7 @@ public HttpResponse doRequest(CreateReportExecutionUrlRequest reque HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -313,7 +313,7 @@ public CompletableFuture> doRequest(CreateReportExecutionUrlR if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsConfiguration.java b/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsConfiguration.java index 13fe379d..46425ed9 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsConfiguration.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsConfiguration.java @@ -154,7 +154,7 @@ public HttpResponse doRequest(CreateThreeDsConfigurationRequest req HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -311,7 +311,7 @@ public CompletableFuture> doRequest(CreateThreeDsConfiguratio if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsScenario.java b/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsScenario.java index ba08b703..b6938df4 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsScenario.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateThreeDsScenario.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreateThreeDsScenarioRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(CreateThreeDsScenarioRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateTransaction.java b/src/main/java/com/gr4vy/sdk/operations/CreateTransaction.java index 94deb7e2..82252ec2 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateTransaction.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateTransaction.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(CreateTransactionRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(CreateTransactionRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/CreateTransactionRefund.java b/src/main/java/com/gr4vy/sdk/operations/CreateTransactionRefund.java index 7390505d..796ce9d1 100644 --- a/src/main/java/com/gr4vy/sdk/operations/CreateTransactionRefund.java +++ b/src/main/java/com/gr4vy/sdk/operations/CreateTransactionRefund.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(CreateTransactionRefundRequest reques HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(CreateTransactionRefundRe if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeleteBuyer.java b/src/main/java/com/gr4vy/sdk/operations/DeleteBuyer.java index 26c92752..b8ebdf6c 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeleteBuyer.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeleteBuyer.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeleteBuyerRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeleteBuyerRequest reques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeleteBuyerShippingDetails.java b/src/main/java/com/gr4vy/sdk/operations/DeleteBuyerShippingDetails.java index 14d93f33..8bdcc6b7 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeleteBuyerShippingDetails.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeleteBuyerShippingDetails.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeleteBuyerShippingDetailsRequest req HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeleteBuyerShippingDetail if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeleteCheckoutSession.java b/src/main/java/com/gr4vy/sdk/operations/DeleteCheckoutSession.java index d44be735..07e78257 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeleteCheckoutSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeleteCheckoutSession.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeleteCheckoutSessionRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeleteCheckoutSessionRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeleteDigitalWallet.java b/src/main/java/com/gr4vy/sdk/operations/DeleteDigitalWallet.java index 9a9b01c7..81519d49 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeleteDigitalWallet.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeleteDigitalWallet.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeleteDigitalWalletRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeleteDigitalWalletReques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeleteGiftCard.java b/src/main/java/com/gr4vy/sdk/operations/DeleteGiftCard.java index ed710ac0..6232056f 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeleteGiftCard.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeleteGiftCard.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeleteGiftCardRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeleteGiftCardRequest req if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethod.java b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethod.java index 849a9fa2..477caa05 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethod.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethod.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeletePaymentMethodRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeletePaymentMethodReques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodNetworkToken.java b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodNetworkToken.java index 7d0f1aa3..46ee79b8 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodNetworkToken.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodNetworkToken.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeletePaymentMethodNetworkTokenReques HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeletePaymentMethodNetwor if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodPaymentServiceToken.java b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodPaymentServiceToken.java index 84774adb..6fd734d4 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodPaymentServiceToken.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentMethodPaymentServiceToken.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeletePaymentMethodPaymentServiceToke HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeletePaymentMethodPaymen if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentService.java b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentService.java index 125f7d02..89813316 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeletePaymentService.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeletePaymentService.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeletePaymentServiceRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeletePaymentServiceReque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsConfiguration.java b/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsConfiguration.java index 423a9c12..12322465 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsConfiguration.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsConfiguration.java @@ -135,7 +135,7 @@ public HttpResponse doRequest(DeleteThreeDsConfigurationRequest req HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -289,7 +289,7 @@ public CompletableFuture> doRequest(DeleteThreeDsConfiguratio if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsScenario.java b/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsScenario.java index 7b3a92b7..cfdda526 100644 --- a/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsScenario.java +++ b/src/main/java/com/gr4vy/sdk/operations/DeleteThreeDsScenario.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(DeleteThreeDsScenarioRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(DeleteThreeDsScenarioRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/EditThreeDsConfiguration.java b/src/main/java/com/gr4vy/sdk/operations/EditThreeDsConfiguration.java index 6f676c1f..56a92e7f 100644 --- a/src/main/java/com/gr4vy/sdk/operations/EditThreeDsConfiguration.java +++ b/src/main/java/com/gr4vy/sdk/operations/EditThreeDsConfiguration.java @@ -154,7 +154,7 @@ public HttpResponse doRequest(EditThreeDsConfigurationRequest reque HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -311,7 +311,7 @@ public CompletableFuture> doRequest(EditThreeDsConfigurationR if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ExpirePaymentLink.java b/src/main/java/com/gr4vy/sdk/operations/ExpirePaymentLink.java index 85958e69..8cc48065 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ExpirePaymentLink.java +++ b/src/main/java/com/gr4vy/sdk/operations/ExpirePaymentLink.java @@ -141,7 +141,7 @@ public HttpResponse doRequest(ExpirePaymentLinkRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -295,7 +295,7 @@ public CompletableFuture> doRequest(ExpirePaymentLinkRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetBuyer.java b/src/main/java/com/gr4vy/sdk/operations/GetBuyer.java index 016d9e07..f4744805 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetBuyer.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetBuyer.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetBuyerRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetBuyerRequest request) if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetBuyerShippingDetails.java b/src/main/java/com/gr4vy/sdk/operations/GetBuyerShippingDetails.java index c69f0544..e7d99690 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetBuyerShippingDetails.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetBuyerShippingDetails.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetBuyerShippingDetailsRequest reques } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetBuyerShippingDetailsRe if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetCheckoutSession.java b/src/main/java/com/gr4vy/sdk/operations/GetCheckoutSession.java index 0f0cdc4e..41355636 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetCheckoutSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetCheckoutSession.java @@ -179,7 +179,7 @@ public HttpResponse doRequest(GetCheckoutSessionRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -342,7 +342,7 @@ public CompletableFuture> doRequest(GetCheckoutSessionRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetDigitalWallet.java b/src/main/java/com/gr4vy/sdk/operations/GetDigitalWallet.java index 9204004e..aca7c8d3 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetDigitalWallet.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetDigitalWallet.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetDigitalWalletRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetDigitalWalletRequest r if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetGiftCard.java b/src/main/java/com/gr4vy/sdk/operations/GetGiftCard.java index f46f9e0f..e88ba62d 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetGiftCard.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetGiftCard.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetGiftCardRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetGiftCardRequest reques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetMerchantAccount.java b/src/main/java/com/gr4vy/sdk/operations/GetMerchantAccount.java index 4014f014..20630452 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetMerchantAccount.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetMerchantAccount.java @@ -174,7 +174,7 @@ public HttpResponse doRequest(GetMerchantAccountRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -344,7 +344,7 @@ public CompletableFuture> doRequest(GetMerchantAccountRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetPaymentLink.java b/src/main/java/com/gr4vy/sdk/operations/GetPaymentLink.java index 7bc23d04..5c5be31d 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetPaymentLink.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetPaymentLink.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetPaymentLinkRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetPaymentLinkRequest req if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetPaymentMethod.java b/src/main/java/com/gr4vy/sdk/operations/GetPaymentMethod.java index 4ef4e344..655496e3 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetPaymentMethod.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetPaymentMethod.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetPaymentMethodRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetPaymentMethodRequest r if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetPaymentService.java b/src/main/java/com/gr4vy/sdk/operations/GetPaymentService.java index 9cd1b925..53fd1f30 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetPaymentService.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetPaymentService.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetPaymentServiceRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetPaymentServiceRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetPaymentServiceDefinition.java b/src/main/java/com/gr4vy/sdk/operations/GetPaymentServiceDefinition.java index 3e3d1ac3..73379c14 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetPaymentServiceDefinition.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetPaymentServiceDefinition.java @@ -174,7 +174,7 @@ public HttpResponse doRequest(GetPaymentServiceDefinitionRequest re } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -344,7 +344,7 @@ public CompletableFuture> doRequest(GetPaymentServiceDefiniti if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetPayout.java b/src/main/java/com/gr4vy/sdk/operations/GetPayout.java index c7da7b67..7628e318 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetPayout.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetPayout.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetPayoutRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetPayoutRequest request) if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetRefund.java b/src/main/java/com/gr4vy/sdk/operations/GetRefund.java index f2cd6844..cc2b4619 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetRefund.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetRefund.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetRefundRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetRefundRequest request) if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetReport.java b/src/main/java/com/gr4vy/sdk/operations/GetReport.java index 548c6256..7c3d8110 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetReport.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetReport.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetReportRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetReportRequest request) if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetReportExecution.java b/src/main/java/com/gr4vy/sdk/operations/GetReportExecution.java index b0c4f530..225d5540 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetReportExecution.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetReportExecution.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetReportExecutionRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetReportExecutionRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetThreeDsScenario.java b/src/main/java/com/gr4vy/sdk/operations/GetThreeDsScenario.java index f62e2dc6..97e114b6 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetThreeDsScenario.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetThreeDsScenario.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(GetThreeDsScenarioRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(GetThreeDsScenarioRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetTransaction.java b/src/main/java/com/gr4vy/sdk/operations/GetTransaction.java index e990b6b3..fc3692ad 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetTransaction.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetTransaction.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetTransactionRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetTransactionRequest req if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetTransactionRefund.java b/src/main/java/com/gr4vy/sdk/operations/GetTransactionRefund.java index 92c03d61..50378c2b 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetTransactionRefund.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetTransactionRefund.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetTransactionRefundRequest request) } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetTransactionRefundReque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/GetTransactionSettlement.java b/src/main/java/com/gr4vy/sdk/operations/GetTransactionSettlement.java index 0f77f660..79e114f8 100644 --- a/src/main/java/com/gr4vy/sdk/operations/GetTransactionSettlement.java +++ b/src/main/java/com/gr4vy/sdk/operations/GetTransactionSettlement.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(GetTransactionSettlementRequest reque } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(GetTransactionSettlementR if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListAllReportExecutions.java b/src/main/java/com/gr4vy/sdk/operations/ListAllReportExecutions.java index d1585bdf..5f8f7ee2 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListAllReportExecutions.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListAllReportExecutions.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListAllReportExecutionsRequest reques } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListAllReportExecutionsRe if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListAuditLogs.java b/src/main/java/com/gr4vy/sdk/operations/ListAuditLogs.java index d7368b09..464fa8ea 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListAuditLogs.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListAuditLogs.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListAuditLogsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListAuditLogsRequest requ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListBuyerGiftCards.java b/src/main/java/com/gr4vy/sdk/operations/ListBuyerGiftCards.java index 073a16a7..093285b4 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListBuyerGiftCards.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListBuyerGiftCards.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListBuyerGiftCardsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListBuyerGiftCardsRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListBuyerPaymentMethods.java b/src/main/java/com/gr4vy/sdk/operations/ListBuyerPaymentMethods.java index 3339ca50..1f506c7e 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListBuyerPaymentMethods.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListBuyerPaymentMethods.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListBuyerPaymentMethodsRequest reques } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListBuyerPaymentMethodsRe if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListBuyerShippingDetails.java b/src/main/java/com/gr4vy/sdk/operations/ListBuyerShippingDetails.java index 7f7176dd..5a954e59 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListBuyerShippingDetails.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListBuyerShippingDetails.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(ListBuyerShippingDetailsRequest reque } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(ListBuyerShippingDetailsR if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListBuyers.java b/src/main/java/com/gr4vy/sdk/operations/ListBuyers.java index c80843c7..fcddc814 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListBuyers.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListBuyers.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListBuyersRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListBuyersRequest request if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListCardSchemeDefinitions.java b/src/main/java/com/gr4vy/sdk/operations/ListCardSchemeDefinitions.java index 76129507..1a515950 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListCardSchemeDefinitions.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListCardSchemeDefinitions.java @@ -178,7 +178,7 @@ public HttpResponse doRequest(ListCardSchemeDefinitionsRequest requ } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -348,7 +348,7 @@ public CompletableFuture> doRequest(ListCardSchemeDefinitions if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListDigitalWallets.java b/src/main/java/com/gr4vy/sdk/operations/ListDigitalWallets.java index ade998a6..3d370f7e 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListDigitalWallets.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListDigitalWallets.java @@ -178,7 +178,7 @@ public HttpResponse doRequest(ListDigitalWalletsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -348,7 +348,7 @@ public CompletableFuture> doRequest(ListDigitalWalletsRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListGiftCardBalances.java b/src/main/java/com/gr4vy/sdk/operations/ListGiftCardBalances.java index 14f2e2e4..6e229ec7 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListGiftCardBalances.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListGiftCardBalances.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(ListGiftCardBalancesRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(ListGiftCardBalancesReque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListGiftCards.java b/src/main/java/com/gr4vy/sdk/operations/ListGiftCards.java index 6c570267..57711420 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListGiftCards.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListGiftCards.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListGiftCardsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListGiftCardsRequest requ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListMerchantAccounts.java b/src/main/java/com/gr4vy/sdk/operations/ListMerchantAccounts.java index f0365dd8..641a56a1 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListMerchantAccounts.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListMerchantAccounts.java @@ -177,7 +177,7 @@ public HttpResponse doRequest(ListMerchantAccountsRequest request) } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -347,7 +347,7 @@ public CompletableFuture> doRequest(ListMerchantAccountsReque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPaymentLinks.java b/src/main/java/com/gr4vy/sdk/operations/ListPaymentLinks.java index 76acf145..99741d88 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPaymentLinks.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPaymentLinks.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListPaymentLinksRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListPaymentLinksRequest r if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodNetworkTokens.java b/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodNetworkTokens.java index ea5e1d71..478823a7 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodNetworkTokens.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodNetworkTokens.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(ListPaymentMethodNetworkTokensRequest } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(ListPaymentMethodNetworkT if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodPaymentServiceTokens.java b/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodPaymentServiceTokens.java index f883f0ad..97041533 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodPaymentServiceTokens.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethodPaymentServiceTokens.java @@ -185,7 +185,7 @@ public HttpResponse doRequest(ListPaymentMethodPaymentServiceTokens } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -355,7 +355,7 @@ public CompletableFuture> doRequest(ListPaymentMethodPaymentS if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethods.java b/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethods.java index 8702856e..824849b9 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethods.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPaymentMethods.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListPaymentMethodsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListPaymentMethodsRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPaymentOptions.java b/src/main/java/com/gr4vy/sdk/operations/ListPaymentOptions.java index a6e2bf23..5007bbbf 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPaymentOptions.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPaymentOptions.java @@ -158,7 +158,7 @@ public HttpResponse doRequest(ListPaymentOptionsRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -315,7 +315,7 @@ public CompletableFuture> doRequest(ListPaymentOptionsRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPaymentServiceDefinitions.java b/src/main/java/com/gr4vy/sdk/operations/ListPaymentServiceDefinitions.java index af03c56e..af8551c9 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPaymentServiceDefinitions.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPaymentServiceDefinitions.java @@ -177,7 +177,7 @@ public HttpResponse doRequest(ListPaymentServiceDefinitionsRequest } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -347,7 +347,7 @@ public CompletableFuture> doRequest(ListPaymentServiceDefinit if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPaymentServices.java b/src/main/java/com/gr4vy/sdk/operations/ListPaymentServices.java index a82f2016..e90c80c3 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPaymentServices.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPaymentServices.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListPaymentServicesRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListPaymentServicesReques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListPayouts.java b/src/main/java/com/gr4vy/sdk/operations/ListPayouts.java index 1b5f3f5c..de416ef3 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListPayouts.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListPayouts.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListPayoutsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListPayoutsRequest reques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListReportExecutions.java b/src/main/java/com/gr4vy/sdk/operations/ListReportExecutions.java index 2dac5f7b..704244bd 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListReportExecutions.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListReportExecutions.java @@ -185,7 +185,7 @@ public HttpResponse doRequest(ListReportExecutionsRequest request) } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -355,7 +355,7 @@ public CompletableFuture> doRequest(ListReportExecutionsReque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListReports.java b/src/main/java/com/gr4vy/sdk/operations/ListReports.java index 3acfb2d3..43e5dfd1 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListReports.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListReports.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListReportsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListReportsRequest reques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListThreeDsConfigurations.java b/src/main/java/com/gr4vy/sdk/operations/ListThreeDsConfigurations.java index f8fea4cb..e5214287 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListThreeDsConfigurations.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListThreeDsConfigurations.java @@ -179,7 +179,7 @@ public HttpResponse doRequest(ListThreeDsConfigurationsRequest requ } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -349,7 +349,7 @@ public CompletableFuture> doRequest(ListThreeDsConfigurations if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListTransactionActions.java b/src/main/java/com/gr4vy/sdk/operations/ListTransactionActions.java index c22c0f3a..f36a7357 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListTransactionActions.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListTransactionActions.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(ListTransactionActionsRequest request } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(ListTransactionActionsReq if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListTransactionEvents.java b/src/main/java/com/gr4vy/sdk/operations/ListTransactionEvents.java index 5cb34c4e..6aef3754 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListTransactionEvents.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListTransactionEvents.java @@ -185,7 +185,7 @@ public HttpResponse doRequest(ListTransactionEventsRequest request) } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -355,7 +355,7 @@ public CompletableFuture> doRequest(ListTransactionEventsRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListTransactionRefunds.java b/src/main/java/com/gr4vy/sdk/operations/ListTransactionRefunds.java index 56cd0a7b..eeb25a5d 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListTransactionRefunds.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListTransactionRefunds.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(ListTransactionRefundsRequest request } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(ListTransactionRefundsReq if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListTransactionSettlements.java b/src/main/java/com/gr4vy/sdk/operations/ListTransactionSettlements.java index 75e7909f..1da1a594 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListTransactionSettlements.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListTransactionSettlements.java @@ -180,7 +180,7 @@ public HttpResponse doRequest(ListTransactionSettlementsRequest req } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -350,7 +350,7 @@ public CompletableFuture> doRequest(ListTransactionSettlement if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ListTransactions.java b/src/main/java/com/gr4vy/sdk/operations/ListTransactions.java index 1d626393..63ac78fc 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ListTransactions.java +++ b/src/main/java/com/gr4vy/sdk/operations/ListTransactions.java @@ -183,7 +183,7 @@ public HttpResponse doRequest(ListTransactionsRequest request) { } try { HttpResponse httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { return onError(httpRes, null); } return httpRes; @@ -353,7 +353,7 @@ public CompletableFuture> doRequest(ListTransactionsRequest r if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/RegisterDigitalWalletDomain.java b/src/main/java/com/gr4vy/sdk/operations/RegisterDigitalWalletDomain.java index cfcf5500..360a4e32 100644 --- a/src/main/java/com/gr4vy/sdk/operations/RegisterDigitalWalletDomain.java +++ b/src/main/java/com/gr4vy/sdk/operations/RegisterDigitalWalletDomain.java @@ -159,7 +159,7 @@ public HttpResponse doRequest(RegisterDigitalWalletDomainRequest re HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -316,7 +316,7 @@ public CompletableFuture> doRequest(RegisterDigitalWalletDoma if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/ResumePaymentMethodNetworkToken.java b/src/main/java/com/gr4vy/sdk/operations/ResumePaymentMethodNetworkToken.java index 223384b0..a51bb1cd 100644 --- a/src/main/java/com/gr4vy/sdk/operations/ResumePaymentMethodNetworkToken.java +++ b/src/main/java/com/gr4vy/sdk/operations/ResumePaymentMethodNetworkToken.java @@ -143,7 +143,7 @@ public HttpResponse doRequest(ResumePaymentMethodNetworkTokenReques HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -300,7 +300,7 @@ public CompletableFuture> doRequest(ResumePaymentMethodNetwor if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/SuspendPaymentMethodNetworkToken.java b/src/main/java/com/gr4vy/sdk/operations/SuspendPaymentMethodNetworkToken.java index b39ce696..2ed522bf 100644 --- a/src/main/java/com/gr4vy/sdk/operations/SuspendPaymentMethodNetworkToken.java +++ b/src/main/java/com/gr4vy/sdk/operations/SuspendPaymentMethodNetworkToken.java @@ -143,7 +143,7 @@ public HttpResponse doRequest(SuspendPaymentMethodNetworkTokenReque HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -300,7 +300,7 @@ public CompletableFuture> doRequest(SuspendPaymentMethodNetwo if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/SyncTransaction.java b/src/main/java/com/gr4vy/sdk/operations/SyncTransaction.java index 8bba146b..2935e36e 100644 --- a/src/main/java/com/gr4vy/sdk/operations/SyncTransaction.java +++ b/src/main/java/com/gr4vy/sdk/operations/SyncTransaction.java @@ -143,7 +143,7 @@ public HttpResponse doRequest(SyncTransactionRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -300,7 +300,7 @@ public CompletableFuture> doRequest(SyncTransactionRequest re if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UnregisterDigitalWalletDomain.java b/src/main/java/com/gr4vy/sdk/operations/UnregisterDigitalWalletDomain.java index 086ad15a..5582fca9 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UnregisterDigitalWalletDomain.java +++ b/src/main/java/com/gr4vy/sdk/operations/UnregisterDigitalWalletDomain.java @@ -159,7 +159,7 @@ public HttpResponse doRequest(UnregisterDigitalWalletDomainRequest HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -313,7 +313,7 @@ public CompletableFuture> doRequest(UnregisterDigitalWalletDo if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateBuyer.java b/src/main/java/com/gr4vy/sdk/operations/UpdateBuyer.java index 5dc12274..8b7e0ced 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateBuyer.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateBuyer.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(UpdateBuyerRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(UpdateBuyerRequest reques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateBuyerShippingDetails.java b/src/main/java/com/gr4vy/sdk/operations/UpdateBuyerShippingDetails.java index d4bc7f89..e172ff01 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateBuyerShippingDetails.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateBuyerShippingDetails.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(UpdateBuyerShippingDetailsRequest req HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(UpdateBuyerShippingDetail if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateCheckoutSession.java b/src/main/java/com/gr4vy/sdk/operations/UpdateCheckoutSession.java index 5d8fd576..ac9fa407 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateCheckoutSession.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateCheckoutSession.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(UpdateCheckoutSessionRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(UpdateCheckoutSessionRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateDigitalWallet.java b/src/main/java/com/gr4vy/sdk/operations/UpdateDigitalWallet.java index 7fad5958..18db4e83 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateDigitalWallet.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateDigitalWallet.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(UpdateDigitalWalletRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(UpdateDigitalWalletReques if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateMerchantAccount.java b/src/main/java/com/gr4vy/sdk/operations/UpdateMerchantAccount.java index 94c6d76e..addc038f 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateMerchantAccount.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateMerchantAccount.java @@ -154,7 +154,7 @@ public HttpResponse doRequest(UpdateMerchantAccountRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -311,7 +311,7 @@ public CompletableFuture> doRequest(UpdateMerchantAccountRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdatePaymentMethod.java b/src/main/java/com/gr4vy/sdk/operations/UpdatePaymentMethod.java new file mode 100644 index 00000000..a6ee2744 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/operations/UpdatePaymentMethod.java @@ -0,0 +1,460 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.operations; + +import static com.gr4vy.sdk.operations.Operations.RequestOperation; +import static com.gr4vy.sdk.utils.Exceptions.unchecked; +import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.SDKConfiguration; +import com.gr4vy.sdk.SecuritySource; +import com.gr4vy.sdk.models.components.PaymentMethod; +import com.gr4vy.sdk.models.errors.APIException; +import com.gr4vy.sdk.models.errors.Error400; +import com.gr4vy.sdk.models.errors.Error401; +import com.gr4vy.sdk.models.errors.Error403; +import com.gr4vy.sdk.models.errors.Error404; +import com.gr4vy.sdk.models.errors.Error405; +import com.gr4vy.sdk.models.errors.Error409; +import com.gr4vy.sdk.models.errors.Error425; +import com.gr4vy.sdk.models.errors.Error429; +import com.gr4vy.sdk.models.errors.Error500; +import com.gr4vy.sdk.models.errors.Error502; +import com.gr4vy.sdk.models.errors.Error504; +import com.gr4vy.sdk.models.errors.HTTPValidationError; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequest; +import com.gr4vy.sdk.models.operations.UpdatePaymentMethodResponse; +import com.gr4vy.sdk.utils.Blob; +import com.gr4vy.sdk.utils.Globals; +import com.gr4vy.sdk.utils.HTTPClient; +import com.gr4vy.sdk.utils.HTTPRequest; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.Hook.AfterErrorContextImpl; +import com.gr4vy.sdk.utils.Hook.AfterSuccessContextImpl; +import com.gr4vy.sdk.utils.Hook.BeforeRequestContextImpl; +import com.gr4vy.sdk.utils.SerializedBody; +import com.gr4vy.sdk.utils.Utils.JsonShape; +import com.gr4vy.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class UpdatePaymentMethod { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-gr4vy-merchant-account-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-gr4vy-merchant-account-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "update_payment_method", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "update_payment_method", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "update_payment_method", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/payment-methods/{payment_method_id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "paymentMethodUpdate", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.operationGlobals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(UpdatePaymentMethodRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdatePaymentMethodRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(UpdatePaymentMethodRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public UpdatePaymentMethodResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpdatePaymentMethodResponse.Builder resBuilder = + UpdatePaymentMethodResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UpdatePaymentMethodResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPaymentMethod(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error400.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error401.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "403")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error403.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error404.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error405.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "409")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error409.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw HTTPValidationError.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "425")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error425.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error429.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error500.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "502")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error502.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "504")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error504.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(UpdatePaymentMethodRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdatePaymentMethodRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(UpdatePaymentMethodRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.gr4vy.sdk.models.operations.async.UpdatePaymentMethodResponse.Builder resBuilder = + com.gr4vy.sdk.models.operations.async.UpdatePaymentMethodResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.gr4vy.sdk.models.operations.async.UpdatePaymentMethodResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPaymentMethod); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error400.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error401.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "403")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error403.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error404.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error405.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "409")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error409.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return HTTPValidationError.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "425")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error425.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error429.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error500.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "502")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error502.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "504")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error504.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdatePaymentService.java b/src/main/java/com/gr4vy/sdk/operations/UpdatePaymentService.java index cc5479a2..15b9aac4 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdatePaymentService.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdatePaymentService.java @@ -102,18 +102,20 @@ AfterErrorContextImpl createAfterErrorContext() { java.util.Optional.empty(), securitySource()); } - HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { String url = Utils.generateURL( + klass, this.baseUrl, - "/payment-services"); - HTTPRequest req = new HTTPRequest(url, "POST"); + "/payment-services/{payment_service_id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "PUT"); Object convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "paymentServiceCreate", + "paymentServiceUpdate", "json", false); if (serializedRequestBody == null) { @@ -137,7 +139,7 @@ public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { } private HttpRequest onBuildRequest(UpdatePaymentServiceRequest request) throws Exception { - HttpRequest req = buildRequest(request, new TypeReference() {}); + HttpRequest req = buildRequest(request, UpdatePaymentServiceRequest.class, new TypeReference() {}); return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); } @@ -158,7 +160,7 @@ public HttpResponse doRequest(UpdatePaymentServiceRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -186,7 +188,7 @@ public UpdatePaymentServiceResponse handleResponse(HttpResponse res UpdatePaymentServiceResponse res = resBuilder.build(); - if (Utils.statusCodeMatches(response.statusCode(), "201")) { + if (Utils.statusCodeMatches(response.statusCode(), "200")) { if (Utils.contentTypeMatches(contentType, "application/json")) { return res.withPaymentService(Utils.unmarshal(response, new TypeReference() {})); } else { @@ -296,7 +298,7 @@ public Async(SDKConfiguration sdkConfiguration, Headers _headers) { } private CompletableFuture onBuildRequest(UpdatePaymentServiceRequest request) throws Exception { - HttpRequest req = buildRequest(request, new TypeReference() {}); + HttpRequest req = buildRequest(request, UpdatePaymentServiceRequest.class, new TypeReference() {}); return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); } @@ -315,7 +317,7 @@ public CompletableFuture> doRequest(UpdatePaymentServiceReque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -340,7 +342,7 @@ public CompletableFuture() {}) .thenApply(res::withPaymentService); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateReport.java b/src/main/java/com/gr4vy/sdk/operations/UpdateReport.java index c8ab5923..061f8063 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateReport.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateReport.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(UpdateReportRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(UpdateReportRequest reque if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateThreeDsScenario.java b/src/main/java/com/gr4vy/sdk/operations/UpdateThreeDsScenario.java index 6ff9b8af..0b61b7df 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateThreeDsScenario.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateThreeDsScenario.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(UpdateThreeDsScenarioRequest request) HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(UpdateThreeDsScenarioRequ if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/UpdateTransaction.java b/src/main/java/com/gr4vy/sdk/operations/UpdateTransaction.java index 311e78ac..1af95b4f 100644 --- a/src/main/java/com/gr4vy/sdk/operations/UpdateTransaction.java +++ b/src/main/java/com/gr4vy/sdk/operations/UpdateTransaction.java @@ -160,7 +160,7 @@ public HttpResponse doRequest(UpdateTransactionRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -317,7 +317,7 @@ public CompletableFuture> doRequest(UpdateTransactionRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/VerifyPaymentServiceCredentials.java b/src/main/java/com/gr4vy/sdk/operations/VerifyPaymentServiceCredentials.java index 067f8754..45a14df2 100644 --- a/src/main/java/com/gr4vy/sdk/operations/VerifyPaymentServiceCredentials.java +++ b/src/main/java/com/gr4vy/sdk/operations/VerifyPaymentServiceCredentials.java @@ -157,7 +157,7 @@ public HttpResponse doRequest(VerifyPaymentServiceCredentialsReques HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -314,7 +314,7 @@ public CompletableFuture> doRequest(VerifyPaymentServiceCrede if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/main/java/com/gr4vy/sdk/operations/VoidTransaction.java b/src/main/java/com/gr4vy/sdk/operations/VoidTransaction.java index ed38d531..bd6b5114 100644 --- a/src/main/java/com/gr4vy/sdk/operations/VoidTransaction.java +++ b/src/main/java/com/gr4vy/sdk/operations/VoidTransaction.java @@ -143,7 +143,7 @@ public HttpResponse doRequest(VoidTransactionRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -300,7 +300,7 @@ public CompletableFuture> doRequest(VoidTransactionRequest re if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "422", "425", "429", "4XX", "500", "502", "504", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); diff --git a/src/test/java/com/gr4vy/sdk/util/BaseTest.java b/src/test/java/com/gr4vy/sdk/util/BaseTest.java index b23427a8..e6cb062d 100644 --- a/src/test/java/com/gr4vy/sdk/util/BaseTest.java +++ b/src/test/java/com/gr4vy/sdk/util/BaseTest.java @@ -16,7 +16,7 @@ import com.gr4vy.sdk.models.components.MerchantAccountCreate; import com.gr4vy.sdk.models.components.PaymentServiceCreate; import com.gr4vy.sdk.models.operations.CreateMerchantAccountResponse; -import com.gr4vy.sdk.models.operations.UpdatePaymentServiceResponse; +import com.gr4vy.sdk.models.operations.CreatePaymentServiceResponse; import com.gr4vy.sdk.utils.HTTPClient; public abstract class BaseTest { @@ -104,7 +104,7 @@ protected void setupEnvironment() throws Exception { MerchantAccount merchantAccount = res.merchantAccount().orElse(null); this.gr4vyClient = createGr4vyClient(privateKey, merchantAccount.id()); - UpdatePaymentServiceResponse paymentServiceResponse = this.gr4vyClient.paymentServices().create() + CreatePaymentServiceResponse paymentServiceResponse = this.gr4vyClient.paymentServices().create() .paymentServiceCreate(PaymentServiceCreate.builder() .acceptedCurrencies(List.of("USD")) .acceptedCountries(List.of("US"))